assert_data_calculation_hpop: Assert presence of minimum HPOP data

View source: R/assert_data_calculations.R

assert_data_calculation_hpopR Documentation

Assert presence of minimum HPOP data

Description

Assert that the minimum data required to run HPOP calculations is present.

Usage

assert_data_calculation_hpop(df, value_col = "value", scenario_col = NULL)

Arguments

df

Data frame in long format, where 1 row corresponds to a specific country, year, and indicator.

value_col

Column name of column with indicator values.

scenario_col

Column name of column with scenario identifiers. Useful for calculating contributions on data in long format rather than wide format.

Details

The function returns warnings if start_year and end_year are not present in year column in the data frame. Not having those values will significantly impact the billion calculations as hpop_healthier will return 0.

Warnings are also returned if some country (and scenario if provided) have only NAs.

Value

Data frame in long format.


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