Langeraert, Ward123
Van Daele, Toon
45
Research Institute for Nature and Forest (INBO)6 European Union’s
Horizon Europe Research and Innovation Programme (ID No 101059592)7
keywords: data package; b3verse; frictionless; data cubes
This repository contains scripts to create the b3data frictionless data package. This data package includes data resources used across the b3verse and is published on Zenodo.
This code is developed in context of T5.5 of the B-Cubed project.
Follow the steps below to run the scripts in a logical order.
1. create_b3data_package.Rmd
- creates the data package
- adds tabular resources
- writes data package
2. add_spatial_resources.Rmd
- loads data package
- adds spatial resources
- writes data package
- Name:
b3data
- Published at:
- Used in: b3verse
- Importable in R via: frictionless R package
Resources can be imported in R like this:
# install.packages("frictionless")
library(frictionless)
The content of the data package can be consulted using read_package()
.
b3data_package <- read_package("https://zenodo.org/records/15211029/files/datapackage.json")
b3data_package
#> A Data Package with 2 resources:
#> • bird_cube_belgium_mgrs10
#> • mgrs10_refgrid_belgium
#> For more information, see <https://doi.org/10.5281/zenodo.15211029>.
#> Use `unclass()` to print the Data Package as a list.
Tabular datasets can be loaded using read_resource()
.
bird_cube_belgium <- read_resource(b3data_package, "bird_cube_belgium_mgrs10")
head(bird_cube_belgium)
#> # A tibble: 6 × 8
#> year mgrscode specieskey species family n mincoordinateuncerta…¹
#> <dbl> <chr> <dbl> <chr> <chr> <dbl> <dbl>
#> 1 2000 31UDS65 2473958 Perdix perdix Phasi… 1 3536
#> 2 2000 31UDS65 2474156 Coturnix coturn… Phasi… 1 3536
#> 3 2000 31UDS65 2474377 Fulica atra Ralli… 5 1000
#> 4 2000 31UDS65 2475443 Merops apiaster Merop… 6 1000
#> 5 2000 31UDS65 2480242 Vanellus vanell… Chara… 1 3536
#> 6 2000 31UDS65 2480637 Accipiter nisus Accip… 1 3536
#> # ℹ abbreviated name: ¹mincoordinateuncertaintyinmeters
#> # ℹ 1 more variable: familycount <dbl>
For non-tabular resources (e.g. spatial or raster data), use packages
like sf
or terra
directly.
mgrs10_belgium <- sf::st_read(
"https://zenodo.org/records/15211029/files/mgrs10_refgrid_belgium.gpkg",
quiet = TRUE)
head(mgrs10_belgium)
#> Simple feature collection with 6 features and 1 field
#> Geometry type: POLYGON
#> Dimension: XY
#> Bounding box: xmin: 460000.1 ymin: 5620000 xmax: 480000.1 ymax: 5670000
#> Projected CRS: WGS 84 / UTM zone 31N
#> mgrscode geom
#> 1 31UDS65 POLYGON ((470000.1 5651000,...
#> 2 31UDS66 POLYGON ((470000.1 5661000,...
#> 3 31UDS72 POLYGON ((480000 5621000, 4...
#> 4 31UDS73 POLYGON ((480000.1 5631000,...
#> 5 31UDS74 POLYGON ((480000.1 5641000,...
#> 6 31UDS75 POLYGON ((480000.1 5651000,...
├── source ├ R markdown files
│ └── R ├ R scripts
├── data
│ ├── raw ├ create this folder and store raw data
│ ├── processed ├ store processed data
│ └── b3data_package ├ b3data frictionless data package
├── checklist.yml ├ options checklist package (https://github.com/inbo/checklist)
├── organisation.yml ├ organisation info (https://inbo.github.io/checklist/articles/organisation.html)
├── inst
│ └── en_gb.dic ├ dictionary with words that should not be checked by the checklist package
├── .github │
│ ├── workflows │
│ │ └── checklist_project.yml ├ GitHub action settings
│ ├── CODE_OF_CONDUCT.md │
│ └── CONTRIBUTING.md │
├── b3data-scripts.Rproj ├ R project
├── README.md ├ project description
├── LICENSE.md ├ license
├── CITATION.cff ├ citation info
├── .zenodo.json ├ zenodo metadata
└── .gitignore ├ files to ignore
Footnotes
-
author ↩
-
contact person ↩
-
Research Institute for Nature and Forest (INBO), Herman Teirlinckgebouw, Havenlaan 88 PO Box 73, B-1000 Brussels, Belgium ↩
-
author ↩
-
Research Institute for Nature and Forest (INBO), Herman Teirlinckgebouw, Havenlaan 88 PO Box 73, B-1000 Brussels, Belgium ↩
-
copyright holder ↩
-
funder ↩