Skip to main content

Air pollution data collector

Project description

de.uke.iam.air-pollution

Collect air pollution measures from multiple APIs.

Example 1

Use data from the Umwelt Bundesamt (UBA)

from datetime import datetime

from air_pollution.uba import UBAClient
import polars as pl


client = UBAClient()

# plot hourly NO2 values measured at station 'DENW124' between January and February 2019 
rsp = client.get_measures(
    datetime(2019, 1, 1, 0, 0),
    datetime(2019, 2, 1, 0, 0),
    "DENW134",
    5,
    2
)
df = pl.DataFrame(rsp.data)
df.plot.line(x='date_start', y='value').properties(width=600)

Example 2

Use data from the Hamburger Luftmessnetz

Display monthly PM10 data.

import air_pollution.luftmessnetz as lmn
import polars as pl


client = lmn.LuftmessnetzClient()

res = client.get_component_data("pm10_1m")
res = pl.DataFrame(res)

res.plot.line(x='datetime', y='value', color='station').properties(width=800, height=400)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

air_pollution-0.2.2.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

air_pollution-0.2.2-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file air_pollution-0.2.2.tar.gz.

File metadata

  • Download URL: air_pollution-0.2.2.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.12 {"installer":{"name":"uv","version":"0.9.12"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for air_pollution-0.2.2.tar.gz
Algorithm Hash digest
SHA256 5d081b5c1934e0d0f691994097622eef8f8f869e89d7f4246b718332cd4aea67
MD5 e9ee29ebb311e9f767c89a3e09a3c577
BLAKE2b-256 87a6517df7a9246fc98cc036fe3be1e8cf1eb3b97a576abf052b9cf13ce8dfb8

See more details on using hashes here.

File details

Details for the file air_pollution-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: air_pollution-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 18.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.12 {"installer":{"name":"uv","version":"0.9.12"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for air_pollution-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 75159942efcda5f98e57fb72dfd2bd9261b5eb2f1019518edf1c16bf7a5e7dcd
MD5 5eb47173fa2dc902eb0ccdae6595802f
BLAKE2b-256 10ee447bd9fc57ceb40ae29eb34cfa1c2ec4f1b63499dbe1138df85d73fc7d26

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page