The goal of GeoMSNA2022 is to facilitate geospatial and remote sensing
analyses of selected global MSNA
s.
Prior to the creation of this repository various RS variables have been
extracted for 6 MSNA data sets (SOM, IRQ, COL, NER, NGA, and HTI). The
extraction process is currently performed and documented in the
surveyGEER
package repository. Now that the variables have been
extracted we aim to explore relationships between
environmental/climatic/geospatial phenomena and household conditions.
It is recommended the country-offices with R-capacity use this repository to host this stage of analysis.
usethis::use_vignettes()
to automatically create a markdown notebookYou will need to decide on the variables in the HH data set that should
be analyzed though a geospatial/climatic/environmental lens. Once you
have done this you will find a rudimentary function called
load_core_hh_indicators.R
in the R/
directory of this project. You
can then add them to the function following the lead the irq
team has
provided. If you have the same variables as another country make sure
you copy there label to use in your list.
load_core_hh_indicators <- function(input_df, country_code="irq"){
if (country_code=="irq"){
res <- list(
# labels on left - column names on right
`Food Consumption Score (numeric)`= "fcs",
`Food Consumption Score (categorical)`= "fcs_category",
`Household Hunger Scale (categorical)` = "household_hunger_scale",
`main source of food (categorical)` = "food_source",
`HHH unemployed (categorical)` = "unemployed_seek_work",
`HH debt (numeric)` = "how_much_debt",
`debt per member > 90k (categorical)` = "g37"
)
}
if(country_code=="som"){
res <- list(
`Respondent Gender` = "respondent_gender",
`Respondent Age` = "respondent_age",
`Region` = "region",
`District` = "district",
`Reside in an IDP settlement` = "idp_settlement",
`Village/settlement/IDP site` = "settlements",
`Household Size` = "hh_size",
`Household's total cash income from all income sources` = "total_house_income",
`If yes, what is yoour household's current total amount of debt in USD` = "total_hh_debt",
`Drinking` = "drinking_water",
`Cooking` = "cooking_water",
`Personal hygiene (washing or bathing)` = "hygiene_water",
`Other domestic purposes (cleaning house, floor, etc.)` = "domestice_water",
`FSL shocks Unusually high food prices` = "hh_fsl_shocks/high_food_prices",
`FSL shocks Drought/irregular rains, prolonged dry spell` = "hh_fsl_shocks/drought",
`FSL shocks Unusually high level of crop pests and disease` = "hh_fsl_shocks/crop_disease",
`FSL shocks Disease outbreak in the settlement` = "hh_fsl_shocks/disease_outbreak",
`FSL shocks Too much rain, flooding` = "hh_fsl_shocks/flooding",
`FSL shocks Livestock disease outbreak` = "hh_fsl_shocks/livestock_disease",
`No food to eat of any kind in your house because of lack of resources to get food` = "hh_no_food",
`How often did this happen in the past [4 weeks/30 days]` = "hh_no_food_freq",
`Go to sleep at night hungry because there was not enough food` = "hh_hunger",
`How often did this happen in the past [4 weeks/30 days]` = "hh_hunger_freq",
`Go a whole day and night without eating anything at all because there was not enough food` = "fs_not_enough_food",
`Livestock decrease Disease outbreak` = "reason_livestock_decrease/disease_outbreak",
`Livestock decrease Flooding` = "reason_livestock_decrease/flooding_flooding",
`Livestock decrease Drought` = "reason_livestock_decrease/drought_drought",
`Recent displacement Flooding (riverine and flash flood)` = "factors_recent_displacement/flooding",
`Recent displacement Drought (lack of food, water, livestock loss)` = "factors_recent_displacement/drought",
`Recent displacement Desert locust invasion` = "factors_recent_displacement/desert_locust",
`Have access to your current shelter in the next 6 months` = "shelter_access",
`Latitude` = "Lat",
`Longitude` = "Lon",
`uuid` = "uuid"
)
}
if(country_code=="nga"){
res <- list(
`Flooding Incident` = "nature_safety_incident/flooding",
`Livestock decrease (rain)` = "hoh_livestock_decrease/drought"
)
}
# select the given columns on the fetched msna dataset
df_msna_cols <- input_df |>
select(any_of(purrr::map_chr(res, ~.x)), starts_with("rs_")) |>
mutate(country_code = country_code)
return(df_msna_cols)
}