Metadata-Version: 2.4
Name: cosecha
Version: 0.1.1
Summary: Tools for harvesting earth observation data for use in flood forecasting.
Project-URL: Changelog, https://github.com/dewberry/cosecha/blob/main/CHANGELOG.md
Project-URL: CI, https://github.com/dewberry/cosecha/actions
Project-URL: Documentation, https://dewberry.github.io/cosecha
Project-URL: Homepage, https://dewberry.github.io/cosecha
Project-URL: Issues, https://github.com/dewberry/cosecha/issues
Author-email: Seth Lawler <slawler@dewberry.com>, Stevenray Janke <sjanke@dewberry.com>
License: MIT
License-File: AUTHORS.md
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: cfgrib
Requires-Dist: dataretrieval
Requires-Dist: eccodes
Requires-Dist: h5netcdf>=1.2
Requires-Dist: h5py>=3
Requires-Dist: httpx>=0.24
Requires-Dist: icechunk>=0.1
Requires-Dist: pandas>=2
Requires-Dist: pyarrow>=12
Requires-Dist: pyiceberg>=0.5
Requires-Dist: s3fs
Requires-Dist: sqlalchemy
Requires-Dist: xarray>=2025.11
Requires-Dist: zarr>=3
Provides-Extra: dev
Requires-Dist: geopandas>=1; extra == 'dev'
Requires-Dist: git-cliff; extra == 'dev'
Requires-Dist: ipykernel; extra == 'dev'
Requires-Dist: ipywidgets; extra == 'dev'
Requires-Dist: jupytext; extra == 'dev'
Requires-Dist: matplotlib; extra == 'dev'
Requires-Dist: nbconvert; extra == 'dev'
Requires-Dist: pandas-stubs; extra == 'dev'
Requires-Dist: scipy-stubs; extra == 'dev'
Requires-Dist: types-geopandas; extra == 'dev'
Requires-Dist: types-pyyaml; extra == 'dev'
Requires-Dist: types-shapely; extra == 'dev'
Provides-Extra: docs
Requires-Dist: jupytext; extra == 'docs'
Requires-Dist: mike>=2; extra == 'docs'
Requires-Dist: mkdocs-jupyter>=0.26.1; extra == 'docs'
Requires-Dist: mkdocs-materialx>=10.1.1; extra == 'docs'
Requires-Dist: mkdocs>=1.6; extra == 'docs'
Requires-Dist: mkdocstrings[python]>=0.27; extra == 'docs'
Requires-Dist: ruff; extra == 'docs'
Provides-Extra: lint
Requires-Dist: codespell; extra == 'lint'
Requires-Dist: pre-commit; extra == 'lint'
Provides-Extra: nwp
Requires-Dist: herbie-data>=2026.3; extra == 'nwp'
Provides-Extra: test
Requires-Dist: boto3; extra == 'test'
Requires-Dist: coverage[toml]; extra == 'test'
Requires-Dist: moto[s3]; extra == 'test'
Requires-Dist: pytest-cov; extra == 'test'
Requires-Dist: pytest-mock; extra == 'test'
Requires-Dist: pytest-sugar; extra == 'test'
Provides-Extra: typecheck
Requires-Dist: pandas-stubs; extra == 'typecheck'
Requires-Dist: pyright; extra == 'typecheck'
Requires-Dist: scipy-stubs; extra == 'typecheck'
Requires-Dist: types-geopandas; extra == 'typecheck'
Requires-Dist: types-pyyaml; extra == 'typecheck'
Requires-Dist: types-shapely; extra == 'typecheck'
Description-Content-Type: text/markdown

# Cosecha

Tools for harvesting earth observation data for use in flood forecasting.

Cosecha provides a flexible pipeline for collecting geospatial data from multiple
sources and writing to various formats with optional transformations.

## Features

- Time-series data collection (USGS NWIS streamflow, stage, precipitation)
- Gridded data support (HRRR, RRFS, RTMA via herbie; MRMS via S3)
- Multiple output formats: Parquet, NetCDF, Zarr, Iceberg, IceChunk
- Data transformations: unit conversion, spatial subsetting, variable selection/rename
- Cross-platform support (ecCodes C library required for GRIB2/MRMS)

## Installation

```console
pip install cosecha
```

With optional dependencies for NWP (HRRR, RRFS) support:

```console
pip install 'cosecha[nwp]'
```

**Note:** Cosecha depends on the [ecCodes](https://confluence.ecmwf.int/display/ECC) C
library for reading GRIB2 data (used by MRMS). When installing with pip, you must have
ecCodes available on your system. The easiest cross-platform approach is to install it
via conda-forge:

```console
conda install -c conda-forge eccodes
pip install cosecha
```

Or use [pixi](https://pixi.sh) which handles this automatically:

```console
pixi add cosecha
```

## Quick Start

```python
from cosecha import USGSNWISReaper

# Fetch USGS streamflow data
reaper = USGSNWISReaper(
    site_ids=["01650000"],
    start_date="2026-01-01",
    end_date="2026-01-31",
    parameter_code="00060",
)

# Execute
data = reaper.reap()

# Write to Parquet
path = reaper.sow_to_parquet(file_path="./data/streamflow.pq")
```

## Documentation

Full documentation at <https://dewberry.github.io/cosecha/>

## Contributing

Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.

## License

MIT License. See [LICENSE](LICENSE.md) for details.
