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

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

Run in sequence, these can calculate the entire HEP 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 HEP data provided in the package, hep_df.

library(billionaiRe)

hep_df %>%
  transform_hep_data() %>%
  calculate_hep_components() %>%
  calculate_hep_prevent_ind() %>%
  calculate_hep_billion(end_year = 2023) %>%
  dplyr::filter(ind %in% c("prevent",
                           "espar",
                           "detect_respond",
                           "hep_idx"),
                year == 2023)


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