Skip to contents

Note that this function is specific to a specific DB schema - the form to query as well as the columns variable name are hard coded and would need to be adjusted if the DB change

Usage

prepare_qa_data(activityInfoTable)

Arguments

activityInfoTable

activityInfo link to the db where indicators got reported

Value

frame with the content of the activity info DB plus indicator reference and applied QA

Details

Implemented QA automatic Check Missing M&E Data sources Missing M&E Activity Missing Baseline Missing Baseline Numerator Missing Baseline Denominator Missing Actual Missing Actual Numerator Missing Actual Denominator Incorrect Baseline (i.e. >100 Incorrect Actual (i.e. >100 Baseline Higher (Lower) than Actual Significant Variance between Baseline and Actual (+/- 2*Baseline) Missing Data Limitation for Baseline Missing Data Limitation for Actual

Note also that the function is based on a token stored as an environment variable

Credentials set up as environment variables -

# token <- "activityinfotoken.." # print(Sys.setenv(ACTIVITYINFOTOKEN = token)) # Sys.getenv("ACTIVITYINFOTOKEN") # rm(token)

Examples

#prepare_qa_data(activityInfoTable= "cdn6y40lm87wi522", activityInfoPlan ="caqxz3lrqv8wig3", activityInfoCountry="cwpgxrfllcr4wv66")
data <- prepare_qa_data(activityInfoTable= "cdn6y40lm87wi522")