HumanMortalityDatabase

This service accesses data from the human mortality database which tabulates death rates broken down by age group and gender for various countries.

For more information, see https://www.mortality.org/.

Note: for countries that don’t report separate male and female death counts, the gender breakdowns are just the total multiplied by a rough estimate of the percent of people in that country who are male/female.

RPCS

HumanMortalityDatabase.getAllData()

Get all the mortality data. This is potentially a lot of data. Only use this if you truly need access to all data.

This is returned as structured data organized by country, then by date (mm/dd/yyyy), then by gender, then by category.

Returns: List (List) - all available data

HumanMortalityDatabase.getAllDataForCountry(country: String)

Get all the data associated with the given country. This is an object organized by year, then by week, then broken down by gender.

Arguments:

  • country: String (String) - Name of the country to look up

Returns: List (List) - the requested data

HumanMortalityDatabase.getCategories()

Get a list of all the categories represented in the data. These can be used in a query.

Returns: List (List) - the requested data

HumanMortalityDatabase.getCountries()

Get a list of all the countries represented in the data. These are not the country names, but a unique identifier for them.

Returns: List (List) - the requested data

HumanMortalityDatabase.getGenders()

Get a list of all the valid genders represented in the data. These can be used in a query.

Returns: List (List) - the requested data

HumanMortalityDatabase.getTimeSeries(country: String, gender: Enum<male, female, both>?, category: MortalityCategory?)

Get the time series data for the given country, filtered to the specified gender and category in month/day/year format.

Arguments:

  • country: String (String) - name of the country to look up

  • gender: Enum<male, female, both>? (Enum) - gender group for filtering. Defaults to both.

  • category: MortalityCategory? (MortalityCategory) - category for filtering. Defaults to deaths total.

Returns: List (List) - the requested data