diff --git a/data/b3data_package/datapackage.json b/data/b3data_package/datapackage.json index 1cfb066..4d1382a 100644 --- a/data/b3data_package/datapackage.json +++ b/data/b3data_package/datapackage.json @@ -1,6 +1,7 @@ { "name": "b3data", - "id": "https://doi.org/10.5281/zenodo.15181097", + "id": "https://doi.org/10.5281/zenodo.15181098", + "version": "0.1.0", "resources": [ { "name": "bird_cube_belgium_mgrs10", @@ -11,20 +12,24 @@ "encoding": "utf-8", "title": "Occurrence cube for birds in Belgium (MGRS 10 km)", "description": "Occurrence cube for birds in Belgium between 2000 en 2024. The taxonomical resolution is 'species' and the temporal resolution is 'year' Spatial aggregation is done using the MGRS grid at 10 km scale. Only grid cells that fall within the 10 km MGRS reference grid for mainland Belgium (see b3data: `mgrs10_refgrid_belgium.geojson`) are included.", - "sources": { - "title": "GBIF Occurrence Download", - "path": "https://doi.org/10.15468/dl.y3wpwk" - }, - "licenses": { - "name": "CC BY-NC 4.0", - "path": "https://creativecommons.org/licenses/by-nc/4.0/", - "title": "Creative Commons Attribution-NonCommercial 4.0 International" - }, + "sources": [ + { + "title": "GBIF Occurrence Download", + "path": "https://doi.org/10.15468/dl.y3wpwk" + } + ], + "licenses": [ + { + "name": "CC-BY-NC-4.0", + "path": "https://creativecommons.org/licenses/by-nc/4.0/", + "title": "Creative Commons Attribution-NonCommercial 4.0 International" + } + ], "schema": { "fields": [ { "name": "year", - "type": "number" + "type": "integer" }, { "name": "mgrscode", @@ -32,7 +37,7 @@ }, { "name": "specieskey", - "type": "number" + "type": "integer" }, { "name": "species", @@ -44,7 +49,7 @@ }, { "name": "n", - "type": "number" + "type": "integer" }, { "name": "mincoordinateuncertaintyinmeters", @@ -52,7 +57,7 @@ }, { "name": "familycount", - "type": "number" + "type": "integer" } ] } @@ -60,43 +65,16 @@ { "name": "mgrs10_refgrid_belgium", "path": "mgrs10_refgrid_belgium.geojson", - "profile": "spatial-data-resource", "format": "geojson", - "title": "MGRS 10 Km reference grid Belgium", - "description": "MGRS 10 Km reference grid for the mainland of Belgium.", - "licenses": { - "name": "CC0 1.0", - "path": "https://creativecommons.org/publicdomain/zero/1.0/", - "title": "Creative Commons Zero v1.0 Universal" - } - } - ], - "title": "b3data: Data resources for the b3verse", - "description": "This data package contains data resources to be used across the b3verse (https://docs.b-cubed.eu/guides/b3verse/). This includes example datasets (occurrence cubes) as well as spatial resources like reference grids or raster data.", - "keywords": ["data cubes", "b3verse", "frictionless", "biodiversity"], - "licenses": { - "name": "CC BY-NC 4.0", - "path": "https://creativecommons.org/licenses/by-nc/4.0/", - "title": "Creative Commons Attribution-NonCommercial 4.0 International" - }, - "version": "0.1.0", - "sources": { - "title": "b3data-scripts", - "path": "https://github.com/b-cubed-eu/b3data-scripts" - }, - "contributors": [ - { - "title": "Ward Langeraert", - "path": "https://orcid.org/0000-0002-5900-8109", - "email": "ward.langeraert@inbo.be", - "role": "author", - "organization": "Research Institute for Nature and Forest (INBO)" - }, - { - "title": "Toon Van Daele", - "path": "https://orcid.org/0000-0002-1362-853X", - "role": "contributor", - "organization": "Research Institute for Nature and Forest (INBO)" + "title": "MGRS 10 km reference grid Belgium", + "description": "MGRS 10 km reference grid for the mainland of Belgium.", + "licenses": [ + { + "name": "CC0-1.0", + "path": "https://creativecommons.org/publicdomain/zero/1.0/", + "title": "Creative Commons Zero v1.0 Universal" + } + ] } ] } diff --git a/source/add_spatial_resources.Rmd b/source/add_spatial_resources.Rmd index 5309169..b71c842 100644 --- a/source/add_spatial_resources.Rmd +++ b/source/add_spatial_resources.Rmd @@ -57,7 +57,6 @@ Example: Each dataset includes the following metadata (see: [Frictionless resource spec](https://docs.ropensci.org/frictionless/articles/data-resource.html#properties-implementation)): -- **profile**: `spatial-data-resource` - **format**: e.g. `geojson` - **title**: e.g. `"MGRS 10 km reference grid for Belgium"` - **description**: concise explanation of content @@ -65,7 +64,7 @@ Each dataset includes the following metadata (see: [Frictionless resource spec]( - **licenses**: [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/) # Datasets -## MGRS 10 Km reference grid Belgium +## MGRS 10 km reference grid Belgium Load the data. @@ -103,15 +102,14 @@ b3data_package <- read_package(file.path(package_path, "datapackage.json")) mgrs10_resource <- list( name = "mgrs10_refgrid_belgium", path = "mgrs10_refgrid_belgium.geojson", - profile = "spatial-data-resource", format = "geojson", - title = "MGRS 10 Km reference grid Belgium", - description = "MGRS 10 Km reference grid for the mainland of Belgium.", - licenses = list( - name = "CC0 1.0", + title = "MGRS 10 km reference grid Belgium", + description = "MGRS 10 km reference grid for the mainland of Belgium.", + licenses = list(list( + name = "CC0-1.0", path = "https://creativecommons.org/publicdomain/zero/1.0/", title = "Creative Commons Zero v1.0 Universal" - ) + )) ) b3data_package <- add_manual_resource( diff --git a/source/create_b3data_package.Rmd b/source/create_b3data_package.Rmd index f0c0ec9..ca5551e 100644 --- a/source/create_b3data_package.Rmd +++ b/source/create_b3data_package.Rmd @@ -72,17 +72,12 @@ Each dataset includes the following metadata (see: [Frictionless resource spec]( ## Package-level Metadata -Metadata for the entire data package (see: [Frictionless Data Package spec](https://specs.frictionlessdata.io/data-package/#metadata)): +Metadata for the entire data package (see: [Frictionless Data Package spec](https://specs.frictionlessdata.io/data-package/#metadata)). +This will be rather limited to avoid repetition with metadata of Zenodo deposit: - **name**: `b3data` -- **id**: reserved Zenodo DOI -- **title**: `b3data: Data resources for the b3verse` -- **description**: overview of purpose, content, and structure of the data package -- **keywords**: e.g. `"biodiversity", "data cube", "b3verse", "GBIF", "frictionless"` -- **licenses**: [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/) +- **id**: reserved Zenodo DOI (version specific) - **version**: semantic versioning string, e.g. 0.1.0 -- **sources**: GitHub repository [b3data-scripts](https://github.com/b-cubed-eu/b3data-scripts) -- **contributors**: name, ORCID, and roles # Datasets ## Birds in Belgium (MGRS 10 km) @@ -152,7 +147,9 @@ ggplot() + geom_sf(data = utm10_bel) ```{r} # Only select grid cells from reference grid bird_cube_belgium_mgrs10 <- bird_cube_belgium_mgrs10_full %>% - filter(substring(mgrscode, 4) %in% utm10_bel$TAG) + filter(substring(mgrscode, 4) %in% utm10_bel$TAG) %>% + # Transform columns to integers + mutate(across(c("year", "specieskey", "n", "familycount"), as.integer)) ``` We create the package and add the dataset. @@ -171,15 +168,15 @@ b3data_package <- create_package() %>% "Only grid cells that fall within the 10 km MGRS reference grid for", "mainland Belgium (see b3data: `mgrs10_refgrid_belgium.geojson`) are", "included."), - sources = list( + sources = list(list( title = "GBIF Occurrence Download", path = "https://doi.org/10.15468/dl.y3wpwk" - ), - licenses = list( - name = "CC BY-NC 4.0", + )), + licenses = list(list( + name = "CC-BY-NC-4.0", path = "https://creativecommons.org/licenses/by-nc/4.0/", title = "Creative Commons Attribution-NonCommercial 4.0 International" - ) + )) ) ``` @@ -196,62 +193,11 @@ b3data_package <- append(b3data_package, c(name = "b3data"), after = 0) b3data_package <- append(b3data_package, - c(id = "https://doi.org/10.5281/zenodo.15181097"), + c(id = "https://doi.org/10.5281/zenodo.15181098"), after = 1) -b3data_package <- append(b3data_package, - c(title = "b3data: Data resources for the b3verse"), - after = 3) -b3data_package <- append( - b3data_package, - c(description = paste( - "This data package contains data resources to be used across the b3verse", - "(https://docs.b-cubed.eu/guides/b3verse/).", - "This includes example datasets (occurrence cubes) as well as spatial", - "resources like reference grids or raster data." - )), - after = 4) -b3data_package <- append( - b3data_package, - c(keywords = list(list( - "data cubes", "b3verse", "frictionless", "biodiversity" - ))), - after = 5) -b3data_package <- append( - b3data_package, - c(licenses = list(list( - name = "CC BY-NC 4.0", - path = "https://creativecommons.org/licenses/by-nc/4.0/", - title = "Creative Commons Attribution-NonCommercial 4.0 International" - ))), - after = 6) b3data_package <- append(b3data_package, c(version = "0.1.0"), - after = 7) -b3data_package <- append( - b3data_package, - c(sources = list(list( - title = "b3data-scripts", - path = "https://github.com/b-cubed-eu/b3data-scripts" - ))), - after = 8) -b3data_package <- append( - b3data_package, - c(contributors = list(list( - list( - title = "Ward Langeraert", - path = "https://orcid.org/0000-0002-5900-8109", - email = "ward.langeraert@inbo.be", - role = "author", - organization = "Research Institute for Nature and Forest (INBO)" - ), - list( - title = "Toon Van Daele", - path = "https://orcid.org/0000-0002-1362-853X", - role = "contributor", - organization = "Research Institute for Nature and Forest (INBO)" - ) - ))), - after = 9) + after = 2) # Warning: append() drops the custom datapackage class. # It can be added again by running b3data_package through create_package()