impactR4PHU
is designed for creating quality check reports, cleaning,
analysing and outputing results of core outcome indicators of Public
Health Unit. This package will target mainly Food Security and
Livelihoods, WASH, Nutrition and Health Sectors.
- Installation
- Projects
- Data Quality
- FSL
- Mortality
- IYCF
- Cleaning
- FSL
- Mortality
- Descriptive Analysis
- FSL
- Mortality
- Data Quality
- Standalone Functions
You can install the development version from GitHub with:
# install.packages("devtools")
devtools::install_github("impact-initiatives/impactR4PHU")
Upon installing the impactR4PHU package, you will be able to access pre-coded projects related to the various sectors of Public Health. These projects aims to support country missions and the research department to check/clean/and analyse indicatores related to Public Health sectors.
To access these projects, follow the following instructions.
Go to File -> New Project… Select New Directory Scroll to find the respective projectsThe Data Quality and Plausibility Report serves as a crucial tool for assessing the reliability and accuracy of the data collection of all related public health indicators across different assessments. This comprehensive analysis is designed to identify and address potential issues within the data, ensuring that field teams are being informed on potential issues detected in the data collection.
The report provides a detailed examination of the datasets, employing a variety of metrics and methodologies to evaluate data quality and plausibility. This includes checks for completeness, consistency, and accuracy of the data collected. This report aims to uncover any discrepancies, outliers, or anomalies that may suggest data collection, entry errors, or underlying issues that could impact the integrity of the findings.
This section includes: - Overall Plausibility Report / By Enumerator - All the flags related to Food Security and Livelihoods (details shown for each flag in the section) - Plots showing the distribution of the data.
This section includes: - Overall Plausibility Report / By Enumerator - All the flags related to Mortality (details shown for each flag in the section) - Number of deaths(overall and under 5)/joiners/leavers as well as person times. - Plots showing the crude, under 5, and birth rates.
This section includes: - Overall Plausibility Report / By Enumerator - All the flags related to IYCF (details shown for each flag in the section) - Plots showing the distribution of the data.
Please check each flag and the ACTION related to it and act accordingly. Another output will be associated to this HTML, the Excel file of the flags that were fired and requires follow-up with the field team. Please check the README tab in the excel file. This file will again be generated with the full data during the cleaning of the dataset. So please do use this file during data collection and relate to it in the final one to be filled.
The Data Cleaning Template serves as a crucial tool for assessing the data collection of all related public health indicators indicators across different assessments. This comprehensive tool is designed to identify and address potential issues within the data, ensuring that field teams are being followed up on potential issues detected in the data collection.
The report provides a detailed examination of the datasets, employing a variety of metrics and methodologies to evaluate data quality. This report aims to uncover any discrepancies, outliers, or anomalies that may suggest data collection, entry errors, or underlying issues that could impact the integrity of the findings.
Direct Checks - All FCS columns are 0. FCS Score is equal to 0. All values are changed to NA. - All FCS columns are 7. All values are changed to NA. - All LCSI columns are not_applicable. All values are changed to NA. - The LCSI strategy related to Displacement/Migration but HH is not a displaced group. Value of LCSI changed to NA. - The LCSI strategy related to Agriculture but HH do not have income type related to agriculture. Value of LCSI changed to NA. - The LCSI strategy related to Livestock but HH do not have income type related to livestock. Value of LCSI changed to NA.
Follow-Up Checks - Check 1: rCSI Score is high while protein consumption is also reported as frequent. - Check 2: HHs report using crisis or emergency strategies but not stress strategies or Emergency and no crisis. - Check 3: HH that would have an acceptable FCS score and a high rCSI score.
Follow-Up Checks - Check 1: Respondent reported more than 2 death in the HH. - Check 2:Respondent reported sex of dead person male and a cause of death related to female only. - Check 3:Respondent reported wrong dates leading to a negative person time.
Follow-Up Checks - Check 1: Respondent reported more than 2 death in the HH.
Please check the files in the output/ folder. The cleaning_logbook.xlsx already can contain some of the directly cleaned data. The followup_request.xlsm file represent the checks that needs to be followed up with the field team. Please follow the instruction in the READ_ME tab to know how to fill the file. After filling the file, you can merge the [uuid/variable/old.value/new.value/issue] from the filled file with the cleaning_logbook.xlsx and add them to your cleaning scripts.
The Descriptive Analysis is an analytical platform that presents a multitude of quantitative data tables. It encompasses a wide range of public health indicators collected through the assessment process, empowering users to examine and interpret complex datasets effectively. This tool is structured to support understanding the distribution of your data and support you writing your factsheets/outputs/reports, and create other visualizations.
As you saw in the output folder, you will have another excel file outputed from the analysis script. - The Excel file includes 2 sheets. The first 2 are all the tables that you see in the different sections of this HTML output. You can navigate to respective tables through the first sheet “Table of Contents”. - Another output as well will include the IPC table.
As you saw in the output folder, you will have another excel file outputed from the analysis script. - The Excel file includes 2 sheets. The first 2 are all the tables that you see in the different sections of this HTML output. You can navigate to respective tables through the first sheet “Table of Contents”.
library(impactR4PHU)
df <- impactR4PHU_data_template
df_with_fcs <- df %>% add_fcs(
cutoffs = "normal",
fsl_fcs_cereal = "fsl_fcs_cereal",
fsl_fcs_legumes = "fsl_fcs_legumes",
fsl_fcs_veg = "fsl_fcs_veg",
fsl_fcs_fruit = "fsl_fcs_fruit",
fsl_fcs_meat = "fsl_fcs_meat",
fsl_fcs_dairy = "fsl_fcs_dairy",
fsl_fcs_sugar = "fsl_fcs_sugar",
fsl_fcs_oil = "fsl_fcs_oil"
)
df_with_hhs <- df_with_fcs %>% add_hhs(
fsl_hhs_nofoodhh = "fsl_hhs_nofoodhh",
fsl_hhs_nofoodhh_freq = "fsl_hhs_nofoodhh_freq",
fsl_hhs_sleephungry = "fsl_hhs_sleephungry",
fsl_hhs_sleephungry_freq = "fsl_hhs_sleephungry_freq",
fsl_hhs_alldaynight = "fsl_hhs_alldaynight",
fsl_hhs_alldaynight_freq = "fsl_hhs_alldaynight_freq",
yes_answer = "yes",
no_answer = "no",
rarely_answer = "rarely",
sometimes_answer = "sometimes",
often_answer = "often"
)
df_with_lcsi <- df_with_hhs %>% add_lcsi(
fsl_lcsi_stress1 = "fsl_lcsi_stress1",
fsl_lcsi_stress2 = "fsl_lcsi_stress2",
fsl_lcsi_stress3 = "fsl_lcsi_stress3",
fsl_lcsi_stress4 = "fsl_lcsi_stress4",
fsl_lcsi_crisis1 = "fsl_lcsi_crisis1",
fsl_lcsi_crisis2 = "fsl_lcsi_crisis2",
fsl_lcsi_crisis3 = "fsl_lcsi_crisis3",
fsl_lcsi_emergency1 = "fsl_lcsi_emergency1",
fsl_lcsi_emergency2 = "fsl_lcsi_emergency2",
fsl_lcsi_emergency3 = "fsl_lcsi_emergency3",
yes_val = "yes",
no_val = "no_had_no_need",
exhausted_val = "no_exhausted",
not_applicable_val = "not_applicable"
)
df_with_rcsi <- df_with_lcsi %>% add_rcsi(
fsl_rcsi_lessquality = "fsl_rcsi_lessquality",
fsl_rcsi_borrow = "fsl_rcsi_borrow",
fsl_rcsi_mealsize = "fsl_rcsi_mealsize",
fsl_rcsi_mealadult = "fsl_rcsi_mealadult",
fsl_rcsi_mealnb = "fsl_rcsi_mealnb"
)
df_with_hdds <- df_with_rcsi %>% add_hdds(
fsl_hdds_cereals = "fsl_hdds_cereals",
fsl_hdds_tubers = "fsl_hdds_tubers",
fsl_hdds_veg = "fsl_hdds_veg",
fsl_hdds_fruit = "fsl_hdds_fruit",
fsl_hdds_meat = "fsl_hdds_meat",
fsl_hdds_eggs = "fsl_hdds_eggs",
fsl_hdds_fish = "fsl_hdds_fish",
fsl_hdds_legumes = "fsl_hdds_legumes",
fsl_hdds_dairy = "fsl_hdds_dairy",
fsl_hdds_oil = "fsl_hdds_oil",
fsl_hdds_sugar = "fsl_hdds_sugar",
fsl_hdds_condiments = "fsl_hdds_condiments"
)
Notice that these functions are also pipable
df_with_fcm_1 <- df_with_hdds %>%
add_fcm_phase(
fcs_column_name = "fsl_fcs_cat",
rcsi_column_name = "fsl_rcsi_cat",
hhs_column_name = "fsl_hhs_cat_ipc",
fcs_categories_acceptable = "Acceptable",
fcs_categories_poor = "Poor",
fcs_categories_borderline = "Borderline",
rcsi_categories_low = "No to Low",
rcsi_categories_medium = "Medium",
rcsi_categories_high = "High",
hhs_categories_none = "None",
hhs_categories_little = "No or Little",
hhs_categories_moderate = "Moderate",
hhs_categories_severe = "Severe",
hhs_categories_very_severe = "Very Severe"
)
Notice that these functions are also pipable
df_with_fcm_2 <- df_with_hdds %>%
add_fcm_phase(
hdds_column_name = "fsl_hdds_cat",
rcsi_column_name = "fsl_rcsi_cat",
hhs_column_name = "fsl_hhs_cat_ipc",
hdds_categories_low = "Low",
hdds_categories_medium = "Medium",
hdds_categories_high = "High",
rcsi_categories_low = "No to Low",
rcsi_categories_medium = "Medium",
rcsi_categories_high = "High",
hhs_categories_none = "None",
hhs_categories_little = "No or Little",
hhs_categories_moderate = "Moderate",
hhs_categories_severe = "Severe",
hhs_categories_very_severe = "Very Severe"
)
Notice that these functions are also pipable
df_with_fcm_3 <- df_with_hdds %>%
add_fcm_phase(
fcs_column_name = "fsl_fcs_cat",
hhs_column_name = "fsl_hhs_cat_ipc",
fcs_categories_acceptable = "Acceptable",
fcs_categories_poor = "Poor",
fcs_categories_borderline = "Borderline",
hhs_categories_none = "None",
hhs_categories_little = "No or Little",
hhs_categories_moderate = "Moderate",
hhs_categories_severe = "Severe",
hhs_categories_very_severe = "Very Severe"
)
Notice that these functions are also pipable
df_with_fcm_4 <- df_with_hdds %>%
add_fcm_phase(
hdds_column_name = "fsl_hdds_cat",
hhs_column_name = "fsl_hhs_cat_ipc",
hdds_categories_low = "Low",
hdds_categories_medium = "Medium",
hdds_categories_high = "High",
hhs_categories_none = "None",
hhs_categories_little = "No or Little",
hhs_categories_moderate = "Moderate",
hhs_categories_severe = "Severe",
hhs_categories_very_severe = "Very Severe"
)
Notice that these functions are also pipable
df_with_fclcm <- df_with_fcm_1 %>% ## Taken from previous Example
add_fclcm_phase()
df_nut <- impactR4PHU_data_nut_template
df_with_muac <- df_nut %>%
add_muac()
df_with_mfaz <- df_with_muac %>%
add_mfaz()
## ================================================================================
df_iycf <- impactR4PHU_iycf_template_data
df_with_iycf <- df_iycf %>%
add_iycf(uuid = "_submission__uuid",
age_months = "child_age_months_2")
tool <- impactR4PHU_survey_template
fsl_flags <- df_with_fclcm %>%
check_fsl_flags(tool.survey = tool)
anthro_flags <- df_with_mfaz %>%
check_anthro_flags(loop_index = "loop_index")
container_df <- impactR4PHU_data_wash_template
wash_flags <- df %>%
check_wash_flags(data_container_loop = container_df)
## Joining with `by = join_by(uuid)`
msna_data <- impactR4PHU_MSNA_template_data
health_flags <- check_health_flags(
.dataset = msna_data
)
iycf_flags <- check_iycf_flags(
.dataset = df_with_iycf,
age_months = "child_age_months_2",
uuid = "_submission__uuid"
)
Please note that the impactR4PHU project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.