Skip to contents

Calculations

The package is built around a set of functions that calculate the Billions for the three Billions separately.

HEP

Health Emergencies Protection (HEP): vignette("hep", package = "billionaiRe")

add_hep_populations()
Add Population Figures for HEP Billion
calculate_hep_billion()
Calculate HEP Billion
calculate_hep_components()
Calculate HEP component indicators
hep_df
HEP generated example data
transform_hep_data()
Transform Raw Indicator Values for HEP Billion

HPOP

Healthier Populations (HPOP):vignette("hpop", package = "billionaiRe")

add_hpop_populations()
Add Population Figures for HPOP Billion
calculate_hpop_billion()
Calculate HPOP Billion
calculate_hpop_billion_change()
Calculate the HPOP Billion using columns of change
calculate_hpop_contributions()
Calculate HPOP Indicator Contributions
hpop_df
HPOP generated example data
transform_hpop_data()
Transform Raw Indicator Values for HPOP Billion
untransform_hpop_data()
Untransform Indicator Values for HPOP Billion

UHC

Universal Health Coverage (UHC): vignette("uhc", package = "billionaiRe")

calculate_uhc_billion()
Calculate UHC Billion
calculate_uhc_contribution()
Calculate UHC contribution
transform_uhc_data()
Transform Raw Indicator Values for UHC Billion
uhc_df
UHC example data
untransform_uhc_data()
Untransform Indicator Values for UHC Billion

Populations

Using the right populations for aggregation between countries can be tricky. Those functions provide helper to add the appropriate populations in all cases.

add_hep_populations()
Add Population Figures for HEP Billion
add_hpop_populations()
Add Population Figures for HPOP Billion
add_populations()
Add Population Figures for all billions
pop_links
HPOP Billion population links

Aggregations

Aggregating multiple countries values together requires special considerations. Those functions provide helper.

calculate_contribution_sums()
Calculate global/regional billions contributions

Acceleration scenarios

Functions to generate acceleration scenarios values at indicator-level. See vignette("acceleration-scenarios", package = "billionaiRe") for more details.

HEP

HPOP

accelerate_adult_obese()
Accelerate adult_obese
accelerate_alcohol()
Accelerate alcohol
accelerate_child_obese()
Accelerate child_obese
accelerate_child_viol()
Accelerate child_viol
accelerate_devontrack()
Accelerate devontrack
accelerate_fuel()
Accelerate fuel
accelerate_hpop_sanitation()
Accelerate hpop_sanitation
accelerate_hpop_sanitation_rural()
Accelerate hpop_sanitation_rural
accelerate_hpop_sanitation_urban()
Accelerate hpop_sanitation_urban
accelerate_hpop_tobacco()
Accelerate hpop_tobacco
accelerate_ipv()
Accelerate ipv
accelerate_overweight()
Accelerate overweight
accelerate_pm25()
Accelerate pm25
accelerate_road()
Accelerate road
accelerate_stunting()
Accelerate stunting
accelerate_suicide()
Accelerate suicide
accelerate_transfats()
Accelerate transfats
accelerate_wasting()
Accelerate wasting
accelerate_water()
Accelerate water
accelerate_water_rural()
Accelerate water_rural
accelerate_water_urban()
Accelerate water_urban

UHC

accelerate_anc4()
Accelerate anc4
accelerate_art()
Accelerate art
accelerate_beds()
Accelerate beds
accelerate_bp()
Accelerate bp
accelerate_doctors()
Accelerate doctors
accelerate_dtp3()
Accelerate dtp3
accelerate_fh()
Accelerate fh
accelerate_fp()
Accelerate fp
accelerate_fpg()
Accelerate fpg
accelerate_hwf()
Accelerate hwf
accelerate_itn()
Accelerate itn
accelerate_nurses()
Accelerate nurses
accelerate_pneumo()
Accelerate pneumo
accelerate_tb()
Accelerate tb
accelerate_uhc_sanitation()
Accelerate uhc_sanitation
accelerate_uhc_tobacco()
Accelerate uhc_tobacco

Sustainable Development Goals (SDG) scenarios

Functions to generate Sustainable Development Goals (SDG) scenarios values at indicator-level. See vignette("sdg-scenarios", package = "billionaiRe") for more details.

HPOP

sdg_adult_obese()
Accelerate adult_obese to SDG target
sdg_alcohol()
Accelerate alcohol to SDG target
sdg_child_obese()
Accelerate child_obese to SDG target
sdg_child_viol()
Accelerate child_viol to SDG target
sdg_devontrack()
Accelerate devontrack to SDG target
sdg_fuel()
Accelerate fuel to SDG target
sdg_hpop_sanitation()
Accelerate hpop_sanitation to SDG target
sdg_hpop_sanitation_rural()
Accelerate hpop_sanitation_rural to SDG target
sdg_hpop_sanitation_urban()
Accelerate hpop_sanitation_urban to SDG target
sdg_hpop_tobacco()
Accelerate hpop_tobacco to SDG target
sdg_ipv()
Accelerate ipv to SDG target
sdg_overweight()
Accelerate overweight to SDG target
sdg_pm25()
Accelerate pm25 to SDG target
sdg_road()
Accelerate road to SDG target
sdg_stunting()
Accelerate stunting to SDG target
sdg_suicide()
Accelerate suicide to SDG targets
sdg_transfats()
Accelerate transfats to SDG targets
sdg_wasting()
Accelerate wasting to SDG targets
sdg_water()
Accelerate water to SDG target
sdg_water_rural()
Accelerate water_rural to SDG target
sdg_water_urban()
Accelerate water_urban to SDG target

UHC

sdg_anc4()
Accelerate anc4 to SDG target
sdg_art()
Accelerate art to SDG target
sdg_beds()
Accelerate beds to SDG target
sdg_bp()
Accelerate bp to SDG target
sdg_doctors()
Accelerate doctors to SDG target
sdg_dtp3()
Accelerate dtp3 to SDG target
sdg_fh()
Accelerate fh to SDG target
sdg_fp()
Accelerate fp to SDG target
sdg_fpg()
Accelerate fpg to SDG target
sdg_hwf()
Accelerate hwf to SDG target
sdg_itn()
Accelerate itn to SDG target
sdg_nurses()
Accelerate nurses to SDG target
sdg_pneumo()
Accelerate pneumo to SDG target
sdg_tb()
Accelerate tb to SDG target
sdg_uhc_sanitation()
Accelerate uhc_sanitation to SDG target
sdg_uhc_tobacco()
Accelerate uhc_tobacco to SDG target

Benchmarking scenario

Basic scenarios

The basic scenarios are the building blocks of all other scenarios. See vignette("basic-scenarios", package = "billionaiRe") for more details.

AROC scenario

scenario_aroc()
Scenario to use the average annual rate of change

Linear change scenarios

scenario_linear_change() scenario_linear_change_col()
Scenario to add a linear point change

Reach a fixed target

Percent from baseline scenarios

scenario_percent_baseline()
Scenario to change by a fixed percentage from a baseline value by target year

Basic benchmarking scenarios

scenario_top_n_iso3()
Scenario to reach the top performing rate of change countries

Compairing scenarios

scenario_bau()
Scenario establish a business as usual scenario
scenario_best_in_region()
Scenario to add a linear percentage point aimed at regional values
scenario_best_of()
Scenario to pick the best scenario out of a list of scenarios
scenario_quantile()
Scenario to add a linear percentage point aimed at quantiles

Target scenarios

accelerate_target_anc4()
Accelerate anc4 to 95% by 2030
accelerate_target_art()
Accelerate art to 90.25 by 2025
accelerate_target_beds()
Accelerate beds to 18 by 2025
accelerate_target_bp()
Accelerate bp
accelerate_target_doctors()
Accelerate doctors
accelerate_target_dtp3()
Accelerate dtp3
accelerate_target_fh()
Accelerate fh
accelerate_target_fp()
Accelerate fp
accelerate_target_fpg()
Accelerate fpg
accelerate_target_hwf()
Accelerate hwf
accelerate_target_itn()
Accelerate itn
accelerate_target_nurses()
Accelerate nurses
accelerate_target_pneumo()
Accelerate pneumo
accelerate_target_tb()
Accelerate tb
accelerate_target_uhc_sanitation()
Accelerate uhc_sanitation
accelerate_target_uhc_tobacco()
Accelerate uhc_tobacco

Scenarios helper

Helper functions used to generate scenarios. See vignette("scenarios", package = "billionaiRe") for more details

add_scenario() add_scenario_indicator()
Add scenario to data frame

Populations

Using the right populations for aggregation between countries can be tricky. Those functions provide helper to add the appropriate populations in all cases.

add_hep_populations()
Add Population Figures for HEP Billion
add_hpop_populations()
Add Population Figures for HPOP Billion
add_populations()
Add Population Figures for all billions
pop_links
HPOP Billion population links

WHDH interface

Load data

load_billion_data()
Load Billions indicator data
load_billion_data_legacy()
Load Raw Billions Indicator Data
load_billion_data_whdh()
Load Billions indicator data from WHDH
load_billion_data_xmart()
Load Billions indicator data from xMart
load_misc_data()
Load miscellaneous data
upload_billion_data()
Upload Billions indicator data

Data Wrangling

add_missing_xmart_rows()
Add missing rows for xMart upload
get_data_lake_name()
Return the name of the 3B data lake
get_whdh_path()
Generate file paths for the Triple Billions WHDH data lake
has_xmart_cols()
Check data frame for xMart4 columns
save_gho_backup_to_whdh()
Backup GHO data to the WHDH Data Lake
save_wrangled_output()
Save the output to disk after ensuring column specs
wrangle_gho_data()
Put GHO data into billionaiRe format
wrangle_gho_rural_urban_data()
Wrangle GHO data with TOTL/RUR/URB dimensions
wrangle_unsd_data()
Put UNSD data into billionaiRe format
xmart_col_types()
Get the column types for xMart columns
xmart_cols()
Get names of xMart4 columns

Data recycling

Functions to recycle the data and recombine it in different datasets into single timeseries that then can be used in the calculations. See vignette("data-recycling", package = "billionaiRe") for more details

recycle_data() recycle_data_scenario_single() make_default_scenario()
Recycle data between scenarios
remove_recycled_data()
Remove recycled values from df

Metadata

Functions to access the metadata.

billion_ind_codes()
Indicator codes for the Billions
convert_ind_codes()
Convert indicator codes between types
get_country_shares()
Get country shares data
get_ind_billion()
Denotes which billion a given indicator belongs to
get_ind_metadata()
Get metadata for a Triple Billions indicator(s)
get_sdi_ratio()
Get SDI ratio data
indicator_df
Dataset of indicators used within the Billions calculations.