*! version 2.0.0 01Feb2026

Title

unicefdata_setup -- Install YAML metadata files for unicefdata

Syntax

unicefdata_setup
[, options]

Main
from(url) specify source URL for metadata files

replace overwrite existing files

verbose show detailed progress

Description

unicefdata_setup downloads and installs the YAML metadata files required
by the unicefdata command. These files contain indicator definitions,
dataflow mappings, country codes, and other metadata needed for the UNICEF
Data Warehouse API.

This command should be run once after installing the unicefdata package using
net install or ssc install. The metadata files are installed to
the ado/plus/_/ directory.

The following files are installed:

File Description

_unicefdata_dataflows.yaml Dataflow definitions

_unicefdata_indicators.yaml Indicator list

_unicefdata_codelists.yaml Code lists

_unicefdata_countries.yaml Country codes

_unicefdata_regions.yaml Region codes

_unicefdata_sync_history.yaml Sync history

_dataflow_index.yaml Dataflow index

_dataflow_fallback_sequences.yaml Fallback sequences

_unicefdata_indicators_metadata.yaml Full indicators metadata

_indicator_dataflow_map.yaml Indicator to dataflow mapping

_unicefdata_dataflow_metadata.yaml Dataflow dimensions

Options

Main

from(url) specifies an alternative source URL for the metadata files.
The default is the GitHub repository:
https://raw.githubusercontent.com/unicef-drp/unicefData/main/stata/src

For local installation from a development directory, use:
from("C:/GitHub/myados/unicefData-dev/stata/src")

replace overwrites existing metadata files. Without this option,
existing files are skipped.

verbose displays detailed progress information including the source
and destination paths.

Examples

Setup with default source (GitHub)

. unicefdata_setup

Setup with replace to update existing files

. unicefdata_setup, replace

Setup from local development directory

. unicefdata_setup, from("C:/GitHub/myados/unicefData-dev/stata/src") replace

Verbose mode showing all details

. unicefdata_setup, replace verbose

Stored results

unicefdata_setup stores the following in r():

Scalars

r(installed) number of files successfully installed

r(failed) number of files that failed to install

Macros

r(targetdir) directory where files were installed

Author

Joao Pedro Azevedo

UNICEF

jpazevedo@unicef.org

https://jpazvd.github.io/

Also see

Help: unicefdata, unicefdata_sync