| hmd_data | R Documentation |
The hmd_data() fetches data from multiple statistics and merge them together
in the output. All other functions grab a particular (set of) statistics from
the Human Mortality Database (mortality.org). You need to register an account at
mortality.org to get the data and call the hmd_session() first before
using these functions.
hmd_data(
country,
stats = "death_rate",
sex_format = c("wide", "long"),
year_range = 1,
age_range = 1
)
hmd_life_expectancy(country, sex_format = c("wide", "long"), year_range = 1)
hmd_birth(country, sex_format = c("wide", "long"))
hmd_life_table(
country,
sex_format = c("wide", "long"),
age_range = 1,
year_range = 1
)
hmd_population(country, sex_format = c("wide", "long"), age_range = 1)
hmd_death(
country,
sex_format = c("wide", "long"),
age_range = 1,
year_range = 1
)
hmd_exposure_to_risk(
country,
sex_format = c("wide", "long"),
age_range = 1,
year_range = 1
)
hmd_death_rate(
country,
sex_format = c("wide", "long"),
age_range = 1,
year_range = 1
)
country |
The country code to fetch the data for. The input may be a named or unnamed character vector. If the vector is named, then the name is used as the label. |
stats |
The statistics to extract. The available statistics are: "birth", "death", "life_expectancy", "exposure_to_risk", "population", "life_tables", and "death_rate". |
sex_format |
A logical value to indicate whether the sex should be returned as "long" or "wide" format. The default is "wide". |
range_year, range_age |
A single integer indicating the period or cohort year/age range. Generally, only 1, 5 or 10 are available. |
A humble object.
hmd_session
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.