Skip to main content

Luftdatenpumpe

Luftdatenpumpe logo

Acquire and process live and historical air quality data without efforts.

https://assets.okfn.org/images/ok_buttons/oc_80x15_blue.png https://assets.okfn.org/images/ok_buttons/od_80x15_red_green.png https://assets.okfn.org/images/ok_buttons/ok_80x15_red_green.png https://assets.okfn.org/images/ok_buttons/os_80x15_orange_grey.png


About

Acquire and process live and historical air quality data without efforts.

Filter by station-id, sensor-id and sensor-type, apply reverse geocoding, store into time-series and RDBMS databases (InfluxDB and PostGIS), publish to MQTT, output as JSON, or visualize in Grafana.

Data sources: Sensor.Community (luftdaten.info), IRCELINE, and OpenAQ.

Features

  1. Luftdatenpumpe acquires the measurement readings either from the livedata API of luftdaten.info or from its archived CSV files published to archive.luftdaten.info. To minimize impact on the upstream servers, all data gets reasonably cached.

  2. While iterating the readings, it optionally filters on station-id, sensor-id or sensor-type and restrains information processing to the corresponding stations and sensors.

  3. Then, each station’s location information gets enhanced by

    • attaching its geospatial position as a Geohash.

    • attaching a synthetic real-world address resolved using the reverse geocoding service Nominatim by OpenStreetMap.

  4. Information about stations can be

    • displayed on STDOUT or STDERR in JSON format.

    • filtered and transformed interactively through jq, the swiss army knife of JSON manipulation.

    • stored into RDBMS databases like PostgreSQL using the fine dataset package. Being built on top of SQLAlchemy, this supports all major databases.

    • queried using advanced geospatial features when running PostGIS, please follow up reading the Luftdatenpumpe PostGIS tutorial.

  5. Measurement readings can be

    • displayed on STDOUT or STDERR in JSON format, which allows for piping into jq again.

    • forwarded to MQTT.

    • stored to InfluxDB and then

    • displayed in Grafana.

Synopsis

# List networks
luftdatenpumpe networks

# List LDI stations
luftdatenpumpe stations --network=ldi --station=49,1033 --reverse-geocode

# Store list of LDI stations and metadata into RDBMS database (PostgreSQL), also display on STDERR
luftdatenpumpe stations --network=ldi --station=49,1033 --reverse-geocode --target=postgresql://luftdatenpumpe@localhost/weatherbase

# Store LDI readings into InfluxDB
luftdatenpumpe readings --network=ldi --station=49,1033 --target=influxdb://luftdatenpumpe@localhost/luftdaten_info

# Forward LDI readings to MQTT
luftdatenpumpe readings --network=ldi --station=49,1033 --target=mqtt://mqtt.example.org/luftdaten.info

For a full overview about all program options including meaningful examples, you might just want to run luftdatenpumpe --help on your command line, or visit the Luftdatenpumpe usage documentation section.

Screenshots

Luftdaten-Viewer displays stations and measurements from luftdaten.info (LDI) in Grafana.

Map display and filtering

  • Filter by different synthesized address components and sensor type.

  • Display measurements from filtered stations on Panodata Map Panel.

  • Display filtered list of stations with corresponding information in tabular form.

  • Measurement values are held against configured thresholds so points are colored appropriately.

https://community.hiveeyes.org/uploads/default/original/2X/f/f455d3afcd20bfa316fefbe69e43ca2fe159e62d.png

Map popup labels

  • Humanized label computed from synthesized OpenStreetMap address.

  • Numeric station identifier.

  • Measurement value, unit and field name.

https://community.hiveeyes.org/uploads/default/original/2X/4/48eeda1a1d418eaf698b241a65080666abcf2497.png

Installation

If you are running Python 3 already, you can installing the program using pip. We recommend to use a Python virtualenv.

pip install luftdatenpumpe --upgrade

At this point, you should be able to conduct simple tests like luftdatenpumpe stations as seen in the synopsis section above. At least, you should verify the installation succeeded by running:

luftdatenpumpe --version

At install Luftdatenpumpe, you will find more detailed installation instructions about how to install and configure auxiliary services, and eventually resolve some prerequisites.

Luftdaten-Viewer

About

Using Luftdatenpumpe, you can build user-friendly interactive GIS systems on top of PostGIS, InfluxDB and Grafana. This setup is called “Luftdaten-Viewer”, and some example scenarios can be inspected at Luftdatenpumpe gallery.

Instructions

These installation instructions outline how to setup the whole system to build similar interactive data visualization compositions of map-, graph- and other panel-widgets like outlined in the “Testimonials” section.

Other projects

Sensor.Community public data aggregator

Visualize recent sensor data on a world map for Sensor.Community and for different other official networks, like EEA, Luchtmeetnet, Atmo AURA/Sud/Occitanie, and Umweltbundesamt.

Project information

Contributions

Any kind of contribution, feedback, or patch, is much welcome. Create an issue or submit a patch if you think we should include a new feature, or to report or fix a bug.

Resources

License

The project is licensed under the terms of the GNU AGPL license, see LICENSE.

Content attributions

The copyright of particular images and pictograms are held by their respective owners, unless otherwise noted.

Metadata

Release files for luftdatenpumpe 0.22.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for luftdatenpumpe 0.22.0
File Size Uploaded
luftdatenpumpe-0.22.0.tar.gz 70.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for luftdatenpumpe 0.22.0
File Interpreter ABI Platform
luftdatenpumpe-0.22.0-py3-none-any.whl Python 3 none any Details

Total release size: 142.7 kB

Release files / luftdatenpumpe-0.22.0.tar.gz

Download URL luftdatenpumpe-0.22.0.tar.gz
Size 70.4 kB
Tags Source
SHA-256 checksum
How to use checksums
4aa9b9486b3f9ae262cbf4bad6f12a6d9431030a3287151b2692f078426209fe
BLAKE2b-256 checksum
How to use checksums
874c6807a62f2d82f3b7cf877cb75b16788e3000b76331cd7a3802967511eacc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Release files / luftdatenpumpe-0.22.0-py3-none-any.whl

Download URL luftdatenpumpe-0.22.0-py3-none-any.whl
Size 72.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1654dc5d966998b398f2f45149406a8d187860418b6315093030f0cbbc616041
BLAKE2b-256 checksum
How to use checksums
ceaa5208841178133a7c3a2065486a974297f65f2097a1718af7583ddc7bfaec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Release history Release notifications | RSS feed

This release

0.22.0 This release

2 release files

0.20.2

1 release file

0.20.1

1 release file

0.20.0

1 release file

0.19.1

1 release file

0.19.0

1 release file

0.18.2

1 release file

0.18.1

1 release file

0.18.0

1 release file

0.17.0

1 release file

0.16.0

1 release file

0.14.1

1 release file

0.14.0

1 release file

0.13.0

1 release file

0.12.1

1 release file

0.12.0

1 release file

0.11.0

1 release file

0.10.0

1 release file

0.9.0

1 release file

0.8.2

1 release file

0.8.1

1 release file

0.8.0

1 release file

0.7.0

1 release file

0.6.0

1 release file

0.5.0

1 release file

0.4.3

1 release file

0.4.2

1 release file

0.4.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page