DO NOT MERGE
This is a draft PR to demonstrate the changes I've made. The plan is to move this to a new, separate repository soon.
Major changes
Introduced new data standard
data for all combinations of region and date;
new and cumulative cases/deaths/hospitalisations/recoveries/tests OR simple totals for each region
Added three wrappers:
a) get_totals_only_regional_covid_data("country_name"),
b) get_wide_format_regional_covid_data("country_name"),
c) get_long_format_regional_covid_data("country_name")
Each function uses get_regional_covid_data("country_name") to do majority of cleaning and functionality
This delegates to a lower level function (one per country) which handles raw data collection and country-specific data cleaning
Introduced lower-level helper functions to help with unit testing and make code simpler to follow
Added ISO-3166-2 codes for each region
Standardised unit tests
Removed a few unnecessary files
I have currently completed this process for
Afghanistan
Belgium
Brazil
Canada
Germany
India
Italy
with plans to do it for the rest of the countries currently supported by NCovUtils, and then moving on to new countries if there is time / bandwidth / interest.
To Do
[x] Have Covid19R package data standard (long format) as the default and the current (wide format) as an option using logical flag
[x] Documentation for the new standards for developers and end-users
[x] Add in options for lower-level regions (e.g. counties in USA, not just states). At the moment only the highest level of region is outputted.
[ ] Investigate Github Actions for CI
[ ] Deprecate France
[x] Investigate changing use of memoise() - my current thinking is to use global options
DO NOT MERGE This is a draft PR to demonstrate the changes I've made. The plan is to move this to a new, separate repository soon.
Major changes
Introduced new data standard
Added three wrappers: a)
get_totals_only_regional_covid_data("country_name")
, b)get_wide_format_regional_covid_data("country_name")
, c)get_long_format_regional_covid_data("country_name")
get_regional_covid_data("country_name")
to do majority of cleaning and functionalityAdded ISO-3166-2 codes for each region
Standardised unit tests
Removed a few unnecessary files
I have currently completed this process for
To Do
[x] Have Covid19R package data standard (long format) as the default and the current (wide format) as an option using logical flag
[x] Documentation for the new standards for developers and end-users
[x] Add in options for lower-level regions (e.g. counties in USA, not just states). At the moment only the highest level of region is outputted.
[ ] Investigate Github Actions for CI
[ ] Deprecate France
[x] Investigate changing use of memoise() - my current thinking is to use global options