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

Move US-specific data loading into its own module #19

Merged
merged 1 commit into from
Jul 6, 2020
Merged

Move US-specific data loading into its own module #19

merged 1 commit into from
Jul 6, 2020

Conversation

michaelosthege
Copy link
Collaborator

The data cleaning code becomes very country specific.
By separating it into a country-specific module, we can make covid.data more country-independent.

Data-loading functions for any country can be registered. They must have compatible signatures and return a DataFrame with multi-index [region, date] and columns positive and total.
Slices of this dataframe are used as model input. Therefore all region-specific data-cleaning must be done by the loader function.

The previous US-specific functions are imported for backwards-compatibility (tests pass).

More tests are added for the new country-independent loader API.

+ mechanism to register data loader for any country
+ more tests on the data loading mechanism
@k-sys k-sys merged commit 094e5b3 into rtcovidlive:master Jul 6, 2020
@michaelosthege michaelosthege deleted the country-independent-data-loading branch July 6, 2020 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants