Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] ValueError when adding phases manually to fully-complemented data #878

Closed
lisphilar opened this issue Jul 11, 2021 · 1 comment · Fixed by #881 or #884
Closed

[Fix] ValueError when adding phases manually to fully-complemented data #878

lisphilar opened this issue Jul 11, 2021 · 1 comment · Fixed by #881 or #884
Labels
bug Something isn't working

Comments

@lisphilar
Copy link
Owner

Summary

ValueError was raised when adding phases manually to fully-complemented data.
Data ("cook county.csv") was provided by @AnujTiwari with #851.

Codes

import covsirphy as cs
country_data = cs.CountryData("input/cook county.csv", country="Cook")
country_data.set_variables(
    date="date", confirmed="confirmed", recovered="recovered", fatal="fatal")

country_data.register_total()
country_data.cleaned()

jhu_data_cook = cs.JHUData.from_dataframe(country_data.cleaned())
population_data_cook = cs.PopulationData()
population_data_cook.update(5150233, country="Cook")

snl = cs.Scenario(country="Cook")
snl.register(jhu_data_cook, population_data_cook)
snl.records()

snl.trend(algo="Pelt-rbf").summary()
snl.estimate(cs.SIRF)

snl.clear(include_past=True).summary()
snl.add(end_date="28Apr2020")

Outputs

ValueError: @start must be the same as/over 15Mar2020, but 27Feb2020 was applied.

Environment

  • CovsirPhy version: 2.21.0-iota-fu4
  • Python version: 3.9.5
  • Installation: poetry
  • System: WSL (Ubuntu)
@lisphilar
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant