Description Super classes Public fields Methods Source See Also Examples
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.
covidregionaldata::DataClass
-> covidregionaldata::CountryDataClass
-> Google
origin
name of country to fetch data for
supported_levels
A list of supported levels.
supported_region_names
A list of region names in order of level.
supported_region_codes
A list of region codes in order of level.
common_data_urls
List of named links to raw data.
source_data_cols
existing columns within the raw data
source_text
Plain text description of the source of the data
source_url
Website address for explanation/introduction of the data
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.
Google$clean_common()
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).
Google$clean_level_1()
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).
Google$clean_level_2()
new()
custom initialize for Google
Google$new(...)
...
arguments to be passed to DataClass
and initialize Google
clone()
The objects of this class are cloneable with this method.
Google$clone(deep = FALSE)
deep
Whether to make a deep clone.
https://github.com/GoogleCloudPlatform/covid-19-open-data
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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | # nolint start
## Not run:
# 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()
## End(Not run)
# nolint end
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.