# EuroCropsV2 - GSA Parquet Repository

## Overview

This repository provides access to harmonized **GeoSpatial Application (GSA)** datasets across multiple European regions (NUTS levels), distributed in **Apache Parquet** format.

The data originates from national or regional GSAs and has been standardized to enable cross-country and temporal analysis of agricultural crop fields.

Files are hosted via FTP:

[https://jeodpp.jrc.ec.europa.eu/ftp/jrc-opendata/DRLL/EuroCropsV2/gpqt/](https://jeodpp.jrc.ec.europa.eu/ftp/jrc-opendata/DRLL/EuroCropsV2/gpqt/)

---

## Coverage

### Spatial Coverage (NUTS regions)

The dataset includes the following NUTS regions:

```
be2, be3, bg, cz, de4, dea, dk, ee, es, fi, fr, ie, iti1, nl, si, sk
```

### Temporal Coverage

* Years available: **2008 - 2023**
* ? Not all NUTS regions are available for all years

---

## File Structure

### 1. Yearly GSA Files

Each file represents one **NUTS region and one year**.

**Naming convention:**

```
<nuts>_<year>.parquet
```

**Example:**

```
fr_2018.parquet
de4_2020.parquet
```

---

### 2. Stack Files

Each stack file aggregates crop field information across multiple years for a given NUTS region.

**Naming convention:**

```
<nuts>_stack.parquet
```

**Example:**

```
fr_stack.parquet
de4_stack.parquet
```

---

## Data Schema

### Yearly GSA Tables (`<nuts>_<year>.parquet`)

| Column          | Type     | Description                                          |
| --------------- | -------- | ---------------------------------------------------- |
| `cropfield`     | int4     | Unique identifier of the crop field within the table |
| `original_code` | varchar  | Crop code as defined in the original GSA source      |
| `area_ha`       | float    | Area of the polygon in hectares                      |
| `geom`          | geometry | Polygon geometry (CRS: **EPSG:3035**)                |

#### Notes

* If the original dataset does not include crop codes:

  * A **synthetic code** is generated (values >= 10,000)
* To retrieve semantic meaning of crop codes, use:

EuroCrops mapping table:
[https://github.com/Martincccc/EuroCropsV2/blob/main/data/cropcodemapping/eurocrops.csv](https://github.com/Martincccc/EuroCropsV2/blob/main/data/cropcodemapping/eurocrops.csv)

* Join keys:

  * `original_code`
  * `nuts`

---

### Stack Tables (`<nuts>_stack.parquet`)

These tables track crop field evolution over time.

| Column      | Type     | Description                                          |
| ----------- | -------- | ---------------------------------------------------- |
| `cropfield` | int4     | Unique identifier of the stacked crop field          |
| `cf<YEAR>`  | int4     | Crop field ID in `<nuts>_<YEAR>` table               |
| `c<YEAR>`   | varchar  | Crop code (`original_code`) in `<nuts>_<YEAR>` table |
| `area_ha`   | float    | Area of the polygon in hectares                      |
| `geom`      | geometry | Polygon geometry (CRS: **EPSG:3035**)                |

#### Example columns:

```
cf2018, c2018, cf2019, c2019, ...
```

---

## Data Access

Data can be accessed directly via FTP or programmatically.

### Example (Python)

```python
import pandas as pd

url = "https://jeodpp.jrc.ec.europa.eu/ftp/jrc-opendata/DRLL/EuroCropsV2/gpqt/fr_2018.parquet"
df = pd.read_parquet(url)

print(df.head())
```


### Example: join yearly GSA data with the EuroCrops crop-code mapping

The EuroCrops ecosystem uses an HCAT-based harmonization of crop classes, including machine-readable crop names and codes. ([GitHub][1])

The example below reads one yearly Parquet layer as a `GeoDataFrame`, links it to the EuroCrops crop-code mapping, and adds `hcat4_name` to the output.

### Python example

```python
import pandas as pd
import geopandas as gpd

# Example input
nuts = "fr"
year = 2018

# Yearly GSA parquet
gsa_url = f"https://jeodpp.jrc.ec.europa.eu/ftp/jrc-opendata/DRLL/EuroCropsV2/gpqt/{nuts}_{year}.parquet"

# EuroCrops mapping table (raw GitHub URL)
mapping_url = (
    "https://github.com/Martincccc/EuroCropsV2/main/"
    "data/cropcodemapping/eurocrops.csv"
)

# Read geospatial parquet as GeoDataFrame
gdf = gpd.read_parquet(gsa_url)

# Read crop-code mapping table
mapping = pd.read_csv(mapping_url, dtype={"original_code": str, "nuts": str})

# Ensure join keys use the same type/casing
gdf["original_code"] = gdf["original_code"].astype(str)
gdf["nuts"] = nuts

mapping["original_code"] = mapping["original_code"].astype(str)
mapping["nuts"] = mapping["nuts"].astype(str).str.lower()

# Keep only the fields needed for the join
mapping_sel = mapping[["nuts", "original_code", "hcat4_name"]].drop_duplicates()

# Join mapping information to the yearly geodata
gdf_ec = gdf.merge(
    mapping_sel,
    on=["nuts", "original_code"],
    how="left"
)

# Example result
print(gdf_ec[["cropfield", "original_code", "hcat4_name", "area_ha", "geom"]].head())
```


---

## Coordinate Reference System

All geometries are provided in:

```
EPSG:3035 (ETRS89 / LAEA Europe)
```

---

## Related Resources

* EuroCropsV2 github:
  [https://github.com/Martincccc/EuroCropsV2](https://github.com/Martincccc/EuroCropsV2)

---

## versions history
gpqt: initial release
gpqtv201: correction of bug in stack layers
gpqtv202: correction of geometry bug on overlaped parcels. mostly affected spain

## Contact / Attribution

This dataset is part of the **EuroCropsV2** initiative under JRC open data.

Please cite appropriately when using the data.
https://doi.org/10.2905/JRC.FX0BVKR
https://essd.copernicus.org/preprints/essd-2025-752/

