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

Handing HK, Taiwan data moving forward #84

Merged
merged 10 commits into from
Mar 10, 2023
Merged

Handing HK, Taiwan data moving forward #84

merged 10 commits into from
Mar 10, 2023

Conversation

beansrowning
Copy link
Collaborator

@beansrowning beansrowning commented Mar 10, 2023

Decision points

Implemented changes

  • Implemented get_hk_data() and get_taiwan_data() as internal functions to return case and death time series data from HK CHP and Taiwan CDC respectively
  • Updated OWID source in data source lookup
  • get_covid_df() now accepts a sources argument
    • "all": the default, returns JHU, WHO, Taiwan CDC, HK CHP
    • "WHO": WHO data as-is (china aggregated counts and no supplemental data)
    • "WHO+JHU": the "old" version containing WHO + JHU disaggregated data
    • "WHO+Primary": WHO data plus HK data from HK CHP, Taiwan data from Taiwan CDC, and Macau data from JHU thru Mar 10, 2023
  • get_combined_table() was reworked internally to handle new data sources
  • type argument for get_combined_table() was changed to accept a new type: "legacy", which returns what "Both" used to return previously (though the JHU data won't be updated and China Mainland data haven't been updated in some time)
  • "Both" type for get_combined_table() now returns case and death data from get_covid_df("WHO+Primary")
  • Updated docs accordingly

Possible future directions

  • Data warehousing in AZDL to avoid pulling full time series from these sources each time
    • and to avoid eventuality where JHU data are removed entirely
  • Work with OWID to incorporate Taiwan, HK, and Macau data into their system, as desired
  • Possibly publish our own global time-series hosted on data.cdc.gov
    • Is there value in this above and beyond WHO dashboard / OWID offerings?

TODO

  • Finish fixing unit tests

beansrowning and others added 6 commits March 9, 2023 19:47
- Updating get_covid_df to pull HK and Taiwan data from primary source
- Seems to align with JHU closely
- Splitting all sources into their own getter functions
- Adding "source" argument, which defaults to pulling "all" as it has before, but also allow for specific data cuts
- Updating docs
- Using switch() with the new get_covid_df() function streamlines things a bit
@beansrowning
Copy link
Collaborator Author

@jamesfuller-cdc FYI, we can chat when you're back in office Monday

@beansrowning
Copy link
Collaborator Author

Test failures

  • Looks like one is due to existing issue with an update to name entry for Saint Helena
    image

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.

Update data source for HK, Macau, and Taiwan
1 participant