{"id":23785,"library":"geocif","title":"GeoCIF","description":"GeoCIF provides models to visualize and forecast crop conditions and yields. Current version 0.4.556, released on a frequent cadence (multiple versions weekly).","status":"active","version":"0.4.556","language":"python","source_language":"en","source_url":"https://github.com/geocif/geocif","tags":["agriculture","crop-yield","forecasting","geospatial"],"install":[{"cmd":"pip install geocif","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Spatial data handling required for crop condition models","package":"geopandas","optional":false},{"reason":"Raster data I/O for yield forecast data","package":"rasterio","optional":false},{"reason":"Numerical operations","package":"numpy","optional":false},{"reason":"Visualization of crop condition maps","package":"matplotlib","optional":true}],"imports":[{"note":"Older internal module path; models are now under geocif.models","wrong":"from geocif.crop_condition import CropConditionModel","symbol":"CropConditionModel","correct":"from geocif.models import CropConditionModel"},{"note":"Direct import of function without module path fails","wrong":"import fetch_agdata","symbol":"fetch_agdata","correct":"from geocif.data import fetch_agdata"}],"quickstart":{"code":"from geocif.models import CropConditionModel\nfrom geocif.data import fetch_agdata\nimport os\n\n# Optionally set API key via environment variable\napi_key = os.environ.get('GEOCIF_API_KEY', '')\n\n# Fetch sample data\ndata = fetch_agdata(region='us', year=2023, api_key=api_key if api_key else None)\n\n# Initialize and run model\nmodel = CropConditionModel()\nresult = model.predict(data)\nprint(result.head())\n","lang":"python","description":"Loads agriculture data and runs a crop condition prediction model."},"warnings":[{"fix":"Update calls to include both region and year as keyword arguments, e.g., fetch_agdata(region='us', year=2023).","message":"In version 0.4.0, the API for data fetching changed: fetch_agdata now requires explicit region and year parameters; older calls with only 'region' as positional argument fail.","severity":"breaking","affected_versions":">=0.4.0"},{"fix":"Replace with from geocif.visualization import plot; plot(model_results).","message":"The function 'geocif.utils.plot_conditions' was deprecated in 0.4.500 and will be removed in 0.5.0. Use 'geocif.visualization.plot' instead.","severity":"deprecated","affected_versions":">=0.4.500,<0.5.0"},{"fix":"Ensure you are using Python 3.11 or later.","message":"GeoCIF requires Python >=3.11; installing on Python 3.10 will fail with cryptic distutils errors.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use correct import: from geocif.models import CropConditionModel","cause":"Using outdated import path from older version.","error":"ModuleNotFoundError: No module named 'geocif.crop_condition'"},{"fix":"Pass year parameter: fetch_agdata(region='us', year=2023)","cause":"fetch_agdata called without year parameter after API change in 0.4.0.","error":"ValueError: Missing required argument 'year'"},{"fix":"Use geocif.visualization.plot instead.","cause":"plot_conditions was deprecated and removed.","error":"AttributeError: module 'geocif.utils' has no attribute 'plot_conditions'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}