Download detailed mortality and population data for different provinces and territories in Canada, in a single object from the Canadian Human Mortality Database.
Arguments
- what
What type of data are you looking for? The following options are available:
"births"– birth records;"Dx_lexis"– deaths by Lexis triangles;"population"– population size;"Dx"– death counts;"Ex"– exposure-to-risk;"mx"– central death-rates;"LT_f"– period life tables for females;"LT_m"– period life tables for males;"LT_t"– period life tables both sexes combined;"e0"– period life expectancy at birth;
- regions
Specify the region specific data you want to download by adding the CHMD region code/s. Options:
"CAN"– Canada - Sum of Canadian provinces and territories;"NFL"– Newfoundland & Labrador;"PEI"– Prince Edward Island;"NSC"– Nova Scotia;"NBR"– New Brunswick;"QUE"– Quebec;"ONT"– Ontario;"MAN"– Manitoba;"SAS"– Saskatchewan;"ALB"– Alberta;"BCO"– British Columbia;"NWT"– Northwest Territories & Nunavut;"YUK"– Yukon;NULL– ifNULLdata for all the regions are downloaded.
- interval
Datasets are given in various age and time formats based on which the records are aggregated. Interval options:
"1x1"– by age and year;"1x5"– by age and 5-year time interval;"1x10"– by age and 10-year time interval;"5x1"– by 5-year age group and year;"5x5"– by 5-year age group and 5-year time interval;"5x10"–by 5-year age group and 10-year time interval.
- save
Do you want to save a copy of the dataset on your local machine? Logical. Default:
FALSE.- show
Choose whether to display a progress bar. Logical. Default:
TRUE.
Value
A ReadCHMD object that contains:
- input
List with the input values;
- data
Data downloaded from CHMD;
- download.date
Time stamp;
- years
Numerical vector with the years covered in the data;
- ages
Numerical vector with ages covered in the data.
Details
The Canadian Human Mortality Database is a "satellite" of the Human Mortality Database, built with the same methodology, so the two are directly comparable. It covers Canada, its provinces and its territories. See the CHMD website for its history and research team; the data are validated and corrected for the period it covers.
Examples
if (FALSE) { # \dontrun{
# Download demographic data for Quebec and Saskatchewan regions in 1x1 format
# Death counts. We don't want to export data outside R.
CHMD_Dx <- ReadCHMD(what = "Dx",
regions = c('QUE', 'SAS'),
interval = "1x1",
save = FALSE)
# Download life tables for female population. To export data use save = TRUE.
LTF <- ReadCHMD(what = "LT_f",
regions = c('QUE', 'SAS'),
interval = "1x1",
save = FALSE)
} # }