Priesemann-Group / covid19_inference

Bayesian python toolbox for inference and forecast of the spread of the Coronavirus
GNU General Public License v3.0
73 stars 70 forks source link

Clean the data_retrieval module #8

Closed jdehning closed 4 years ago

jdehning commented 4 years ago

Make the data_retrieval module consistent:

emilIftekhar commented 4 years ago

So for example for "filter_one_country()" we want the output to be the described panda dataframe instead of an array?

semohr commented 4 years ago

I was thinking about rewriting the module to make it a bit more uncluttered.

Create a class for each source (e.g. john hopkins university).

That should make everything clearer and easily expandable for more sources and other data structures.

Would love some feedback on this proposal.

emilIftekhar commented 4 years ago

Sounds good! I could start working on it :)

jdehning commented 4 years ago

Yep, one class per data source seems like a good idea.

joaopn commented 4 years ago

A few comments:

jdehning commented 4 years ago

I suppose that you meant to load it at the initialization of the object and not of the module. For this I see no problem. One could make an extra source argument in init if one already has the data downloaded locally.

jdehning commented 4 years ago

I had now some time to look at what you have programmed. Some things that I would find good to change: