diff --git a/scripts/un/sdg/README.md b/scripts/un/sdg/README.md index f829b4dc84..d2d4f24722 100644 --- a/scripts/un/sdg/README.md +++ b/scripts/un/sdg/README.md @@ -2,8 +2,23 @@ This import includes data from the [UN SDG Global Database](https://unstats.un.org/sdgs/dataportal). Data is read from the submodule `sdg-dataset` which is managed by UN Stats. Geography mappings are read from the submodule `sssom-mappings` which is also managed by UN Stats. Please ensure the submodules stay up to date. +## One-time Setup -To generate place mappings: +Initialize submodules: +``` +git submodule update --init --remote sdg-dataset +git submodule update --init --remote sssom-mappings +``` + +## Data Refresh + +Update submodules: +``` +git submodule update --remote sdg-dataset +git submodule update --remote sssom-mappings +``` + +Generate place mappings: ``` python3 geography.py ``` @@ -15,7 +30,7 @@ Produces: Note that the `place_mappings.csv` is required before running the `process.py` script. -To process data and generate artifacts: +Process data and generate artifacts: ``` python3 process.py ``` @@ -42,7 +57,7 @@ python3 -m unittest discover -v -s ../ -p "*_test.py" Notes: * We currently drop certain series and variables (refer to `util.py` for the list) which have been identified by UN as potentially containing outliers. -### SDMX +## SDMX As reference, we provide an earlier version of the import scripts that utilized the UN API (which uses SDMX) in the `sdmx/` folder. Please note that these scripts may have errors and do not use the most up-to-date schema format, so should only be used as an illustration of the SDMX -> MCF mapping and **should not actually be run**.