A lightweight FOSS starter to align climate datasets with local systems like DHIS2. Built for standard LAMP hosting (Linux/Apache/MySQL/PHP 8+), with a Material Design UI (MaterializeCSS).
- Connectors: Open-Meteo (no key) and NASA POWER (no key) with PHP cURL
- Demo data & MySQL schema (org units w/ centroids, climate values)
- ETL: fetch → transform (daily aggregates) → store
- DHIS2 push via Web API (
/api/dataValueSets) with dry-run toggle - Simple admin UI to run jobs and preview outgoing payloads
- Built-in Swagger UI explorer for the REST-style climate payloads
- Create a MySQL database and user.
- Import schema and demo data:
mysql -u <user> -p <db> < sql/schema_mysql.sql
- Copy configuration and edit credentials:
cp config/sample.env.php config/env.php
- Deploy the
public/folder under your Apache vhost DocumentRoot (or point vhost to it). - Ensure
tmp/is writable by the web server user. - Visit the app (e.g.,
https://yourserver/) and click Run Daily Ingest. - Explore the machine-to-machine contract via
/swagger.phpand download the OpenAPI document for integration work.
# Every day at 01:30
30 1 * * * php /var/www/openclimate-dhis-php/scripts/ingest.php >> /var/log/openclimate-dhis.log 2>&1
This starter has no auth by default. Protect /public/ with your SSO or basic auth, or place it behind your DHIS2 admin network. Never expose job endpoints publicly in production.
Edit config/mappings.php to bind climate variables to DHIS2 dataElements/dataSet/orgUnit UIDs.
Apache-2.0