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
pip install cosecha
With optional dependencies for NWP (HRRR, RRFS) support:
pip install 'cosecha[nwp]'
Note: Cosecha depends on the ecCodes 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:
conda install -c conda-forge eccodes
pip install cosecha
Or use pixi which handles this automatically:
pixi add cosecha
Quick Start
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 for details.
License
MIT License. See LICENSE for details.
Metadata
Release files for cosecha 0.4.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cosecha-0.4.3.tar.gz | 427.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cosecha-0.4.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 455.1 kB
Release files / cosecha-0.4.3.tar.gz
| Download URL | cosecha-0.4.3.tar.gz |
|---|---|
| Size | 427.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9d87950de57cfc25ca8a8250a000460fbe89e3b77c657859f3e6b11ef87cd13f
|
|
BLAKE2b-256 checksum How to use checksums |
9005bccd8ffc2b6453148998d205603a7efaf87138d07687e2bb7e4f581b6497
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.
Transparency logRelease files / cosecha-0.4.3-py3-none-any.whl
| Download URL | cosecha-0.4.3-py3-none-any.whl |
|---|---|
| Size | 28.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9710bb6a36633fd58d560a6d40281e67122fd839e948934db7e6467c1df95651
|
|
BLAKE2b-256 checksum How to use checksums |
51705d5fa0b980aa4139c050081f26e2ffaeee7bf63d9c91870699ab89c46432
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.
Transparency log