Brazilian agricultural data in QGIS with one click
QGIS 4 plugin that exposes agrobr library data as geospatial and tabular layers, with native Qt6 GUI.
Centralizes 24 Brazilian agricultural data sources (IBGE, CONAB, INPE, IBAMA, MapBiomas, etc.) in a single plugin, eliminating manual ETL, scattered downloads, and manual joins with municipal boundaries.
| Component | Version |
|---|---|
| QGIS | 4.0+ |
| Python | 3.12+ |
| agrobr | >=1.0.0,<2.0.0 |
QGIS 3.x is not supported. This plugin targets QGIS 4 / Qt6 exclusively.
- Open QGIS 4
- Go to Plugins → Manage and Install Plugins
- Search for agrobr
- Click Install Plugin
The plugin auto-installs the agrobr[geo] dependency on first run.
pip install agrobr[geo]Copy the agrobr_qgis/ folder to the QGIS plugins directory:
- Linux:
~/.local/share/QGIS/QGIS4/profiles/default/python/plugins/ - Windows:
%APPDATA%\QGIS\QGIS4\profiles\default\python\plugins\ - macOS:
~/Library/Application Support/QGIS/QGIS4/profiles/default/python/plugins/
- Enable the plugin in Plugin Manager
- The agrobr dock panel appears on the side
- Browse source categories (Environmental, Production, Land, Regulatory)
- Select a source, fill in parameters
- Click Fetch Data
- Review the summary (features, CRS, geometry type)
- Add to map as a layer
Wildfire hotspots (INPE), Deforestation (PRODES/DETER), FUNAI, ICMBio, INCRA, IBAMA, SICAR, ANA, SFB, MapBiomas Alerts.
CONAB, IBGE, ZARC.
Tabular sources can be converted to geospatial layers via automatic municipal join with the IBGE boundary mesh.
Pre-built multi-source compositions for common workflows:
- Environmental X-Ray — fires + deforestation + embargoes + rural properties + conservation units for a given state
- Production Analysis — PAM + CONAB for a product
- Climate Risk — ZARC + PAM for a crop
Select a template from the tree, fill shared parameters, and fetch all sources at once. Results are grouped in the layer tree.
Each source is also available as a Processing Toolbox algorithm, enabling use in models and scripts.
- Background-first — all fetches run in background, UI never blocks
- Offline-first — agrobr cache enables offline usage
- Memory-first — small layers in memory, automatic GPKG fallback for large datasets
- Municipal join — tabular data → IBGE mesh with a single checkbox
- Auto-validation — CRS, invalid geometries, encoding, timezone
- Source search — filter by name, description, or category
- Health check — online/offline status per source on category expand
- Temporal animation — temporal controller for time-series sources (fires, deforestation, commodities)
- Auto-styling — default QML styles per geometry type (point, polygon, line)
- Templates — multi-source compositions (Environmental X-Ray, Production Analysis, Climate Risk)
- Post-fetch actions — open attribute table, save as file, view origin URL
- Project persistence — parameter cache saved/restored with QGIS project
- Corporate proxy — auto-propagates QGIS proxy settings
agrobr_qgis/
core/ # Business logic (no Qt GUI)
sources/ # 1 adapter per source (Registry pattern)
gui/ # Qt6 interface (dock, panels, widgets)
processing/ # Processing Provider (1 algorithm per source)
git clone https://github.com/bruno-portfolio/agrobr-qgis.git
cd agrobr-qgis
pip install ruff mypy pytest pytest-cov agrobr[geo]
pre-commit installruff check agrobr_qgis/ tests/ # Lint
mypy agrobr_qgis/ # Type check
pytest tests/unit/ -v # Unit tests
pytest tests/edge_cases/ -v # Edge casesSee CONTRIBUTING.md for the full guide.
- Plugin: GPL-2.0-or-later — see LICENSE
- agrobr: MIT (compatible)
- Data: belongs to their respective public sources