Information for downloading, cleaning and processing COVID-19 region data for Mexico.
Notes on region codes:
Level 1 codes = ISO-3166-2, source: https://en.wikipedia.org/wiki/ISO_3166-2:MX
Level 2 codes = INEGI Mexican official statistics geocoding, source: raw data
Level 1 INEGI codes are the first 2 characters of Level 2 INEGI codes
covidregionaldata::DataClass -> Mexico
originname of origin 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.
level_data_urlsList of named links to raw data that are level specific.
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
set_region_codes()Set up a table of region codes for clean data
Mexico$set_region_codes()
download()Data download() function for Mexico data. This replaces
the generic download function in DataClass(). To get the latest data
use a PHP script from the website.
Mexico$download()
clean_common()Common Data Cleaning
Mexico$clean_common()
clean_level_1()Estados Level Data Cleaning
Mexico$clean_level_1()
clean_level_2()Municipality Level Data Cleaning
Mexico$clean_level_2()
clone()The objects of this class are cloneable with this method.
Mexico$clone(deep = FALSE)
deepWhether to make a deep clone.
Subnational data sources
Belgium,
Brazil,
Canada,
Colombia,
Covid19DataHub,
Cuba,
Estonia,
France,
Germany,
Google,
India,
Italy,
JHU,
Lithuania,
Netherlands,
SouthAfrica,
Switzerland,
UK,
USA
# NOT RUN {
region <- Mexico$new(verbose = TRUE, steps = TRUE, get = TRUE)
region$return()
# }
Run the code above in your browser using DataLab