R6 Class containing specific attributes and methods for John Hopkins University data
Source:R/JHU.R
JHU.Rd
Attributes and methods for COVID-19 data used for the 2019 Novel Coronavirus Visual Dashboard operated by the Johns Hopkins University Center for Systems Science and Engineering (JHU CSSE). Supported by ESRI Living Atlas Team and the Johns Hopkins University Applied Physics Lab (JHU APL)
Details
This dataset support both national and subnational data sources
with national level data returned by default. 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 sourced, cleaned, standardised by the JHU team so please see the
source repository for further details. Note that unlike many other data sets
this means methods applied to this source are not being applied to raw
surveillance data but instead to already cleaned data. If using for
analysis checking the JHU source for further details is advisable.
If using this data please cite: "Dong E, Du H, Gardner L. An interactive web-based dashboard to track COVID-19 in real time. Lancet Inf Dis. 20(5):533-534. doi: 10.1016/S1473-3099(20)30120-1"
See also
Aggregated data sources
Covid19DataHub
,
Google
National data sources
Covid19DataHub
,
ECDC
,
Google
,
JRC
,
WHO
Subnational data sources
Belgium
,
Brazil
,
Canada
,
Colombia
,
Covid19DataHub
,
Cuba
,
Estonia
,
France
,
Germany
,
Google
,
India
,
Italy
,
Lithuania
,
Mexico
,
Netherlands
,
SouthAfrica
,
Switzerland
,
UK
,
USA
Super classes
covidregionaldata::DataClass
-> covidregionaldata::CountryDataClass
-> JHU
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. 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
Methods
Inherited methods
Method clean_common()
JHU specific data cleaning. Joins the raw data sets, checks column types and renames where needed.
Method clean_level_1()
JHU specific country level data cleaning. Aggregates the data to the country (level 2) level.
Examples
# nolint start
if (FALSE) {
# set up a data cache
start_using_memoise()
# get all countries data
jhu <- JHU$new(level = "1", get = TRUE)
jhu$return()
# show available regions with data at the second level of interest
jhu_level_2 <- JHU$new(level = "2")
jhu_level_2$download()
jhu_level_2$clean()
jhu$available_regions()
# get all region data for the uk
jhu_level_2$filter("uk")
jhu_level_2$process()
jhu_level_2$return()
}
# nolint end