Google specific information for downloading, cleaning and processing covid-19 region data for an example Country. The function works the same as other national data sources, however, data from Google supports three subregions (country, subregion and subregion2) which can be accessed using the 'level' argument. There is also more data available, such as hospitalisations data. The raw data comes as three seperate data sets, "epidemiology" which is comprised of cases, tests and deaths, "index", which holds information about countries linking the other data sets, and "hospitalizations" which holds data about number of people in hospital, ICU, etc.
See also
Aggregated data sources
Covid19DataHub,
JHU
National data sources
Covid19DataHub,
ECDC,
JHU,
JRC,
WHO
Subnational data sources
Belgium,
Brazil,
Canada,
Colombia,
Covid19DataHub,
Cuba,
Estonia,
France,
Germany,
India,
Italy,
JHU,
Lithuania,
Mexico,
Netherlands,
SouthAfrica,
Switzerland,
UK,
USA
Super classes
covidregionaldata::DataClass -> covidregionaldata::CountryDataClass -> Google
Public fields
originname of country to fetch data for
supported_levelsA list of supported levels.
supported_region_namesA list of region names in order of level.
supported_region_codesA list of region codes in order of level.
common_data_urlsList of named links to raw data.
source_data_colsexisting columns within the raw data
source_textPlain text description of the source of the data
source_urlWebsite address for explanation/introduction of the data
Methods
Inherited methods
Method clean_common()
GoogleData specific subregion2 level data cleaning. This takes all the raw data, puts into a single data frame, renames some columns and checks types.
Method clean_level_1()
Google specific subregion level data cleaning. Takes the
data cleaned by clean_common and aggregates it to the country level
(level 1).
Method clean_level_2()
Google specific subregion2 level data cleaning. Takes the
data cleaned by clean_common and aggregates it to the subregion level
(level 2).
Examples
# nolint start
if (FALSE) {
# set up a data cache
start_using_memoise()
# get all countries
national <- Google$new(level = "1", get = TRUE)
national$return()
# show available regions with data at the second level of interest
google_level_2 <- Google$new(level = "2")
google_level_2$download()
google_level_2$clean()
google$available_regions()
# get all region data for the uk
google_level_2$filter("uk")
google_level_2$process()
google_level_2$return()
# get all regional data for the UK
uk <- Google$new(regions = "uk", level = "2", get = TRUE)
uk$return()
# get all subregional data for the UK
uk <- Google$new(regions = "uk", level = "3", get = TRUE)
uk$return()
}
# nolint end
