Skip to content

Fetch various public RIVM pollution data and convert to influx line protocol

Notifications You must be signed in to change notification settings

Phaze-III/rivm2influxdb

Repository files navigation

rivm2influxdb

Fetch various public RIVM pollution data and convert to influx line protocol

Requirements

Tested on Linux and BSD (Mac OSX and FreeBSD)

Dependencies

Usage

  • Create a new InfluxDB with 'create database rivm'
  • Modify the DataDir and INFLUXDB-settings in get-rivm-*.sh as needed
  • Modify the StartDay and StopDay-settings in get-rivm-data-per-day.sh and run the script to fetch historical data from all stations
  • Run get-rivm-hourly-data.sh to fetch the last 4 hours of data from all stations in your hourly cron (not all stations are updated within an hour so to be safe 3 hours of data is refetched, duplicates are handled by InfluxDB)

If you have your own particle dust sensor registered on one of the community projects (e.g. Luftdaten) you can use the get-samenmeten-daily-data.sh script to fetch the hourly averages, including 'calibrated' PM data for your sensor.

  • Go to https://samenmeten.rivm.nl/dataportaal/ and locate your sensor on the map
  • Get the sensor ID by hoovering over the sensor
  • Put the ID in get-samenmeten-daily-data.sh
  • Create a new InfluxDB with 'create database samenmeten'
  • Modify the DataDir and INFLUXDB-settings in get-samenmeten-daily-data.sh as needed

The get-samenmeten-daily-data.sh can be run from your daily cron. Data is made available on a daily basis in the morning of the next day (after 6 AM local Dutch time appears to be fine). The script fetches all available data from 'yesterday' from your sensor but only sends the PM-data (raw and calibrated) to InfluxDB.

  • Use -h or --history to bulk fetch all historical data for your sensor.
  • Use -a or --all to store all measurements instead of only PM-data.
  • Use -n or --none to only fetch the data, no conversion and storing into InfluxDB

Additional info

Acknowledgements

About

Fetch various public RIVM pollution data and convert to influx line protocol

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published