*! version 2.3.0 18Feb2026

Title

unicefdata What's New -- Version history and release notes

Return to main help file

What's New in v2.3.0 (18Feb2026)

Discovery Caching (Stata 16+): Indicator search now uses frame-based session caching.
The YAML metadata is parsed once per session and stored in a Stata frame, making subsequent
search() calls near-instantaneous.

New infrastructure:

• __unicef_parse_indicators_yaml: Bulk YAML parser that reads the full indicators
metadata file into a one-row-per-indicator dataset

• _unicef_load_indicators_cache: Frame cache manager with parser-version-based
invalidation — automatically re-parses when the parser is updated

Search improvements (_unicef_search_indicators v2.0.0):

• Stata 16+: dataset-based search on cached metadata (code, name, description, dataflows)

• Stata 14–15: unchanged line-by-line YAML parsing (full backward compatibility)

• New nocache option forces re-parsing of the YAML file

Cache management:

• unicefdata, clearcache now also drops the _unicef_indicators frame

• unicefdata_sync automatically invalidates the cached frame after metadata refresh

Code cleanup:

• Archived vestigial _query_indicators.ado and _query_metadata.ado
(inherited from wbopendata, zero live call sites)

What's New in v2.2.1 (18Feb2026)

Bug Fixes (Code Review): Systematic review of v2.2.0 addressing 4 high-priority bugs
and 7 medium/low improvements.

Critical fixes:

• Multi-indicator fallback overwrite: primary HTTP import no longer clobbers valid fallback data

• Search tier-filter bypass: first match block now applies tier/orphan filtering

• latest/mrv filter: all required variables checked individually (not just last _rc)

• Removed corrupt _unicef_fetch_with_fallback.ado (3-byte file, no callers)

Cleanup:

• Removed dead _get_sdmx_fetch and _get_sdmx_parse_structure programs (-74 lines)

• Fixed São Tomé country match (broad strpos replaced with iso3 == "STP")

• Label loop count now computed dynamically instead of hardcoded

• Removed non-existent files from pkg manifests

What's New in v2.2.0 (10Feb2026)

Major QA Expansion: Test suite expanded to 63 tests across 16 families (100% pass rate).

Input Validation (3 new checks):

• wide_indicators with a single indicator now raises error 198 (previously only warned)

• attributes() without wide_attributes or wide_indicators now raises error 198 (previously silently ignored)

• circa without year() now raises error 198 (previously silently ignored)

Compound Quoting Fix:

• All strpos() and lower() calls on the `0' macro now use compound quotes

• Fixes parsing errors when fromfile() paths contain special characters

Dataset Metadata (char):

• Dataset-level _dta[] chars record version, timestamp, syntax, indicator, dataflow

• Variable-level chars on value and indicator columns

• New nochar option to suppress char metadata writes

New Test Families:

• DATA — Data integrity tests (value types, numeric/string validation)

• MULTI — Multi-indicator tests (wide_indicators and wide format)

• PERF — Performance tests (runtime benchmarking)

• REGR — Regression tests (baseline value comparisons)

• DET expanded from 6 to 11 tests (multi-country, time series, vaccination fixtures)

Cross-Platform:

• XPLAT metadata paths corrected (Root/R/Stata instead of Python/R/Stata)

• EXT-05: Replaced unavailable CCRI dataflow with ECD; accepts graceful API error

What's New in v2.1.0 (07Feb2026)

Cache Management: New clearcache subcommand drops cached frames and reloads metadata.

Path Resolution:

• 3-tier path resolution (PLUS -> findfile/adopath -> cwd) replaces hardcoded paths

• 404 errors now include tried dataflows in messages

Cross-Language Test Suite:

• 39 shared fixture tests (Python 14, R 13, Stata 12) using shared CSV fixtures

• New YAML_SCHEMA.md documents all 7 YAML file types

Bug Fixes:

• R apply_circa(): Countries with all-NA values no longer silently dropped

• R hardcoded paths replaced with system.file() resolution

• Stata hardcoded paths replaced with 3-tier resolution

What's New in v2.0.0 (24Jan2026)

Major Quality Milestone: All QA tests passing (38/38, 100% success rate)

SYNC-02 Enrichment Fix:

• Fixed critical path extraction bug in metadata enrichment pipeline

• Phase 2-3 enrichment now working: tier classification + disaggregations

• Previously: 37/38 tests passing (SYNC-02 failed with "enrichment incomplete")

• Now: 38/38 tests passing in 10m 17s

Technical Details:

• Root cause: Incorrect directory path extraction from YAML file paths

• Solution: Implemented forvalues loop to find rightmost slash properly

• Impact: Metadata synchronization pipeline fully operational

Enhanced Reliability:

• All enrichment phases complete successfully

• Improved YAML file path resolution

• Better error handling and diagnostics

What's New in v1.10.0 (18Jan2026)

Enhanced info() display: The info() option now shows SDMX dimension codes
alongside human-readable values, enabling direct use in API queries.

New info() features:

• Shows both values and SDMX codes (e.g., "M, F, _T (total)" for SEX)

• Displays clickable API Query URL for testing in browser

• Shows full URN for SDMX identification

• Excludes technical dimensions (UNIT_MEASURE) from disaggregations

Streamlined post-fetch display: After data retrieval, the indicator summary
is now concise with a clickable tip directing users to info() for full metadata.

SDMX dimension code reference:

SEX: M (Male), F (Female), _T (Total)

RESIDENCE: U (Urban), R (Rural), _T (Total)

WEALTH_QUINTILE: Q1, Q2, Q3, Q4, Q5, _T (Total)

AGE: Y0T4, Y5T9, Y10T14, Y15T17, etc.

EDUCATION_LEVEL: L0_2, L1, L2, L3 (ISCED levels)

Example: View full metadata with SDMX codes:

. unicefdata, info(ED_ANAR_L2)

What's New in v1.6.0 (12Jan2026)

Stata dataflow enhancements: Extended support for COD, TRGT, SPP, and WT indicator prefixes
with automatic dataflow detection. Expanded PT subdataflows to include child marriage (PT_CM)
and female genital mutilation (PT_FGM) indicators.

New prefix-to-dataflow mappings:

COD - Maps to CAUSE_OF_DEATH dataflow (18+ health indicators)

TRGT - Maps to CHILD_RELATED_SDG dataflow

SPP - Maps to SOC_PROTECTION dataflow

WT - Maps to PT dataflow (child labor indicators)

PT subdataflow support:

Extended PT fallback sequence: PT → PT_CM → PT_FGM → CHILD_PROTECTION → GLOBAL_DATAFLOW

Enables indicators like PT_CM_EMPLOY_12M (168 observations)

Bug fixes:

Fixed fallback import bug that prevented re-import skip logic

Properly initializes fallback_used flag throughout indicator fetch

Testing: Cross-platform validation confirms Stata parity with Python performance
on all tested indicators (seed-42: 19 new successes, 0 regressions).

Example: Fetch child marriage employment indicator:

. unicefdata PT_CM_EMPLOY_12M, clear

. list if countryname == "Ghana" & year == 2020

What's New in v1.5.2 (06Jan2026)

wide_indicators enhancements: The wide_indicators reshape now creates
empty numeric columns for every requested indicator even when filtered data have zero
observations. This prevents "variable not found" reshape failures and keeps downstream code
reliable. Output columns always include:

lb - Lower confidence bound

ub - Upper confidence bound

status - Observation status code

status_name - Observation status

source - Data source

refper - Reference period

notes - Country notes

Note: All variables have descriptive labels accessible via describe or codebook.
Variable names are aligned with the R get_unicef() and Python unicef_api packages.

What's New in v1.5.1 (Dec2025)

wide_attributes option: New reshape option that creates columns with disaggregation
suffixes (e.g., CME_MRY0T4_T, CME_MRY0T4_M, CME_MRY0T4_F).

attributes() filter: New option to select specific attribute codes when using
wide_attributes. Example: attributes(_T _Q1 _Q5) keeps only total, poorest,
and richest quintiles.

What's New in v1.5.0 (Nov2025)

circa option: Find the closest available year for each country when the exact
requested year is not available. Enables cross-country comparisons when data
availability varies.

latest option: Automatically retrieve only the most recent observation for each
country-indicator combination.

What's New in v1.4.0 (Oct2025)

YAML metadata: Full integration with yaml package for indicator discovery
and validation. Metadata files synchronized with R and Python implementations.

Discovery commands enhanced:

unicefdata, search(keyword) - Search indicators by keyword

unicefdata, info(indicator) - Get indicator details and supported disaggregations

unicefdata, flows - List all available dataflows

What's New in v1.3.0 (Sep2025)

wide_indicators option: Reshape multiple indicators into separate columns for
cross-indicator analysis.

addmeta() option: Add country metadata columns (region, income_group, etc.)
to downloaded data.

wide option: Reshape years into columns (yr2015, yr2016, etc.) for time-series
analysis.

Earlier Versions

v1.0.0: Initial internal release with basic download functionality, country and year filtering, disaggregation options. (2024)}

Author

Joao Pedro Azevedo, UNICEF

jpazevedo@unicef.org

https://jpazvd.github.io/

Return to main help file