---
name: jrc-agri4cast-resources-ingestion
description: "How to get JRC AGRI4CAST Resources Portal data into a pandas DataFrame and Parquet: access, the request, the format, limits, quirks and terms."
---

# Load JRC irrigated-crop attributes into pandas and Parquet

Source entry: https://signal-lab-jet.vercel.app/datasets/jrc-agri4cast-resources
Provider: https://agri4cast.jrc.ec.europa.eu/dataportal
Checked against the provider's documentation: 2026-11-01

## Access
- The checked irrigated-crops ZIP downloaded without an account or key.
- Tailored portal resources use an automatically issued session; this example avoids that flow and reads a direct static file.

## Request
```bash
curl -O 'https://agri4cast.jrc.ec.europa.eu/download/dataportal_resources/static_data/dist_irr_crop_eu.zip'
```

## Format
ZIP shapefile. The example reads the DBF attribute table into pandas; the archive also contains SHP, SHX, PRJ and index files for geometry-aware tools.

## Load into pandas and Parquet
Needs Python 3 with requests, pandas and pyarrow.
```python
"""JRC irrigated-crops shapefile attributes -> pandas -> Parquet."""
import io
import struct
import zipfile
import requests
import pandas as pd

URL = "https://agri4cast.jrc.ec.europa.eu/download/dataportal_resources/static_data/dist_irr_crop_eu.zip"
r = requests.get(URL, timeout=120)
r.raise_for_status()
with zipfile.ZipFile(io.BytesIO(r.content)) as zf:
    raw = zf.read("EUROPE_IRRIGATED_CROPS_FINAL.dbf")
count = struct.unpack("<I", raw[4:8])[0]
header_len = struct.unpack("<H", raw[8:10])[0]
record_len = struct.unpack("<H", raw[10:12])[0]
fields, pos = [], 32
while raw[pos] != 0x0D:
    d = raw[pos:pos + 32]
    fields.append((d[:11].split(b"\x00", 1)[0].decode("ascii"), chr(d[11]), d[16], d[17]))
    pos += 32
rows = []
for i in range(count):
    rec = raw[header_len + i * record_len:header_len + (i + 1) * record_len]
    if not rec or rec[:1] == b"*":
        continue
    row, offset = {}, 1
    for name, kind, length, decimals in fields:
        value = rec[offset:offset + length].decode("latin-1").strip()
        offset += length
        if kind in "NF" and value:
            value = float(value) if decimals else int(value)
        row[name] = value or None
    rows.append(row)
df = pd.DataFrame(rows)
df.to_parquet("jrc_irrigated_crops_attributes.parquet", index=False)
print(len(df), "attribute rows", len(df.columns), "fields", ", ".join(df.columns[:6]))
```
Run by us on 2026-11-01 (python 3.13.5 | pandas 3.1.0 | pyarrow 26.0.0 | requests 2.34.2). Result: 60744 attribute rows 19 fields USCIE_GRID, REGIONS_1, IOY, TIA, IR_cereals, IR_maize

## Limits
- Rate limit: Not stated.
- The checked ZIP is about 8.1 MB and expands to about 91.2 MB.
- The example stores attributes only; retain SHP and SHX files for geometry.

## Quirks
- Resource periods and update schedules differ; inspect each resource descriptor before combining files.
- The custom DBF reader handles numeric and text attributes but intentionally does not parse geometry.
- Tailored downloads use portal-generated requests, while some static resources expose direct file URLs.

## Terms and attribution
- The portal describes datasets as freely available for download and reuse.
- EU-owned content is CC BY 4.0 unless a resource states otherwise; credit the EU/JRC and indicate changes.
- Terms page: https://commission.europa.eu/legal-notice_en

## Sources
- https://agri4cast.jrc.ec.europa.eu/main-OXZSCQRR.js: "Datasets are made freely available to the public for download and reuse."
- https://agri4cast.jrc.ec.europa.eu/main-OXZSCQRR.js: "For several datasets, the user can tailor the data for download to the specific needs"
- https://commission.europa.eu/legal-notice_en: "reuse is allowed, provided appropriate credit is given and changes are indicated."

## Help improve this skill
Missing a source, or see something to improve? Call the MCP tool suggest_source or feedback (or POST /api/suggest or /api/feedback). Reviewed ideas: https://signal-lab-jet.vercel.app/agent-suggestions

Information for educational purposes only. Free tiers, limits and licenses belong to the providers and may change; check the provider's own terms before using the data.
