earthdaily-agriculture
Python client for bulk extraction of agricultural analytics — vegetation indices, weather, crop identification, disease risk, harvest detection, scoring and more — through the EarthDaily Agriculture API.
Who we are
Project description
·
Report Bug
·
Request Feature
Table of Contents
About The Project
EarthDaily Agriculture is the agriculture focused analytic division of EarthDaily Analytics. Learn more about EarthDaily at EarthDaily Analytics | Satellite imagery & Analytics for agriculture, insurance, surveillance. EarthDaily Agriculture uses satellite imagery to provide advanced analytics that mitigate risk and increase efficiencies — leading to more sustainable outcomes for the organizations and people who feed the planet.
Through the EarthDaily Agriculture services, we make geospatial analytics easy to browse and analyze, in our cloud or in your own environment. We give developers and data scientists flexibility and extensibility with analytic-ready data and digital-ag ready building blocks, allowing you to enrich your solutions with information at field, regional or continental level via our APIs and apps.
We have a team of experts around the world that understand local crops and the ag industry, as well as advanced analytics to support your business.
The earthdaily-agriculture Python package provides a ready-to-use library that lets any Python developer quickly experience EarthDaily Agriculture capabilities. It wraps the full analytics catalog, coverage, time series, weather, crop identification, emergence, harvest, scoring, sustainability, regional — behind a single consistent extractor API designed for bulk processing.
Features
- One consistent API across every extractor. Every extractor inherits from
BaseExtractorand follows the samesetup_<type>_parameters()→process_<type>_bulk_parallel()lifecycle. Learn one, you know them all. - Bulk parallel extraction. Configurable worker count, progress bars, partial saves, retry-on-failure, and an HTML run report out of the box (
generate_report=True). - Full analytics catalog. Foundational analytics (coverage, vegetation time series, weather, field-level maps, crop ID), crop-development signals (greenness, emergence, harvest, planted area, standing crop, disease, change index, in-season monitoring), risk scoring (historical & in-season score, ZARC), sustainability (bare soil, cover crop, tillage), and regional aggregates.
- Flexible entity sources. Pull entities from the EarthDaily Agriculture platform or from any GeoDataFrame / CSV / parquet of your own — a column-mapping system bridges naming differences.
- Workflow orchestration. Chain multiple extractors via a YAML workflow file;
WorkflowManagerruns the DAG with token refresh, partials, caching, and per-run reporting. - Local result cache. Per-extractor parquet cache keyed by parameter signature, skipping redundant API calls across reruns.
- Cloud-friendly output. Route results, partials, and logs to S3 or Azure Storage (or any S3-compatible store) via
EDAGRO_OUTPUT_PREFIXor constructor kwargs. - Entity & user management.
EntityManagerandUserManagercover the EarthDaily Agriculture MDM API (Farm / Field / Seasonfield, growers, agronomists, account linking).
See the documentation and the notebooks under notebooks/ for working examples.
Getting started
Prerequisites
Make sure you have valid credentials. If you need to get trial access, please register here.
This package requires Python 3.10 or newer and is tested on 3.10, 3.11, 3.12 and 3.13. Python 3.12.x is recommended and is the primary CI target.
Installation
Conda
If you are using Conda, create and activate a virtual environment first:
conda create --name edagro python=3.12
conda activate edagro
For Linux / Mac OS / Windows
pip install earthdaily-agriculture
The package is pure-Python and installs the same way on Linux, macOS, and Windows. For an editable / development install with notebook extras:
pip install -e ".[test,jupyter]"
Run the package from source
- Clone and install dependencies
git clone https://github.com/earthdaily/earthdaily-agriculture.git
cd earthdaily-agriculture
pip install -r requirements.txt
- Create a
.envfile
You need a .env file (e.g. at project root) with your credentials to run the example notebooks:
PROD_API_CLIENT_ID=
PROD_API_CLIENT_SECRET=
PROD_API_USERNAME=
PROD_API_PASSWORD=
For the preprod environment, use PREPROD_API_* variants. If you also want to route outputs to S3, set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.
- Install the Jupyter Notebook extras
pip install -e ".[jupyter]"
- Set up the Jupyter Notebook kernel
python -m ipykernel install --user --name edagro
- Open one of the example notebooks under
notebooks/and run it.
Usage
Initialise the workflow manager (handles auth, workspace directories, and token refresh):
from earthdaily.agriculture.services.workflow_manager import WorkflowManager
manager = WorkflowManager("prod")
Load entities — either from the EarthDaily Agriculture platform or from your own GeoDataFrame:
manager.load_seasonfields(
sowing_date_gte="2025-07-01",
crop_id="WINTER_OSR",
)
Build and run an extractor (here: a Medium-Resolution Time Series of LAI):
from earthdaily.agriculture.extractors.VTS_functions import MRTSExtractor
mrts = MRTSExtractor(
bearer_token=manager.bearer_token,
token_expiration=manager.token_expiration,
config=manager.config,
workflow_ref=manager,
)
mrts.setup_mrts_parameters(
start_date="2025-11-01",
end_date="2026-02-28",
vegetation_index="LAI",
clear_cover_min=95,
)
results = mrts.process_mrts_bulk_parallel(
entity_list=manager.sfd_list,
output_path=manager.output_result_dir,
max_workers=20,
prefix="mrts_lai",
generate_report=True,
)
print(results["results_df"].head())
Use the earthdaily.agriculture logger:
from loguru import logger
logger.enable("earthdaily.agriculture")
See the Jupyter notebooks under notebooks/ for end-to-end working examples per extractor.
Documentation
Full documentation lives at https://docs.earthdaily.com/agro/.
Pages you'll likely want first:
- Quick start — install, authenticate, first extraction.
- Extractor parameters reference — every
setup_*_parameters()argument. - Column mapping reference — adapt the extractor to your DataFrame's column names.
- KPI reference — aggregate time series into a single KPI per entity.
- Workflow architecture — YAML-driven multi-step pipelines.
- Deployment patterns — GitHub Actions cron or a Docker container on ECS / Cloud Run.
- Cloud storage — route outputs to S3.
- Caching — when and how to enable the local cache.
Resources
The following links provide more information:
Support development
If this project has been useful — if it helped you or your business save precious time — don't hesitate to give it a star.
License
Released under the MIT license. See LICENSE for the full text.
Contact
For any additional information, please email us.
Copyrights
© 2026 EarthDaily Analytics | All Rights Reserved.
Release files for earthdaily-agriculture 2.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| earthdaily_agriculture-2.6.0.tar.gz | 647.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| earthdaily_agriculture-2.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.1 MB
Release files / earthdaily_agriculture-2.6.0.tar.gz
| Download URL | earthdaily_agriculture-2.6.0.tar.gz |
|---|---|
| Size | 647.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
074fc7830174eba17fd007dd877ab9bdf6e39ae00430a362152eadb6b8fc4a5a
|
|
BLAKE2b-256 checksum How to use checksums |
f5d7acdb5f1d34f6f1ac666ca58923773bb08d812a994b1c1c80cc5ee109253c
|
| 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 25, 2026.
Transparency logRelease files / earthdaily_agriculture-2.6.0-py3-none-any.whl
| Download URL | earthdaily_agriculture-2.6.0-py3-none-any.whl |
|---|---|
| Size | 467.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6813a153d9424ac0e93dc5e07742a371ed3475680fcbe8959ae674f6c33081b0
|
|
BLAKE2b-256 checksum How to use checksums |
d52be0ec8de7d6ac5b8797dbd321196d5c002703b058b41853324a705fbe66cc
|
| 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 25, 2026.
Transparency log