write_datapack_csv.Rd
Export naomi outputs to PEPFAR Data Pack format
write_datapack_csv(naomi_output, path, psnu_level = NULL, dmppt2_output = NULL)
a naomi_output object.
path to save Data Pack CSV.
area_level for PEPFAR PSNU to export. If NULL, first looks in lookup table for the correct area_level, and if not defaults to the highest level of the area hierarchy.
data frame containing the Datapack inputs sheet of DMPPT2 output file.
The results will include Naomi outputs for area_id at the specified level, irrespective of whether a Datim map_id is available.
If a datim ID is available, the Datim map_name will be used in the column
psnu
. Otherwise the Naomi area_name
will be used for the column psnu
.
PEPFAR indicator codes for Data Pack are in this Datim view: https://www.datim.org/api/sqlViews/DotdxKrNZxG/data.html+css?var=dataSets:j7jzezIhgPj
PEPFAR PSNU UIDs are in this Datim view: https://www.datim.org/api/sqlViews/gsaaxFM8ZN0/data.html+css
(Replace the extensions .html+css
with .csv
to download tables as CSV.)