| --- |
| 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. |
|
|