Description Details Super classes Public fields Methods Source See Also Examples
Attributes and methods for COVID-19 data provided by the Covid19 Data Hub
This dataset supports both national and subnational data sources
with national level data returned by default. National data is sourced from
John Hopkins University and so we recommend using the JHU class included in
this package. Subnational data is supported for a subset of countries which
can be found after cleaning using the available_regions()
method,
see the examples for more details. These data sets are minimally cleaned
data files hosted by the team at COVID19 Data Hub so please see their
source repository for further details
(https://github.com/covid19datahub/COVID19/#data-sources)
If using for analysis checking the source for further details is
strongly advised.
If using this class please cite: "Guidotti et al., (2020). COVID-19 Data Hub Journal of Open Source Software, 5(51), 2376, https://doi.org/10.21105/joss.02376"
covidregionaldata::DataClass
-> covidregionaldata::CountryDataClass
-> Covid19DataHub
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.
level_data_urls
List of named links to raw data. The first, and only entry, is be named main.
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()
Covid19 Data Hub specific data cleaning. This takes all the raw data, renames some columns and checks types.
Covid19DataHub$clean_common()
clone()
The objects of this class are cloneable with this method.
Covid19DataHub$clone(deep = FALSE)
deep
Whether to make a deep clone.
https://covid19datahub.io/articles/data.html
Aggregated data sources
Google
,
JHU
National data sources
ECDC
,
Google
,
JHU
,
JRC
,
WHO
Subnational data sources
Belgium
,
Brazil
,
Canada
,
Colombia
,
Cuba
,
Estonia
,
France
,
Germany
,
Google
,
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 data
cv19dh <- Covid19DataHub$new(level = "1", get = TRUE)
cv19dh$return()
# show available regions with data at the second level of interest
cv19dh_level_2 <- Covid19DataHub$new(level = "2")
cv19dh_level_2$download()
cv19dh_level_2$clean()
cv19dh$available_regions()
# get all region data for the uk
cv19dh_level_2$filter("uk")
cv19dh_level_2$process()
cv19dh_level_2$return()
# get all regional data for the UK
uk <- Covid19DataHub$new(regions = "uk", level = "2", get = TRUE)
uk$return()
# get all subregional data for the UK
uk <- Covid19DataHub$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.