DERAL API¶
The DERAL module provides crop condition, planting and harvest progress data from the Rural Economy Department of Parana.
Functions¶
condicao_lavouras¶
Weekly condition of Parana crops.
async def condicao_lavouras(
produto: str | None = None,
*,
as_polars: bool = False,
return_meta: bool = False,
) -> pd.DataFrame | tuple[pd.DataFrame, MetaInfo]
Parameters:
| Parameter | Type | Description |
|---|---|---|
produto |
str \| None |
Filter by crop ("soja", "milho", "milho_1", "milho_2", "trigo", "feijao", "cana", "cafe", etc.). None returns all |
as_polars |
bool |
Return as polars DataFrame |
return_meta |
bool |
If True, returns a (DataFrame, MetaInfo) tuple |
Returns:
DataFrame with columns: produto, data, condicao, pct, plantio_pct, colheita_pct
Example:
from agrobr import deral
# All crops
df = await deral.condicao_lavouras()
# Soybean only
df = await deral.condicao_lavouras("soja")
# With metadata
df, meta = await deral.condicao_lavouras("milho", return_meta=True)
Synchronous Version¶
Notes¶
- Source: DERAL/SEAB-PR —
livrelicense - Parana-exclusive data
- Published in Excel (PC.xls) — layout may vary between crop years