This repository holds the US data for SDG reporting. The data is served via a static http server.
The develop branch serves from the gh-pages
branch on this repository. This is for staging.
The master branch serves from the main deployment org and is for prod.
Loosely speaking with have: /<datatype>/<id>.<format>
and support csv and json file formats. You can also look at the file structure at https://github.com/GSA/sdg-data-usa/tree/gh-pages and it shows how it's all laid out.
We're planning for versioned APIs. Right now the root location is the latest API. Other versions will be available. For example the development branch of the API code will be available by adding dev
to the beginning of the path. e.g. /dev/<datatype>/<id>.<format>
.
The main data set, the raw data lives in /data-wide/
in the repo.
e.g. https://GSA.github.io/sdg-data-usa/data-wide/1-2-1.csv
At build time, this "wide" data is made "tidy" and put in the /data/
folder.
/data/<id>.<format>
/data/1-2-1.csv
/data/1-2-1.json
e.g. https://GSA.github.io/sdg-data-usa/data/1-2-1.json
/edges/1-2-1.csv
/edges/1-2-1.json
/comb/1-2-1.csv
/comb/1-2-1.json
/meta/<id>.json
At build time you'll need everything. Rather than making you download each indicator separately we have an ID of all
which you can use.
Headlines json comes formatted as records, instead of in list format.
/headline/<id>.<format>
/headline/all.json
The following is all metadata for all indicators in one blob for the build.
/meta/all.json
It's a JSON object with {<id>: <meta>}
pairs.
Scripts:
check_data.py
: Runs data and metadata checks and will prevent deployment if fails.build_data.py
: Builds main data, headline, and edges output in csv, and json.
Packages:
This uses the sdg
package from the sdg-build
repository during the build.
Data is under Creative Commons Zero v1.0 Universal.