Entwicklung Luftdatenpumpe/IRCELINE

About

Im Rahmen unserer Reihe Umweltdaten - Hiveeyes und Datenmischwerk wird hier die Luftdatenpumpe für die Daten von IRCEL - CELINE: Das Feinstaubmeßnetzwerk der Belgischen Interregionalen Umweltagentur vorbereitet.

Prototypische Implementierung

Mit Luftdatenpumpe 0.14.1: luftdatenpumpe/irceline.py at 0.14.1 · earthobservations/luftdatenpumpe · GitHub.

IRCELINE stations

$ luftdatenpumpe stations --network=irceline | jq length

2019-04-24 00:44:49,669 [luftdatenpumpe.source         ] INFO   : Applying filter: {}
2019-04-24 00:44:49,672 [luftdatenpumpe.commands       ] INFO   : Acquiring list of stations from IRCELINE. source=api
2019-04-24 00:44:49,673 [luftdatenpumpe.source.irceline] INFO   : Requesting IRCELINE live API at http://geo.irceline.be/sos/api/v1/stations
2019-04-24 00:44:49,720 [luftdatenpumpe.commands       ] INFO   : Acquired #105 stations
2019-04-24 00:44:49,720 [luftdatenpumpe.commands       ] INFO   : Will publish data to ['json+stream://sys.stdout']
2019-04-24 00:44:49,720 [luftdatenpumpe.engine         ] INFO   : Configuring data sink "json+stream://sys.stdout" with domain "stations"
2019-04-24 00:44:49,720 [luftdatenpumpe.engine         ] INFO   : Emitting to target data sinks, this might take some time
2019-04-24 00:44:49,744 [luftdatenpumpe.engine         ] INFO   : Processed 105 records

106

Ingress format

As coming from the IRCELINE SOS REST API.

Egress format

As emitted from Luftdatenpumpe.

IRCELINE readings

… kommen scheinbar nur einmal pro Stunde rein. Ist vermutlich normal.

$ luftdatenpumpe readings --network=irceline --progress | jq length

2019-05-24 22:48:12,029 [luftdatenpumpe.commands             ] INFO   : Acquiring readings from network "irceline" with source "api"
2019-05-24 22:48:12,138 [luftdatenpumpe.source.common        ] INFO   : Processing 106 items
100%|██████████████████████████████████████████████████████████████████████████████| 106/106 [00:00<00:00, 1374.45it/s]
2019-05-24 22:48:12,223 [luftdatenpumpe.source.irceline      ] INFO   : Requesting IRCELINE live API with timespan "PT12h/2019-05-24T22:00:00+02:00" and 529 timeseries
2019-05-24 22:48:12,223 [luftdatenpumpe.source.common        ] INFO   : Processing 529 items
 46%|████████████████████████████████████▏                                          | 242/529 [00:00<00:00, 401.08it/s]

106

SOS API

http POST 'http://geo.irceline.be/sos/api/v1/timeseries/getData' timeseries:='[6693]' timespan='PT3h/2019-04-24T01:00:00Z' --print bB
API Request/Response

Request

{
    "timeseries": [
        6693
    ],
    "timespan": "PT3h/2019-04-24T01:00:00Z"
}

Response

{
    "6693": {
        "values": [
            {
                "timestamp": 1556056800000,
                "value": 36.1
            },
            {
                "timestamp": 1556060400000,
                "value": 34.6
            },
            {
                "timestamp": 1556064000000,
                "value": 33.1
            },
            {
                "timestamp": 1556067600000,
                "value": "NaN"
            }
        ]
    }
}

Ingress format

As coming from the IRCELINE SOS REST API.

Egress format

As emitted from Luftdatenpumpe.

Luftdatenpumpe is now able to process air quality data coming from the 52°North Sensor Observation Service instance of the Belgian Interregional Environment Agency (IRCEL - CELINE) referenced above. If this sparks your interest, you might also enjoy visiting and exploring the respective staging system at https://vmm.hiveeyes.org/.

Getting from one to two data sources here was the most important thing the whole architecture needed before thinking about adding even more sources. While things like BLUME Feinstaub-Daten API im SOS Standard might be unlocked easily now, we are also looking at other APIs like Luchtmeetnet: Dutch air quality networks, PREV'AIR - Air information Ressource in France or UK AIR: Air Information Resource.

Dieses kleine Fundstück passt hier wahrscheinlich am besten hin.