Skip to contents

load_billion_data_legacy() is the legacy version of load_billion_data(). It provides access to the raw inputs to the Billions stored within the World Health Organization's xMart4 database. By default, it filters the loaded data to take the most recently uploaded data for each indicator, country, and year. The user can also specify to take the latest data before a certain time period, or to extract all data from the database.

Usage

load_billion_data_legacy(
  billion = c("hep", "hpop", "uhc", "all"),
  mart_table = c("full_data", "raw_data", "projected_data", "unproj_data", "proj_data"),
  date_filter = "latest",
  na_rm = TRUE,
  format = c("csv", "streaming", "none"),
  ...
)

Arguments

billion

Billions data to load, one of "hep" (default), "hpop", "uhc", or "all".

mart_table

Name of xMart4 table in the GPW13 mart to load data from.

  • full_data: Full Billions data with transformed values, contributions, and all calculations available. (default)

  • raw_data: Raw input Billions data, that has yet to be transformed or calculated upon, but has been fully projected. Includes full history.

  • projected_data: A copy of raw_data with only the latest data.

  • proj_data: Raw input Billions data that has been projected by the technical programme(s).

  • unproj_data: Raw input Billions that has has not been projected by the technical programme(s) and needs projection by DDI.

date_filter

One of NULL, "latest", or a single date string. The date string needs to be in ISO6801 format, such as "1989-4-4" or "1988-06-21". If a date is provided, will only take values loaded on or prior to that date into the xMart4 database.

na_rm

Logical value, specifying whether to filter the data to only rows where value is not missing. Defaults to TRUE.

format

Specification of the output format to be returned by the xMart API. Defaults to "csv" for faster download and processing times. Passed to xmart4::xmart4_table(). See the xMart4 API documentation for details on all three options ("csv", "streaming", and "none").

...

Additional arguments passed to xmart4::xmart4_table(). Use if you need to provide additional token specifications for Azure authentication.

Value

A data frame.

Details

This function requires that the user have the xmart4 package installed and setup to access the GPW13 mart. Details are available on the GitHub landing page linked above.