Created
June 22, 2023 13:31
-
-
Save dewomser/121bef88b5df46f08c65ca3837ef175f to your computer and use it in GitHub Desktop.
API Luftqualität deutsche Messstationen der Länder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ba=https://www.umweltbundesamt.de | |
readarray -td ";" lq <<< $(curl "$ba/api/air_data/v3/airquality/csv?date_from=$(date -d 'yesterday' +%F)&time_from=24&date_to=$(date +%F)&time_to=24&station=1460&lang=de" |grep -E x\|$(date -d '1 hours ago' +%H)) | |
echo ${lq[1]}:${lq[7]};echo ${lq[2]}:${lq[8]};echo ${lq[3]}:${lq[9]};echo ${lq[4]}:${lq[10]};echo ${lq[5]}:${lq[11]};echo ${lq[6]}:${lq[12]} | |
#Messtationen gibts hier: | |
#https://www.umweltbundesamt.de/daten/luft/luftdaten/stationen/ | |
#Messtationcode kopieren und in Zeile 3 ersetzen |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Für Worms hab ich das getestet und es funktioniert