EarthDaily Agriculture๐
earthdaily-agriculture is a Python toolkit for bulk analytics extraction from the
EarthDaily Agriculture APIs โ vegetation-index time series, weather, crop detection,
disease risk, emergence/harvest, scoring, and more. Every analytic is exposed as an
extractor that turns a DataFrame of fields (id + geometry + optional crop/dates)
into a tidy results DataFrame, with shared token management, column mapping, parallel
bulk processing, optional caching, and HTML reporting.
Install๐
The package installs into the shared earthdaily namespace, alongside sibling packages
such as earthdaily-earthone.
Python 3.10โ3.12 is supported.
Quick start๐
from earthdaily.agriculture.services.workflow_manager import WorkflowManager
from earthdaily.agriculture.extractors.coverage_function import CoverageExtractor
import pandas as pd
# 1. Authenticate + load config (reads credentials from the environment / .env)
manager = WorkflowManager("prod")
# 2. A DataFrame of fields โ minimally an id + a WKT geometry
entities = pd.DataFrame([
{"id": "field_001", "geometry": "POLYGON ((...))"},
])
# 3. Configure an extractor and run it in bulk
coverage = CoverageExtractor(manager.bearer_token, manager.token_expiration, config=manager.config)
coverage.setup_coverage_parameters(vegetation_index="NDVI", start_date="2025-01-01", clear_cover_min=95)
results = coverage.process_entity_coverage_bulk_parallel(entity_list=entities, max_workers=5)
Every extractor follows the same shape: __init__(token, expiration, config) โ
setup_<type>_parameters(...) โ process_<type>_bulk_parallel(entity_list=...).
Where to go next๐
- Quick start โ install, scaffold a project, first extraction
- DataFrame 101 โ the entity DataFrame and column mapping
- Extractor parameters ยท column mapping ยท KPIs
- Optimizing extractor output โ Parquet, lean columns, and manifests: a regional case study turning a 16 GB CSV into ~22 MB, losslessly
- Workflow architecture โ chaining extractors with
WorkflowManager - API reference โ auto-generated from the source docstrings