lisphilar / covid19-sir

CovsirPhy: Python library for COVID-19 analysis with phase-dependent SIR-derived ODE models.
https://lisphilar.github.io/covid19-sir/
Apache License 2.0
109 stars 44 forks source link

OxCGRT data not registered #730

Closed gvncore closed 3 years ago

gvncore commented 3 years ago

At which point in the documentation do we register OxCGRT indicators into the Scenario object? Can we register those manually?

image

lisphilar commented 3 years ago

Thank you for your question! Please register OxCGRT data manually by Sceanrio.register(extras=[oxcgrt_data]) before Scenario.estimate_delay().

import covsirphy as cs
# Load datasets
data_loader = cs.DataLoader("input")
jhu_data = data_loader.jhu()
population_data = data_loader.population()
oxcgrt_data = data_loader.oxcgrt()
# Create Sceanrio instance
snl = cs.Scenario(country="country name here")
# Register datasets
snl.register(jhu_data, population_data, extras=[oxcgrt_data])
# Use .estimate_delay()
snl.estimate_delay()

Documentation: https://lisphilar.github.io/covid19-sir/usage_quick.html#Start-scenario-analysis

gvncore commented 3 years ago

Great, thanks for your help!

gvncore commented 3 years ago

Hi,

I was just using your covsirphy package and I’ve encountered and error to which I’m not able to find a solution to. I would like to use only a partition of the scenario phases to estimate the SIRF model, and the simulate it and compare it to actual values. I am trying to train the model on only past phases but there is always the same error that occurs:

Have you encountered such an error already or do you now what I am doing wrong?

Any help would be much appreciated!

Best,

Gianluca

From: Hirokazu Takaya @.> Reply to: lisphilar/covid19-sir @.> Date: Friday, 23 April 2021 at 15:23 To: lisphilar/covid19-sir @.> Cc: "Vanacore, Gianluca" @.>, Author @.***> Subject: Re: [lisphilar/covid19-sir] OxCGRT data not registered (#730)

Thank you for your question! Please register OxCGRT data manually by Sceanrio.register(extras=[oxcgrt_data]) before Scenario.estimate_delay().

import covsirphy as cs

Load datasets

data_loader = cs.DataLoader("input") jhu_data = data_loader.jhu() population_data = data_loader.population() oxcgrt_data = data_loader.oxcgrt()

Create Sceanrio instance

snl = cs.Scenario(country="country name here")

Register datasets

snl.register(jhu_data, population_data, extras=[oxcgrt_data]) snl.estimate_delay() Documentation: https://lisphilar.github.io/covid19-sir/usage_quick.html#Start-scenario-analysis

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

lisphilar commented 3 years ago

Did you try today argument of Scenario.timepoint()? Kindly share the script you tried.

lisphilar commented 3 years ago

Additionally, version information and outputs/errors may be necessary for investigation. Could you create a new issue for that with "Request fixing a bug" template? https://github.com/lisphilar/covid19-sir/issues/new/choose