adorn_pvls_emr: Adorn PVLS and EMR indicator data with metadata.

View source: R/adorn-pvls-emr-data.R

adorn_pvls_emrR Documentation

Adorn PVLS and EMR indicator data with metadata.

Description

Takes in an unadorned dataframe of PVLS and EMR data in the format exported by the get_pvls_emr_table() function and adorns it with all of the appropriate metadata for Data Elements, Category Option Combos, Organisation unit names and UIDs, Organisation unit hierarchy, and periods. Users must provide either a valid aws_s3_bucket argument and have their S3 credentials stored in an .Rprofile file or provide a cache folder where all the appropriate metadata can be found.

Usage

adorn_pvls_emr(
  pvls_emr_raw = NULL,
  coc_metadata = NULL,
  de_metadata = NULL,
  pe_metadata = NULL,
  aws_s3_bucket = Sys.getenv("AWS_S3_BUCKET"),
  cache_folder = NULL
)

Arguments

pvls_emr_raw

Unadorned dataframe of PVLS and EMR indicator data.

coc_metadata

Dataframe containing category option combination metadata.

de_metadata

Dataframe containing data element metadata.

pe_metadata

Dataframe containing period metadata.

aws_s3_bucket

The URL for the particular bucket being accessed.

Value

Dataframe containing adorned PVLS and EMR indicator data.


pepfar-datim/daa-analytics documentation built on Nov. 24, 2024, 7:31 p.m.