This patch corrects the weighting of three ability-to-participate barriers in
add_prot_score_practices() so the composite matches the global MSNI framework.
add_prot_score_practices(): yes_work, yes_livelihood, and yes_water
are now weighted 2 (previously 1), matching the global MSNI framework. This
raises comp_prot_score_practices for households selecting any of these
activities, which can in turn raise comp_prot_score and the
comp_prot_in_need/comp_prot_in_severe_need flags (#809).This release is a bug-fix round within the 2026 cycle that also ships the new
MSNI workflow vignettes and their bundled demo datasets. It corrects the SNFI
tenure-security default in add_comp_snfi(), fixes multi-column range
validation in are_values_in_range(), corrects the sanitation-facility sharing
counts, and tightens input validation in the education loop helpers.
humind_main
(household-level) and the individual-level loops humind_health_ind and
humind_edu_ind, documented and exposed lazily (LazyData) (#785).add_loop_edu_disrupted_d_to_main(): passing attack_d = NULL (to indicate
the attack dimension is absent) no longer raises
object 'loop_attack' not found. The attack summary is now only built and
joined when attack_d is supplied (#804).
add_comp_snfi(): the tenure_security_cat default now points to
hlp_tenure_security, the combined security-of-tenure category produced by
add_occupancy_cat() (maximum risk across occupancy and eviction risk).
Previously it defaulted to hlp_occupancy_cat, so eviction risk was omitted
from the SNFI composite (#801; see also #583, #584).
are_values_in_range(): a value outside lower/upper in any checked
column now raises an error, instead of only when every column was out of
range. lower/upper are also validated (both numeric, with upper >= lower), and validation messages now refer to "values" rather than "columns"
(#798).
add_loop_edu_barrier_protection_d(): added input validation for the
edu_barrier column, which is assumed to be select_one. Values must be a
known barrier response code: a protection barrier (flagged 1), a
non-protection/access barrier or flag code, or an undefined/non-response value
(the latter two coded 0). New non_protection_issues (defaults to the
non-protection edu_barrier codes) and barriers_undefined (default
c("dnk", "pnta", "other")) parameters make these sets explicit; any other
value (e.g. typos or combined select_multiple strings) raises an error, as
do overlapping protection_issues, non_protection_issues, and
barriers_undefined sets (#792).
add_sharing_sanitation_facility_n_ind(): the raw number of households
sharing (wash_sanitation_facility_sharing_n) is no longer overwritten; the
estimated number of individuals is stored in a new column
(wash_sanitation_facility_sharing_n_calc). not_shared facilities
no longer get an imputed individual count and leave that column as NA, so
they are no longer conflated with "shared with fewer than 20 people". The
camp sanitation severity-1 classification in add_comp_wash() is now keyed
on wash_sharing_sanitation_facility_cat == "not_shared" (#788).
vignette("msni-workflow") ("Computing the MSNI: Humind
Workflow") providing an end-to-end, sector-by-sector walkthrough of the
humind pipeline: Food Consumption (LCSI, FCS, HHS, rCSI, FCM, FCLCM),
WASH (H-WISE, water quality, sanitation, hygiene), SNFI/HLP, Protection,
Health, and Education (loops and main), closing with add_msni() (#785).vignette("msni-workflow-fr") ("Calcul du MSNI :
flux de travail Humind") (#785).This release is a patch/bug-fix round within the 2026 cycle. It tightens input
validation and answer-option handling across WASH and Food Security functions,
fixes inconsistent NA handling in add_hhs(), corrects the time-to-fetch-water
bucketing in add_drinking_water_source_cat(), and removes the runtime
dependency on impactR.utils.
add_drinking_water_quality_jmp_cat(): the safely_managed water quality
dimension deprecated in favor of 'basic' for improved sources with water on
premises. This adheres more strictly to the JMP standards.add_quantile_interval() no longer depends on impactR.utils — the
df_diff logic is now inlined locally (#709).add_loop_*_to_main()) stop relying on df_diff; a new
internal drop_shared_loop_cols() handles differing id_col_main/id_col_loop
(#757).add_loop_edu_ind_age_corrected(): new schooling_end_age parameter
(default 17) to cap the schooling-age population (#783).add_hhs(): genuinely missing _freq responses are recoded to NA instead
of silently to 0, which previously deflated fsl_hhs_score (#753).add_hhs(): added validation for inconsistent yes/no and frequency answer
pairs, and NA scoring for invalid combinations (with warnings/errors) (#753).add_drinking_water_time_cat(): dnk/pnta recoding aligned with the
xlsxform.add_drinking_water_time_cat(): 30/60-minute bucket boundaries are now
inclusive; accepts multiple sl_under_30_min response codes (#755).add_handwashing_facility_cat(): fixed the facility_observed_water default
naming; documented survey_modality (#759).add_sharing_sanitation_facility_n_ind(): checks for the presence of the
survey weight column (#760).add_loop_edu_access_d(): pnta/dnk coded as NA, not non-attendance
(#771).add_comp_edu(): households with no school-age children no longer end up as
NA — the education count is coerced to 0 (#767).add_drinking_water_time_cat() with
threshold_cat.add_drinking_water_time_cat(): max parameter renamed to max_minutes.add_drinking_water_quality_jmp_cat(): the safely_managed classification
was removed; improved sources with water on premises now classify as basic
(#782).add_sharing_sanitation_facility_cat(): skipped_sanitation_facility now
defaults to c("none") (previously NULL); skipped facilities recode to
"not_applicable" instead of NA (#773).This release rolls out the 2026 MSNI framework update across WASH, Protection, SNFI, Food Security, and Education indicators, including a new HWISE-4 prerequisite step, a mandatory shelter-damage component, and several parameter/default changes to match this year's Kobo form. Breaking changes are significant — read the section below before upgrading.
WASH
add_comp_wash().
It now requires a pre-computed HWISE-4 score, produced by the new
add_hwise() prerequisite function.Protection
NA when
only other_safety_measures is selected.add_prot_score_movement():
women_girls_boys_avoid_firewood and women_girls_boys_avoid_places
(both weighted 2)add_prot_score_rights() gains four new answer options:
yes_therapeutic_services (w=1), yes_edu_facilities (w=2), and
yes_social_services (w=1) in the services sub-dimension, and
yes_birth_certificates (w=1) in the justice sub-dimension. Weights
for yes_healthcare and yes_schools corrected from 1 to 2. The
yes_other_services (previously weight 1) and
yes_other_services_justice (previously weight 1) are now unweighted
and no longer contribute to the composite score.add_prot_score_practices(): yes_other_activities (previously
weight 2) and yes_other_social (previously weight 1) are now
unweighted and no longer contribute to the composite score.SNFI
add_comp_snfi()
(previously toggled on/off via a shelter_damage argument).Food Security
add_fcs(), add_hhs(), add_rcsi(), add_lcsi(), and
add_fcm_phase() — previously re-exported from impactR4PHU — are now
vendored locally in humind. A new add_fclcm_phase() function is
added.Education
edu_ind_schooling_age_d renamed to edu_ind_age_schooling (shared
default across the education loop functions).child_pregnancy added as a recognized protection barrier in
add_loop_edu_barrier_protection_d().MSNI
add_msni() gains sector_in_severe_need_n and
sector_severe_needs_profile outputs.add_hwise(): new function for HWISE-4 water/handwashing scoring,
intended as a prerequisite step for add_comp_wash().add_fclcm_phase(): new function computing the FCLCM phase from FCS,
rCSI, HHS, and LCSI outputs.add_msni() now returns sector_in_severe_need_n and
sector_severe_needs_profile.add_loop_edu_barrier_protection_d() recognizes child_pregnancy as an
additional protection barrier (existing codes still match as before).sharing_sanitation_facility_cat added
to the if_not_in_stop check in add_comp_wash(); corrected the
are_values_in_set validation set in add_drinking_water_quality_jmp_cat().add_msni() —
it previously aborted whenever any sectoral composite was missing
instead of only when all of them were; calls with a partial set of
composites now succeed (with a warning) instead of erroring.add_comp_wash() (no output change).R CMD check (internal only, no output change).other_safety_measures does not affect the
Protection score when combined with other options.add_shelter_damage_cat().add_fcs() → add_hhs() → add_rcsi() → add_lcsi() →
add_fcm_phase() → add_fclcm_phase() → add_comp_foodsec())..keep_recoded.sanitation_facility_jmp_cat_safely_managed parameter.checkmate to Imports.impactR4PHU — add_fcs(),
add_hhs(), add_rcsi(), add_lcsi(), and add_fcm_phase() are now
vendored locally instead of imported.Renames
edu_ind_schooling_age_d → edu_ind_age_schooling (shared default
across add_loop_edu_access_d(), add_loop_edu_barrier_protection_d(),
add_loop_edu_disrupted_d()).add_comp_foodsec(): fc_phase → fclcm_phase (default column
"fsl_fc_phase" → "fclcm_phase"), and phase labels "Phase X FC" →
"Phase X FCLC".WASH
add_comp_wash() no longer computes water-quantity scoring from raw
HWISE-drink responses. The drinking_water_quantity* parameters are
gone; the function now requires a pre-computed comp_wash_hwise_score
column (produced by the new add_hwise()).add_comp_wash(): setting_camp default changed from "camp" to
c("camp_formal", "camp_informal"), and matching switched from ==
to %in% — default callers whose data still uses "camp" will no
longer match.add_comp_wash(): removed the dead sanitation_facility_jmp_cat_safely_managed
parameter (the JMP category function never actually produced that
value).add_comp_wash(): drinking-water-quality severity thresholds shifted
by one level across camp/urban/rural branches.add_sanitation_facility_cat(): "unimproved" facility codes changed
(dropped flush_elsewhere/plastic_bag; added
twin_pit_latrine_wo_slab/other_container).add_drinking_water_source_cat(): default code protected_spring →
well_spring; sl_under_30_min changed from a free scalar default to
a match.arg()-constrained vector (out-of-set values now error);
water_on_premises default changed from "water_on_premises" to
c("water_in_dwelling", "water_in_plot").add_handwashing_facility_cat(): facility_undefined narrowed from
c("other", "pnta") to "other"; observed/reported soap and water
column-name defaults changed to _yn-suffixed names, with new value
codes (e.g. yes_soap_shown → soap_available).add_loop_wgq_ss(): default codes lot_of_difficulty →
a_lot_of_difficulty and cannot_do → cannot_do_at_all.SNFI
add_comp_snfi(): the shelter_damage toggle parameter was removed —
shelter damage is now always required and always scored (previously
optional, off by default).add_shelter_damage_cat(): default damage-type codes changed
(minor → minor_roof, major → major_roof,
damage_windows_doors → windows_doors, damage_floors → floors,
damage_walls → walls), and the returned category labels changed
entirely: "No damage"/"Damaged"/"Partial collapse or destruction"/ "Total collapse or destruction"/"Undefined" →
"none"/"damaged"/"part"/"total"/"undefined".add_comp_snfi(): shelter-damage severity score scale shifted —
total 4→5, part 3→4, damaged 2→3 (none stays 1).add_fds_cannot_cat(): fds_cooking_can/fds_cooking_cannot defaults
swapped (previously backwards: "can cook" defaulted to "no"); output
category strings simplified ("no_cannot" → "no").Protection
add_prot_score_movement(): the linear comp_prot_score_prot_needs_3 + 1
scoring formula was replaced by an explicit, capped scale
(>= 3 ~ 4, == 2 ~ 3, == 1 ~ 2, == 0 ~ 1); the NA rule now also
triggers when only other_safety_measures is selected with a zero
score.add_prot_score_movement(): men_boys_avoid_places split into
men_avoid_places + boys_avoid_places (same split for
..._avoid_night), with new optional weight parameters
(men_avoid_places_weight, men_avoid_night_weight).add_prot_score_movement(): two new required columns —
prot_needs_3_movement/women_girls_boys_avoid_firewood,
prot_needs_3_movement/women_girls_boys_avoid_placesadd_prot_score_rights(): four new required columns —
prot_needs_1_services/yes_therapeutic_services,
prot_needs_1_services/yes_edu_facilities,
prot_needs_1_services/yes_social_services,
prot_needs_1_justice/yes_birth_certificatesThis release fixes a shelter classification bug affecting tents.
tent as an inadequate shelter type in add_shelter_type_cat() (was incorrectly grouped with adequate shelters).inadequate scenarios, including the priority-rule edge cases.This release fixes a Protection bug related to choice-column separator handling.
sep argument when constructing choice-column names in add_prot_score_practices() and add_prot_score_rights(). Both / (default) and . separators are supported.This release introduces major terminology and logic changes across the MSNI framework, WASH, Protection, and Healthcare indicators. Several functions have new required parameters, altered defaults, or renamed outputs — breaking changes are significant.
Terminology Migration
All references to acute need are migrated to severe need, in line with 2025 guidance.
is_in_acute_need() is now is_in_severe_need().*_in_acute_need → *_in_severe_need across MSNI, WASH, Health, Food Security, SNFI, Education, and Protection.WASH (Handwashing Facilities)
add_handwashing_facility_cat() to incorporate soap type (qualifying vs non-qualifying).Healthcare
add_loop_healthcare_needed_cat() improved to propagate NA correctly and issue explicit warnings.Protection
add_prot_score_rights() and add_prot_score_practices() reworked NA handling: DNK/PNTA now nullifies sub-scores rather than collapsing the entire composite.add_handwashing_facility_cat().needed == yes and received == NA.Renames
is_in_acute_need() → is_in_severe_need().*_in_acute_need → *_in_severe_need.WASH
add_comp_wash() default parameter for drinking_water_quantity now wash_hwise_drink (was wash_drinking_water_quantity).add_handwashing_facility_cat() requires new soap type columns/args and accepts vectorized “no” codes.basic → limited, and NA handling has changed.Protection
Healthcare
add_loop_healthcare_needed_cat() now returns NA with warnings when needed == yes and received == NA.This release introduces major updates across protection indicators, SNFI and shelter categorization, expenditure scoring, testing framework improvements, dependency management, and documentation. Deprecated WGQ components are fully removed.
Protection: complete revamp, based on a series of new Tier 1 indicators related to Protection Needs.
SNFI:
hlp_eviction_risk.Health: removal of the WGQs from the framework.
WASH: small changes to incorporate the self-reported hygiene variants (availability of soap & water) and map them to the JMP classifications.
Food Security: new additional step to analyze the impact of livelihood coping strategies on Food Consumption (changes done in impactR4PHU and reflected in humind).
Education: small changes to indicator naming to reflect "direct attack on
education". Indicator name was edu_disrupted_occupation and is now called
edu_disrupted_attack. edu_disrupted_occupation and is now called
edu_disrupted_attack.
add_comp_prot_score() as main function for computing overall
Protection Composite.add_shelter_issue_cat() logic for better category handling and
alignment with 2025 specifications.add_comp_snfi() for consistent categorization and explicit
handling of special cases.max() with all-NA vectors.testthat best practices across test suites.tibble.add_child_sep_cat.R.This release covers bug fixes, documentation updates, changes to parameters, and additional enhancements:
add_comp_wash() per the MSNI framework, the function was updated for the urban categorization "basic which should be score 1 instead of score 2 (#558)add_comp_edu() updates to show comp_edu_score_disrupted as 3 if displaced_n is greater than 0, instead of greater than 1.(#556)add_comp_health() updated so that households with at least one person with a disability have the value 3 for comp_health_score (#550)add_loop_edu_ind_age_corrected() updated to allow custom starting age for education analysis based on country-specific requirements (#549)add_comp_snfi() now correctly categorizes "other"" for snfi_shelter_issue_cat (#545)add_loop_edu_ind_age_corrected() function error message added for date formats not in the ISO 8601 format (#513)This release covers bug fixes.
comp_edu_score_attendance() now categorizes households correctly when children are not attending school and no protection issue was faced. (#532)add_shelter_issue_cat() do not add -999 or -998 when the shelter issue is Don't know or Prefer not to answer (it keeps NAs) and "Other" is categorized as others and not undefined. (#534)add_comp_snfi() default values were fixed in documentation. (#535)add_drinking_water_time_threshold_cat(): corrected input parameters "under_30min" and "above_30min". (#539)add_comp_wash(): corrected assigned severities for comp_wash_score_sanitation among HHs in camps. (#536)This release covers a hot patch, a new function, and enhancements.
add_sanitation_facility_jmp_cat() now correctly handles the cases when the sanitation facility is improved and not shared (#522)add_quantile_interval() now allows to add (weighted) quantile intervals columns for any numeric variables (#516), for instance for adding income quantiles.add_loop_healthcare_needed_cat_to_main() and
add_loop_edu_disrupted_d_to_main when datasets do not name UUI columns "uuid" (#517).add_age_cat() has more intuitive breaks due to a fix and improvement of num_cat(). To be able to get the following thresholds: 0-17, 18-59, 60-119, 120+, you can write add_age_cat("resp_age", breaks = c(0, 18, 60, 120)) (#504). Default breaks also changed to the aforementioned ones.add_loop_edu_disrupted_d() and add_loop_edu_disrupted_d_to_main(), occupation can be set to NULL.This release covers mostly hot patches on a few bugs.
add_comp_prot() assigns the score of 1 to a severity level. (#514)add_msni() now correctly handles metrics 3 and 4, adding a missing value when the household is not in need (#509, #510)add_comp_wash has some minor refinements. (#507)add_income_source_prop() now has these two parameters as NULL by default. It is still possible to include them. (#506)Provides functions to compose usual humanitarian composite indicators related to IMPACT Multi-Sector Needs Assessments (MSNAs). Such as:
The package follows the 'Step-Composition' approach of IMPACT R framework.
rsci() now correctly adds the rcsi_score variable.drinking_water_quantity() now recodes the frequencies of days without drinking water, while drinking_water_quantity_score() assigns a score on a 5-point scale.time_to_fetch_water_int_char() and time_to_fetch_water_combine() to recode and combine both variables for the time to fetch water.handwashing_facility() now recodes the types of handwashing facility.handwashing_facility_score() which calculates a score on a 2-point scale based on handwashing_facility()drinking_water_source() recodes the types of water sources, time_to_fetch_water() the time to fetch water according to a chosen threshold, and drinking_water_source_score() classify each household/individual on a 5-point scale.sanitation_facility() recodes the types of sanitation facilities, sharing_sanitation_facility() recodes the number of people sharing the sanitation facility, and sanitation_facility_score() classify each household on a 5-point scale.water_source(): Water source 5-point-scale.sanitation_facility(): Sanitation facility 5-point scale.handwashing_facility(): Handwashing facility 2-point scale.drinking_water_quantity(): Drinking water quantity 5-point scale.hdds(): Household Dietary Diversity Scores (HDDS) (#5)fies(): Food Insecurity Experience Scale (FIES) #6lcsi() on aggregated categories' names corrected (#20)dplyr::case_when() revamp. (#)impactR.utils and not impactR. (#)