basic-scenarios
, acceleration-scenarios
, sdg-scenarios
, and data-recycling
vignettes.default_scenario
instead of 2018add_populations
and add_hep_populations
functions to retrieve accurate population for aggregation to higher dimensionsaccelerate_target
scenarios, a variation on acceleration scenarios that aim at specific values whenever possible.scenario_top_n_iso3
allows to pick the best performing countries for a specific group and have all countries aim at the rate of change.ind
, year
, iso3
, type
and source
from functions parametersvalue
, transform_value
, scenario
, contribution
and
contribution_pct
to value_col
, transform_value_col
, scenario_col
,
contribution_col
and contribution_pct_col
respectively.save_wrangled_output
now saves files with all columns capitalised and
load_billion_data_whdh
changes all column names to lower case after downloading data
from WHDH to simplify WHDH => xMart pipelines.scenario_return_previous_trajectory
to return to pre_covid_trajectory
after covid_shock
impute_covid_shock
to impute a COVID-19 shock easilyaroc_type
and related parameters to scenario_dip_recover
to add alternatives
on how the AROC is calculated. This is chiefly to allow to use an average AROC
rather that just with latest value.covid_shock
make_default_scenario()
now doesn't require to have default_scenario
in scenario
column.assert_col_types()
, assert_has_names()
, assert_distinct_rows()
, and
assert_col_paired_with()
.wrangle_data.R
functions to explicitly cast columns to expected types.upload_billion_data
function for easy uploads to the 3B data lake in the
World Health Data Hub (WHDH).assert_timestamp
and assert_class
utilities for checks.testit
dependencies.save_wrangled_output
and upload_billion_data
: both functions now return the modified data frame after writing to disk/upload.xmart_cols
and save_wrangled_output
save_wrangled_output
now accepts data_type
and na_rm
argumentssave_wrangled_output
changed to "gzip" save_wrangled_output
and the function now raises an error if the expected columns aren't available (previously raised a warning and returned the input data frame instead).upload_billion_data
now returns a data frame (was previously returning NULL)load_billion_data
functions incorporating the whdh::download_data_asset
function and the use of a version
argument to replace the date_filter
placeholder.load_billion_data
now has an experiment
argument, which replaces sandbox
.none
becomes routine
tp
becomes reference_infilling
fh
where the indicator was not transformed correctly. See [issue #35]{https://github.com/gpw13/billionaiRe/issues/35} for more details.Various updates to facilitate migration of the Triple Billion data pipeline into the WHDH
Updated load_billion_data
to now pull data from the WHDH data lake by default
and optionally set xMart as the data_source
. Using xMart currently redirects the user
to the legacy version of load_billion_data
, while the xMart functionality is built.
Added get_whdh_path
for easy generation of download/upload paths for the WHDH data lake
Updated save_wrangled_output
to work with parquet format.
Added save_gho_backup_to_whdh
, making it easier to backup snapshots of GHO data
to the WHDH data lake.
Updated billion_ind_codes
with a toggle for subindicators (like water_rural
,
water_urban
and the eSpar categories and sub-categories).
Added get_ind_billion
for determining which billion a given indicato belongs to.
Updated xmart_cols
to return different sets of columns based for different types of data.
Added new assertions: assert_type
, assert_fileext
, assert_unique_vector
,
assert_length
, assert_min_length
, assert_same_length
, assert_equals
,
and assert_x_in_y
.
Updated assert_arg_exists
to have custom error messages.
Rearranged utils_asserts.R
to categorise the different assertions.
indicator_df.xlsx
analysis_code
by ind
of indicator_df.xlsx
. ind
of indicator_df.xlsx
.ind
instead of analysis_code
.indicator_df.xlsx
and indicator_order.xlsx
into one file.wppdistro
transfer to WorldHealthOrganization
GitHub org.export_all_countries_summaries_xls
to export all country summary Excel
files for all billions or a specific billion.export_country_summary_xls
to export one country summary Excel file for
all billions or a specific billion.indicator_df
, indicator_df.xlsx
, and indicator_df.rda
to include
additional information about indicators definition, names, etc.indicator_order.xlsx
to be joined with indicator_df
.affected_pathogens
, affected_pathogens.xlsx
, and affected_pathogens.rda
to indicate by which pathogens countries are affected.inst/extdata/country_summary_template.xlsx
to store the Excel template
for country profiles.pre-commit
hooks to style and ensure consistency in code on commit. See
pre-commit repository for more
information.calculate_contribution_sums
with the ability to calculate regional or
global sums for HEP, HPOP, or UHC billions for a given year.wrangled_rural_urban_gho_data()
with functionality to supplant wrangle_gho_data()
for indicators where the data has an additional RESIDENCEAREATYPE dimension with possible values
of TOTL
, URB
and RUR
.xmart_cols()
, has_xmart_cols()
, save_wrangled_output()
utility functions
for easier wrangling of data updates.load_billion_data()
, allowing user to directly
download latest Billions data and resultant calculations.indicator_df.xlsx
and indicator_df.rda
with the GHO code for
polio_routine(WHS4_544).contribution_percent
as well as contribution
values, for use in the dashboard and other presentations.wrangle_who_data
function with additional assertions and warningsindicator_df.xlsx
and indicator_df.rda
with the GHO code for
measles_routine (WHS8_110)scenario
column or in wide format by having multiple
value
columns.untransform_hpop_data()
and untransform_uhc_data()
so that transformed
data could be converted back into the original domain of the raw data.transform_...
and untransform_...
functions for UHC and HPOP Billions.df
for ind
, iso3
,
and year
.transform_glucose()
to have a domain of 5.1 to 7.4, previously one of
5.1 to 7.4.NEWS.md
file to track changes to the package.Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.