File size: 7,592 Bytes
79dafc2
 
75875cd
79dafc2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9bc98d9
 
 
 
6765fd7
9bc98d9
 
 
 
 
 
 
 
 
 
4099d32
 
9bc98d9
4099d32
9bc98d9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4099d32
9bc98d9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4099d32
9bc98d9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4099d32
9bc98d9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
---
license: mit
viewer: false
language:
  - en
pretty_name: LUCAS-MEGA
tags:
  - soil
  - soil-science
  - earth-science
  - environmental-science
  - multimodal
  - tabular
  - representation-learning
  - remote-sensing
  - europe
---

# LUCAS-MEGA

**LUCAS-MEGA: A Large-Scale Multimodal Dataset for Representation Learning in Soil-Environment Systems**

[Manuscript](https://arxiv.org/abs/2605.04323)

---

# Introduction

LUCAS-MEGA is a large-scale multimodal dataset for soil-environment systems, built by fusing heterogeneous European soil
and environmental datasets with the LUCAS soil survey as the backbone.

The released dataset contains:

- 72,000+ soil samples
- 1,000+ fused soil and environmental features
- 68 integrated ESDAC source datasets
- Numerical (scalar- and vector-valued), categorical, textual, and visual data

LUCAS-MEGA is designed for representation learning in soil science. It provides a unified sample-feature space where
models can learn relationships across soil, climate, terrain, land-use, hydrological, and environmental variables.

The dataset follows the **MEGA** principles:

- (**M**)ultimodal: scalar, vector-valued, categorical, textual, and visual features.
- (**E**)nd-to-end machine learning-ready: standardized units, harmonized formats, unified schema, and machine-readable
  metadata.
- (**G**)reat quality: corrected unit issues, invalid values, codebook mismatches, missing-value conventions, and
  cross-dataset inconsistencies.
- (**A**)ccessible: released with table and dictionary formats, metadata, assets, visualization tools, and API-oriented
  resources.

The final LUCAS-MEGA dataset is the **fused representation** and is intended for most users, including model training,
soil-environment analysis, and downstream applications.

The **standardized representation** is an intermediate layer between raw ESDAC datasets and the final fused dataset. It
contains cleaned and normalized individual source datasets before fusion, and is mainly useful for inspection,
debugging, and extension.

---

# Download

## Download LUCAS-MEGA

For users who only need the final fused dataset (16 GB):

```bash
git clone https://huggingface.co/datasets/earthroverprogram/lucas-mega
cd lucas-mega
git lfs pull --include="datasets/fusion" --exclude="datasets/esdac,src/fuse_esdac/large_inputs"
```

The fusion dataset is the released LUCAS-MEGA dataset. It integrates standardized source datasets into a unified
sample-feature representation. Each sample is a soil observation, and each feature is a fused soil or environmental
variable. Features may be numerical values, categorical labels, text fields, vector-valued measurements, images, or links
to dense asset files.

### Released Files

| File                        | Description                                                                                                                                               |
|-----------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|
| `data_table.csv`            | Main flat table. Each row is a soil sample; each column is a fused feature.                                                                               |
| `data_dict.json`            | Hierarchical sample-level JSON with detailed feature metadata.                                                                                            |
| `data_dict.pkl`             | Same content as `data_dict.json`, stored as Python pickle for faster loading.                                                                             |
| `meta_column_complete.json` | Complete metadata for fused features, including units, provenance, modality, and fusion information where available.                                      |
| `meta_column_names.json`    | List of fused feature names.                                                                                                                              |
| `meta_fused_datasets.csv`   | Metadata and provenance of source datasets used in fusion.                                                                                                |
| `gadm_tree_europe.pkl`      | GADM administrative hierarchy attached to samples for geographic reasoning and regional lookup.                                                           |
| `assets/`                   | Dense feature data, including hydraulic conductivity curves, water retention curves, particle size distribution spectra, and site images where available. |

---

## Download the Standardized Representation

For users interested in the intermediate standardized data (70 GB):

```bash
git lfs pull --include="datasets/esdac" --exclude="datasets/fusion,src/fuse_esdac/large_inputs"
```

The standardized representation contains cleaned and normalized individual source datasets. These datasets have been
converted into common formats but are not yet fused into the final LUCAS-MEGA sample-feature tabular transformation.

It includes:

- standardized tabular files for sample-structured datasets;
- standardized geospatial files for map-structured datasets;
- linked asset files for high-dimensional objects such as curves and spectra.

This layer is useful for inspecting source datasets, understanding preprocessing, developing new fusion rules, debugging
the pipeline, or extending LUCAS-MEGA.

Use `viewer.py` to visualize the standardized data and metadata:

```bash
python viewer.py
```

<img src="resources/preview.png" alt="preview" style="width:60%;">

---

# For Developers

This repository also contains the codebase used to generate LUCAS-MEGA from raw ESDAC datasets.

The pipeline includes:

- **Source dataset downloading**: requesting and downloading source datasets from ESDAC. This is not handled by this
  repository because the original datasets are subject to ESDAC access and license terms.
- **Data standardization**: converting heterogeneous datasets into a common representation, including format conversion,
  unit normalization, coordinate handling, codebook harmonization, invalid-value correction, and metadata organization.
- **Data fusion**: aligning standardized datasets into the released LUCAS-MEGA sample-feature schema, with provenance
  and metadata attached to fused features.

Example:

- Source download:  
  https://esdac.jrc.ec.europa.eu/content/lucas-2009-topsoil-data

- Standardization code:  
  [src/esdac/lucas-2009-topsoil-data/process.py](src/esdac/lucas-2009-topsoil-data/process.py)

- Fusion specification:  
  [src/esdac/lucas-2009-topsoil-data/fuse_schema.json](src/esdac/lucas-2009-topsoil-data/fuse_schema.json)

## Reproducing and Extending the Dataset

Due to license agreements, we cannot redistribute the original ESDAC source datasets.

To fully reproduce the released dataset, users must request and download the source datasets from ESDAC separately and
accept the corresponding license terms.

The complete dataset list is available at:

[src/esdac/status.json](src/esdac/status.json)

To reproduce the released version, download datasets with `status = PROCESSED`. At release time, this includes 95 ESDAC
datasets.

Full reproduction is time-consuming because source datasets must be requested individually, and access conditions may
vary by dataset.

If you intend to reproduce the full pipeline or extend LUCAS-MEGA with additional datasets, please contact us. We can
provide practical guidance that is not included here due to source-data licensing restrictions.