Skip to contents

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

Public fields

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

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.

Usage

Google$clean_common()


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).

Usage

Google$clean_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).

Usage

Google$clean_level_2()


Method new()

custom initialize for Google

Usage

Google$new(...)

Arguments

...

arguments to be passed to DataClass and initialize Google


Method clone()

The objects of this class are cloneable with this method.

Usage

Google$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

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