Skip to main content

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.

Download files

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

Source Distribution

cosecha-0.3.0.tar.gz (421.1 kB view details)

Uploaded Source

Built Distribution

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

cosecha-0.3.0-py3-none-any.whl (24.7 kB view details)

Uploaded Python 3

File details

Details for the file cosecha-0.3.0.tar.gz.

File metadata

  • Download URL: cosecha-0.3.0.tar.gz
  • Upload date:
  • Size: 421.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cosecha-0.3.0.tar.gz
Algorithm Hash digest
SHA256 5639f9291303bd4b071ddcb45d9e9460fe5673251e5315be4107522f568d392c
MD5 d0e4f262aee019d9f5f69a481ba8608e
BLAKE2b-256 49c391a6b774636024c083f22a1c93c89a59f860161d66ea638ac3044dc2daae

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosecha-0.3.0.tar.gz:

Publisher: release.yml on Dewberry/cosecha

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cosecha-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: cosecha-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 24.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cosecha-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 026749703c139d8f0bd4cb8d372efb97df657bc7f2ee1127e3897b92e48e091d
MD5 f901d319558abfca79e5f52821945b29
BLAKE2b-256 65bb18224bc7d40e2352069d5d060c0854b21523451916c4880940a6db057dbd

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosecha-0.3.0-py3-none-any.whl:

Publisher: release.yml on Dewberry/cosecha

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 files

0.2.1

2 files

0.2.0

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page