knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

To calculate the HPOP Billion, there are a series of functions made available through the billionaiRe package:

Run in sequence, these can calculate the entire HPOP Billion, or they can be run separately to produce different outputs as required. Details on the inputs of each function are available in their individual documentation, but below you can see the quick and easy Billions calculation done using the sample fake HPOP data provided in the package, hpop_df.

library(billionaiRe)

hpop_df %>%
  transform_hpop_data() %>%
  add_hpop_populations() %>%
  calculate_hpop_billion() %>%
  dplyr::filter(stringr::str_detect(ind, "hpop_healthier"))


gpw13/billionaiRe documentation built on Sept. 27, 2024, 10:05 p.m.