AgriScope-V0.1.1
Agricultural geospatial analysis toolkit extending GeoPandas.
Installation
pip install AgriScope
# With performance extras (Dask chunking support)
pip install "AgriScope[performance]"
Quickstart
import geopandas as gpd
import AgriScope # registers the .agri accessor
gdf = gpd.read_file("fields.geojson")
# NDVI
gdf = gdf.agri.compute_ndvi("red", "nir")
# Soil management zones
gdf = gdf.agri.soil_zones(n_clusters=4)
# Irrigation needs
gdf = gdf.agri.irrigation_needs(evapotranspiration=5.2, rainfall=2.1)
# Summary report
print(gdf.agri.summary())
CLI
# Compute NDVI
AgriScope compute-ndvi fields.geojson --red red --nir nir
# Soil zones
AgriScope soil-zones fields_ndvi.geojson --n-clusters 4
# Irrigation needs
AgriScope irrigation-needs fields_zones.geojson --et0 5.2 --rain 2.1
# Summary
AgriScope summary fields_final.geojson
# JSON output for pipeline use
AgriScope summary fields_final.geojson --json-output | jq .ndvi
Features
| Method | Description |
|---|---|
gdf.agri.compute_ndvi(red, nir) |
NDVI from column names or arrays |
gdf.agri.sample_raster(path, band) |
Sample raster at geometry locations |
gdf.agri.soil_zones(method, n_clusters) |
KMeans / DBSCAN / Agglomerative zoning |
gdf.agri.irrigation_needs(et0, rain) |
Water-balance irrigation recommendations |
gdf.agri.compute_ndvi_chunked(...) |
Chunked NDVI for very large datasets |
gdf.agri.summary() |
NDVI stats, zone distribution, irrigation counts |
Project Structure
geopandas_agri/
├── __init__.py # Package entry; registers accessor
├── accessor.py # Thin routing layer (@pd.api.extensions accessor)
├── ndvi.py # NDVI formula + raster sampling
├── soil.py # Clustering-based soil zonation
├── irrigation.py # Water-balance irrigation model
├── utils.py # Shared validation + numeric helpers
└── cli.py # Click CLI commands
Development
git clone https://github.com/your-org/AgriScope-V1
cd AgriScope
pip install -e ".[dev]"
pytest
Roadmap / Future Extensions
-
Crop classification — integrate satellite time-series (Sentinel-2 / Landsat) with a scikit-learn or LightGBM classifier to map crop types per field.
-
Yield prediction — regression models (XGBoost / neural nets) trained on historical NDVI trajectories, soil attributes, and weather data to predict per-field yield before harvest.
-
Climate data integration —
gdf.agri.attach_era5(date_range)to automatically download ERA5 reanalysis data (viacdsapi) and join precipitation, temperature, and wind speed to field geometries.
License
MIT © 2024 Agricultural GeoData Team
Metadata
Release files for agriscope 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agriscope-0.1.1.tar.gz | 19.8 kB | Without provenance | Details for agriscope-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agriscope-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for agriscope-0.1.1-py3-none-any.whl |
Total release size: 39.1 kB
Release files / agriscope-0.1.1.tar.gz
| Download URL | agriscope-0.1.1.tar.gz |
|---|---|
| Size | 19.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9257f366c9af0d80caedbe2221bb6f8173212097d93f5568023a3ba7fb5d8bde
|
|
BLAKE2b-256 checksum How to use checksums |
1bf13280b57a2c845c5df8cd15a5d4b18182e5935fa7b93989db13a8b054a5ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / agriscope-0.1.1-py3-none-any.whl
| Download URL | agriscope-0.1.1-py3-none-any.whl |
|---|---|
| Size | 19.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c9374ed6ec10cf01bdc8a038a7665a104ecf497ac9d968c994e6635f24953987
|
|
BLAKE2b-256 checksum How to use checksums |
e0672f5a7ba7eccb1e883811f5473216e46b65b475c73bf16d13c0825a6cad7a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Security for agriscope 0.1.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.