geocif
Models to visualize and forecast crop conditions and yields
What it is and what it does
Geocif is a machine-learning toolkit for agricultural forecasting that ingests Earth observation (EO) data—satellite imagery, climate records, soil data—and derives climatic impact drivers (CIDs) to predict crop yields and monitor field conditions. It wraps a large ecosystem of geospatial (gdal, rasterio, fiona, shapely, pyproj, rtree) and ML libraries (catboost, xgboost, tabpfn, tabicl, ngboost) to automate the pipeline from raw EO extraction through model training to visualization and reporting.
The package is organized around configuration files (geobase.txt, countries.txt, crops.txt, geocif.txt) that define regions, crop calendars, extraction methods, and model settings. It provides runners for data preparation (via geoprepare), index calculation, ML training, agricultural meteorology monitoring, and yield outlook generation. It also includes cropmask optimizers (threshold-based and per-cell) to refine which agricultural areas are used in modeling, and supports multiple model architectures including gradient boosting and prior-fitted networks.
Use it for:
- Build regional crop yield forecasts by training ML models on historical yields and EO-derived climate indices.
- Monitor agricultural conditions and stress across growing seasons using agmet plots and climate metrics.
- Optimize cropland masks for a region by tuning threshold or per-cell inclusion rules to improve model accuracy.
- Generate annual yield outlooks and production reports with maps and accuracy scorecards for policy or market analysis.
- Experiment with different ML architectures (CatBoost, TabPFN, etc.) and feature sets to find the best forecasting model for a crop and region.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Generates climatic impact drivers from Earth observation data and builds machine-learning models to forecast crop yields and monitor agricultural conditions.
Yes, with conditions. Geocif is actively maintained and permissively licensed, making it suitable for agricultural forecasting research and operational monitoring. However, the 57 runtime dependencies—especially heavy geospatial and ML libraries—create substantial install complexity and disk footprint. Install only if you have a specific crop-yield or agricultural-monitoring use case and can manage the geospatial dependency chain (particularly on Linux/macOS). Not suitable for lightweight or embedded deployments.
Install
geocif on PyPI
pip
pip install geocifuv
uv add geocifpoetry
poetry add geocifInstalling geocif
Before you install
Low install friction with a wheel distribution, but carries 57 runtime dependencies including heavy geospatial libraries (gdal, rasterio, fiona, rtree) and machine-learning frameworks (catboost, xgboost, tabpfn, tabicl). Active maintenance (released 2 days ago) and requires Python 3.11+.
License in practice
MIT license is permissive—you can use, modify, and distribute geocif freely in commercial and private projects with minimal restriction.
Quickstart
# Install via uv (recommended)
uv sync
# Configure paths and settings
config_dir = "/path/to/config"
cfg_geocif = [f"{config_dir}/geobase.txt", f"{config_dir}/countries.txt", f"{config_dir}/crops.txt", f"{config_dir}/geocif.txt"]
# Run yield forecasting
from geocif import geocif_runner
geocomcif_runner.run(cfg_geocif)
Requires Python 3.11+. On Windows, uv automatically pulls pre-built geospatial wheels; on Linux/macOS, geospatial packages install from PyPI. Geospatial dependencies (gdal, rasterio, fiona, rtree) may require system libraries.
Verify before relying
- Whether the 57 runtime dependencies are all strictly required or if subsets can be used for specific workflows.
- Performance characteristics and typical runtime for large-scale regional yield forecasting.
- Data format requirements and expected input sizes for Earth observation datasets.
- Availability and format of pre-trained models or whether all models must be trained from scratch.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 57 — boruta, catboost, fiona, gdal, pyeogpr, pyproj, rasterio, rtree, shap, numba, shapiq, shapely, optuna, xarray, pooch, arrow, icclim, geoprepare, logzero, geopandas, tabpfn, tabicl, statsmodels, palettable, seaborn, scikit-misc, setuptools, choix, scienceplots, cartopy |
| Maintenance | actively maintained — 2 days since the last release |
| First released | |
| Downloads | 103,893/month — #12,778 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: geocif-0.4.908-py2.py3-none-any.whl
Keywords: geocif
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
regionmaskregionmask creates spatial masks for gridded…
permissive · top 15,000 on PyPI
earthaccessearthaccess searches, downloads, and streams…
permissive · top 15,000 on PyPI
datacubeDatacube provides an integrated gridded data…
permissive · top 15,000 on PyPI
prophetProphet forecasts time series data using an…
permissive · top 5,000 on PyPI
cartoboostCartoBoost is a Rust-backed gradient boosting…
permissive · top 15,000 on PyPI
earthengine-apiPython client library for Google Earth Engine,…
permissive · top 15,000 on PyPI
ydfYDF trains, evaluates, and interprets decision…
permissive · top 15,000 on PyPI
rio-cogeorio-cogeo creates and validates Cloud Optimized…
permissive · top 15,000 on PyPI
statsforecastStatsForecast provides fast implementations of…
permissive · top 5,000 on PyPI
geemapGeemap provides interactive geospatial analysis…
permissive · top 15,000 on PyPI