This package includes the tools used by REACH Mali to produce analyses within the framework of RRM and post-RRM information management.The analytical models were designed by the Post-RRM team at IMPACT Initiatives Mali. Sharing this package aims to ensure transparency in calculation processes and facilitate their understanding by all users.
# rrminfo
This package includes the tools used by REACH Mali to produce analyses
within the framework of RRM and post-RRM information management.The
analytical models were designed by the Post-RRM team at IMPACT
Initiatives Mali. Sharing this package aims to ensure transparency in
calculation processes and facilitate their understanding by all users.
## Installation
You can install the development version of rrminfo from
GitHub with:
``` r
# install.packages("pak")
pak::pak("AntsaVerse/rrminfo")
```
## Load packages
``` r
library(rrminfo)
library(tidyverse)
#> ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
#> ✔ dplyr 1.1.4 ✔ readr 2.1.5
#> ✔ forcats 1.0.0 ✔ stringr 1.5.1
#> ✔ ggplot2 3.5.1 ✔ tibble 3.2.1
#> ✔ lubridate 1.9.4 ✔ tidyr 1.3.1
#> ✔ purrr 1.0.4
#> ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
#> ✖ dplyr::filter() masks stats::filter()
#> ✖ dplyr::lag() masks stats::lag()
#> ℹ Use the conflicted package ( ) to force all conflicts to become errors
```
## Data Cleaning and Processing for RRM Analysis
### Clean and Format the Alert Data
- Convert date columns to the proper format.
- Handle missing values in household and individual numbers.
- Adjust outliers in date variables.
``` r
alert_clean %
clean_HH_number(hh_number = "menage_estimes", ind_number = "personne_estimees", hhsize = 6) %>%
format_date(dates_vector = c("date_incident", "date_validation"), date_format = "%d/%m/%Y") %>%
clean_dates(start_date = "date_incident", end_date = "date_validation")
```
### Process the Evaluation Data
- Convert date columns to the correct format.
- Discretize multiple-choice categorical variables (priority needs) into
individual sector columns.
``` r
secteur_besoin %
format_date(dates_vector = c("date_debut_evaluation", "date_fin_evaluation"), date_format = "%Y-%m-%d") %>%
discretize_multiple_choice_variables(multi_choice_column = "Besoins.p …