Manage data and system settings
Upload JSON files from Chicago Health Atlas to import data into the database. This tool allows you to manually import ZIP codes, health indicators, and indicator data from files obtained directly from the Chicago Health Atlas API.
Download the JSON file from:
https://chicagohealthatlas.org/api/v1/geographies/?type=zip_code&format=json
Download the JSON file from:
https://chicagohealthatlas.org/api/v1/indicators/?format=json
Create a JSON file with an array of objects with the following structure:
[ { "zipCode": "60601", "indicator": "diabetes-prevalence", "period": "2020", "value": 8.5, "unit": "%", "source": "Chicago Health Atlas", "note": "Age-adjusted" } ]
You can use the Chicago Health Atlas API to get indicator data for a specific ZIP code:
https://chicagohealthatlas.org/api/v1/data/?geography_slug=60601&indicator_slug=diabetes-prevalence&format=json
This admin tool is for manual imports. For automatic imports or handling large datasets, you can use the command-line tools directly:
# Import ZIP codes from API node scripts/import-data.js import-zip-codes-api # Import ZIP codes from a file node scripts/import-data.js import-zip-codes-file path/to/file.json # Import indicators from a file node scripts/import-data.js import-indicators-file path/to/file.json # Import indicator data from a file node scripts/import-data.js import-data-file path/to/file.json
For production environments, consider setting up a cron job or scheduled task to automatically import data on a regular basis.
Suggested questions: