Metadata-Version: 2.4
Name: LCZ4py
Version: 0.1.0
Summary: Python port of LCZ4r — tools for downloading, processing, and visualizing Local Climate Zone (LCZ) maps (Stewart & Oke 2012).
Author-email: Max Anjos <max.anjos@ufrn.br>
License: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: rasterio>=1.3.9
Requires-Dist: geopandas>=0.14.0
Requires-Dist: pyogrio>=0.7.0
Requires-Dist: shapely>=2.0.0
Requires-Dist: polars>=0.20.0
Requires-Dist: pyarrow>=14.0.0
Requires-Dist: numpy>=1.26.0
Requires-Dist: plotly>=5.18.0
Requires-Dist: scipy>=1.11.0
Requires-Dist: httpx>=0.26.0
Requires-Dist: aiohttp>=3.9.0
Requires-Dist: asyncio-throttle>=1.0.2
Requires-Dist: aiofiles>=23.0.0
Requires-Dist: nest_asyncio>=1.5.0
Requires-Dist: tenacity>=8.0.0
Requires-Dist: rioxarray>=0.15.0
Requires-Dist: requests>=2.31.0
Requires-Dist: tqdm>=4.66.0
Requires-Dist: diskcache>=5.6.0
Requires-Dist: matplotlib>=3.8.0
Provides-Extra: viz
Requires-Dist: datashader>=0.16.0; extra == "viz"
Requires-Dist: holoviews>=1.18.0; extra == "viz"
Requires-Dist: colorcet>=3.1.0; extra == "viz"
Requires-Dist: contextily>=1.5.0; extra == "viz"
Provides-Extra: geoarrow
Requires-Dist: geoarrow-c>=0.1.0; extra == "geoarrow"
Requires-Dist: geoarrow-pyarrow>=0.1.0; extra == "geoarrow"
Requires-Dist: geoarrow-pandas>=0.1.0; extra == "geoarrow"
Provides-Extra: duckdb
Requires-Dist: duckdb>=1.0.0; extra == "duckdb"
Provides-Extra: zonal
Requires-Dist: exactextract>=0.3.0; extra == "zonal"
Provides-Extra: interp
Requires-Dist: pykrige>=1.7.0; extra == "interp"
Requires-Dist: scikit-learn>=1.3.0; extra == "interp"
Provides-Extra: ucp
Requires-Dist: xarray>=2023.1.0; extra == "ucp"
Requires-Dist: dask>=2023.1.0; extra == "ucp"
Provides-Extra: lst
Requires-Dist: pystac-client>=0.8.0; extra == "lst"
Requires-Dist: planetary-computer>=1.0.0; extra == "lst"
Requires-Dist: h5netcdf>=1.3.0; extra == "lst"
Requires-Dist: h5py>=3.10.0; extra == "lst"
Provides-Extra: era5-global
Requires-Dist: cdsapi>=0.7.0; extra == "era5-global"
Provides-Extra: all
Requires-Dist: LCZ4py[duckdb,era5-global,geoarrow,interp,lst,ucp,viz,zonal]; extra == "all"
Dynamic: license-file

# LCZ4py

Python port of [LCZ4r](https://github.com/ByMaxAnjos/LCZ4r) — tools for downloading, processing, and
visualizing Local Climate Zone (LCZ) maps (Stewart & Oke 2012) and applying them to urban climate
analysis (air temperature, land surface temperature, UHI, thermal comfort).

Reference: Anjos, M. et al. (2025). *LCZ4r: An open-source R package for calculating local climate
zone products*. Scientific Reports. https://www.nature.com/articles/s41598-025-92000-0

## Install

```bash
pip install -e .            # core
pip install -e ".[all]"     # + optional extras (viz, geoarrow, duckdb, zonal, interp, ucp, lst, era5-global)
```

## Usage

```python
from LCZ4py import lcz_get_map, lcz_plot_map, lcz_get_parameters

map_path = lcz_get_map(city="Berlin", isave_map=True)
```

## Structure

Functions are grouped following the LCZ4r paper's categorisation:

- `LCZ4py.general` — LCZ map/raster acquisition, morphological parameters, gridded environmental
  data (LST, CHIRPS, ERA5, PDSI, pollution), area/index statistics.
- `LCZ4py.local` — station/point-based air-temperature time series, anomalies, UHI (air + surface),
  spatial interpolation, variograms, thermal comfort, drought indices.
- `LCZ4py._internal` — shared helpers (downloader/cache/i18n/grid base). Not public API.

## Testing

```bash
pytest tests/
python test.py   # end-to-end usage example (downloads a real LCZ map)
```
