Accelerate hpop_tobacco by picking the best value between business as usual,
halt the rise in 2018, or a custom version of scenario_percent_baseline(). The
custom function is taking similar parameters to
scenario_percent_baseline()'s percent_change = -30, baseline_year = 2010,
but values are added to the start_year value, rather than the baseline_year
values.
Usage
accelerate_hpop_tobacco(
df,
ind_ids = billion_ind_codes("hpop"),
scenario_col = "scenario",
value_col = "value",
start_year = 2018,
start_year_trim = start_year + 1,
end_year = 2025,
default_scenario = "default",
bau_scenario = "historical",
scenario_name = "acceleration",
...
)Arguments
- df
Data frame in long format, where 1 row corresponds to a specific country, year, and indicator.
- ind_ids
Named vector of indicator codes for input indicators to the Billion. Although separate indicator codes can be used than the standard, they must be supplied as a named vector where the names correspond to the output of
billion_ind_codes().- scenario_col
Column name of column with scenario identifiers. Useful for calculating contributions on data in long format rather than wide format.
- value_col
Name of the column containing indicator value in
df.- start_year
Year from which the acceleration scenario begins, inclusive.
- start_year_trim
(integer) year to start trimming from.
- end_year
End year(s) for contribution calculation, defaults to 2019 to 2025.
- default_scenario
name of the default scenario.
- bau_scenario
name of scenario to be used for business as usual. Default is
historical.- scenario_name
name of scenario
- ...
additional parameters to be passed to scenario function
Details
Runs:
custom scenario_percent_baseline (see above).
scenario_bau(df, small_is_best = TRUE,...)scenario_halt_rise(df, baseline_year= 2018, small_is_best = TRUE,...)
Then picks the best result between the three scenarios.
See also
scenario_percent_baseline
HPOP acceleration scenarios
accelerate_adult_obese(),
accelerate_alcohol(),
accelerate_child_obese(),
accelerate_child_viol(),
accelerate_devontrack(),
accelerate_fuel(),
accelerate_hpop_sanitation_rural(),
accelerate_hpop_sanitation_urban(),
accelerate_hpop_sanitation(),
accelerate_ipv(),
accelerate_overweight(),
accelerate_pm25(),
accelerate_road(),
accelerate_stunting(),
accelerate_suicide(),
accelerate_transfats(),
accelerate_wasting(),
accelerate_water_rural(),
accelerate_water_urban(),
accelerate_water()