This repository contains a work-in-progress version of the Amsterdam Schema. Currently, Amsterdam Schema is a set of JSON Schemas and meta-schamas. The goal of this project is to describe and validate open data published by the City of Amsterdam. Amsterdam Schema will be used to make the import, storage and publishing layers of our APIs more generic, easier to maintain, and better documented.
For more information, see:
- Werkbestand Team Dataservices (in Dutch)
- Amsterdam Schema Playground (in Dutch as well)
You can find a few draft JSON Schemas in the schemas
directory in this repository.
This repository also contains ETL scripts to import and convert data to conform to these schemas.
Note: all ETL scripts in this repository will output newline delimited JSON (NDJSON).
The data
directory contains some sample NDJSON files, the geojson
directory contains sample GeoJSON data.
To run the ETL scripts, first install the dependencies: npm install
Draft ETL script for Bouwdossiers dataset.
./etl/monumenten.js < /path/to/Import_AMISExport.xml > ./data/monumenten.ndjson
Draft ETL script for Milieuzones dataset.
Usage:
curl https://raw.githubusercontent.com/Amsterdam/various_small_datasets/master/src/milieuzones/data/milieuzones.json | ./etl/milieuzones.js > ./data/milieuzones.ndjson
Draft ETL script for Bouwdossiers dataset.
Usage:
./etl/bouwdossiers.js < /path/to/bouwdossiers/SAA_BWT_XML_20190417/SAA_BWT_01.xml > ./data/bouwdossiers.ndjson
Draft ETL script for Oplaadpunten dataset.
Usage:
./etl/oplaadpunten.js > ./data/oplaadpunten.ndjson
Run:
./tools/ndjson-to-geojson.js < ./data/oplaadpunten.ndjson | pbcopy
Now you can go to geojson.io and paste the data!