Metadata-Version: 2.4
Name: air-pollution
Version: 0.2.2
Summary: Air pollution data collector
Author-email: Michael Blaß <m.blass@uke.de>
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Framework :: Pydantic :: 2
Classifier: Framework :: Pytest
Classifier: Typing :: Typed
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
Classifier: Intended Audience :: Healthcare Industry
Classifier: Intended Audience :: Science/Research
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: hishel>=0.1.2
Requires-Dist: httpx-limiter>=0.2.0
Requires-Dist: httpx>=0.28.1
Requires-Dist: pydantic>=2.11.3
Requires-Dist: ratelimit>=2.2.1
Dynamic: license-file

# de.uke.iam.air-pollution
Collect air pollution measures from multiple APIs.

## Example 1
Use data from the Umwelt Bundesamt (UBA)

```python
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

```python
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)
```
