Skip to content

Commit 0da03fc

Browse files
authored
Merge pull request #6 from b-cubed-eu/review-1
Zenodo Review Peter
2 parents 6443a73 + 531aba8 commit 0da03fc

3 files changed

Lines changed: 47 additions & 125 deletions

File tree

Lines changed: 28 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "b3data",
3-
"id": "https://doi.org/10.5281/zenodo.15181097",
3+
"id": "https://doi.org/10.5281/zenodo.15181098",
4+
"version": "0.1.0",
45
"resources": [
56
{
67
"name": "bird_cube_belgium_mgrs10",
@@ -11,28 +12,32 @@
1112
"encoding": "utf-8",
1213
"title": "Occurrence cube for birds in Belgium (MGRS 10 km)",
1314
"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.",
14-
"sources": {
15-
"title": "GBIF Occurrence Download",
16-
"path": "https://doi.org/10.15468/dl.y3wpwk"
17-
},
18-
"licenses": {
19-
"name": "CC BY-NC 4.0",
20-
"path": "https://creativecommons.org/licenses/by-nc/4.0/",
21-
"title": "Creative Commons Attribution-NonCommercial 4.0 International"
22-
},
15+
"sources": [
16+
{
17+
"title": "GBIF Occurrence Download",
18+
"path": "https://doi.org/10.15468/dl.y3wpwk"
19+
}
20+
],
21+
"licenses": [
22+
{
23+
"name": "CC-BY-NC-4.0",
24+
"path": "https://creativecommons.org/licenses/by-nc/4.0/",
25+
"title": "Creative Commons Attribution-NonCommercial 4.0 International"
26+
}
27+
],
2328
"schema": {
2429
"fields": [
2530
{
2631
"name": "year",
27-
"type": "number"
32+
"type": "integer"
2833
},
2934
{
3035
"name": "mgrscode",
3136
"type": "string"
3237
},
3338
{
3439
"name": "specieskey",
35-
"type": "number"
40+
"type": "integer"
3641
},
3742
{
3843
"name": "species",
@@ -44,59 +49,32 @@
4449
},
4550
{
4651
"name": "n",
47-
"type": "number"
52+
"type": "integer"
4853
},
4954
{
5055
"name": "mincoordinateuncertaintyinmeters",
5156
"type": "number"
5257
},
5358
{
5459
"name": "familycount",
55-
"type": "number"
60+
"type": "integer"
5661
}
5762
]
5863
}
5964
},
6065
{
6166
"name": "mgrs10_refgrid_belgium",
6267
"path": "mgrs10_refgrid_belgium.geojson",
63-
"profile": "spatial-data-resource",
6468
"format": "geojson",
65-
"title": "MGRS 10 Km reference grid Belgium",
66-
"description": "MGRS 10 Km reference grid for the mainland of Belgium.",
67-
"licenses": {
68-
"name": "CC0 1.0",
69-
"path": "https://creativecommons.org/publicdomain/zero/1.0/",
70-
"title": "Creative Commons Zero v1.0 Universal"
71-
}
72-
}
73-
],
74-
"title": "b3data: Data resources for the b3verse",
75-
"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.",
76-
"keywords": ["data cubes", "b3verse", "frictionless", "biodiversity"],
77-
"licenses": {
78-
"name": "CC BY-NC 4.0",
79-
"path": "https://creativecommons.org/licenses/by-nc/4.0/",
80-
"title": "Creative Commons Attribution-NonCommercial 4.0 International"
81-
},
82-
"version": "0.1.0",
83-
"sources": {
84-
"title": "b3data-scripts",
85-
"path": "https://github.com/b-cubed-eu/b3data-scripts"
86-
},
87-
"contributors": [
88-
{
89-
"title": "Ward Langeraert",
90-
"path": "https://orcid.org/0000-0002-5900-8109",
91-
"email": "ward.langeraert@inbo.be",
92-
"role": "author",
93-
"organization": "Research Institute for Nature and Forest (INBO)"
94-
},
95-
{
96-
"title": "Toon Van Daele",
97-
"path": "https://orcid.org/0000-0002-1362-853X",
98-
"role": "contributor",
99-
"organization": "Research Institute for Nature and Forest (INBO)"
69+
"title": "MGRS 10 km reference grid Belgium",
70+
"description": "MGRS 10 km reference grid for the mainland of Belgium.",
71+
"licenses": [
72+
{
73+
"name": "CC0-1.0",
74+
"path": "https://creativecommons.org/publicdomain/zero/1.0/",
75+
"title": "Creative Commons Zero v1.0 Universal"
76+
}
77+
]
10078
}
10179
]
10280
}

source/add_spatial_resources.Rmd

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,14 @@ Example:
5757

5858
Each dataset includes the following metadata (see: [Frictionless resource spec](https://docs.ropensci.org/frictionless/articles/data-resource.html#properties-implementation)):
5959

60-
- **profile**: `spatial-data-resource`
6160
- **format**: e.g. `geojson`
6261
- **title**: e.g. `"MGRS 10 km reference grid for Belgium"`
6362
- **description**: concise explanation of content
6463
- **sources**: source if applicable
6564
- **licenses**: [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/)
6665

6766
# Datasets
68-
## MGRS 10 Km reference grid Belgium
67+
## MGRS 10 km reference grid Belgium
6968

7069
Load the data.
7170

@@ -103,15 +102,14 @@ b3data_package <- read_package(file.path(package_path, "datapackage.json"))
103102
mgrs10_resource <- list(
104103
name = "mgrs10_refgrid_belgium",
105104
path = "mgrs10_refgrid_belgium.geojson",
106-
profile = "spatial-data-resource",
107105
format = "geojson",
108-
title = "MGRS 10 Km reference grid Belgium",
109-
description = "MGRS 10 Km reference grid for the mainland of Belgium.",
110-
licenses = list(
111-
name = "CC0 1.0",
106+
title = "MGRS 10 km reference grid Belgium",
107+
description = "MGRS 10 km reference grid for the mainland of Belgium.",
108+
licenses = list(list(
109+
name = "CC0-1.0",
112110
path = "https://creativecommons.org/publicdomain/zero/1.0/",
113111
title = "Creative Commons Zero v1.0 Universal"
114-
)
112+
))
115113
)
116114
117115
b3data_package <- add_manual_resource(

source/create_b3data_package.Rmd

Lines changed: 13 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,12 @@ Each dataset includes the following metadata (see: [Frictionless resource spec](
7272

7373
## Package-level Metadata
7474

75-
Metadata for the entire data package (see: [Frictionless Data Package spec](https://specs.frictionlessdata.io/data-package/#metadata)):
75+
Metadata for the entire data package (see: [Frictionless Data Package spec](https://specs.frictionlessdata.io/data-package/#metadata)).
76+
This will be rather limited to avoid repetition with metadata of Zenodo deposit:
7677

7778
- **name**: `b3data`
78-
- **id**: reserved Zenodo DOI
79-
- **title**: `b3data: Data resources for the b3verse`
80-
- **description**: overview of purpose, content, and structure of the data package
81-
- **keywords**: e.g. `"biodiversity", "data cube", "b3verse", "GBIF", "frictionless"`
82-
- **licenses**: [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/)
79+
- **id**: reserved Zenodo DOI (version specific)
8380
- **version**: semantic versioning string, e.g. 0.1.0
84-
- **sources**: GitHub repository [b3data-scripts](https://github.com/b-cubed-eu/b3data-scripts)
85-
- **contributors**: name, ORCID, and roles
8681

8782
# Datasets
8883
## Birds in Belgium (MGRS 10 km)
@@ -152,7 +147,9 @@ ggplot() + geom_sf(data = utm10_bel)
152147
```{r}
153148
# Only select grid cells from reference grid
154149
bird_cube_belgium_mgrs10 <- bird_cube_belgium_mgrs10_full %>%
155-
filter(substring(mgrscode, 4) %in% utm10_bel$TAG)
150+
filter(substring(mgrscode, 4) %in% utm10_bel$TAG) %>%
151+
# Transform columns to integers
152+
mutate(across(c("year", "specieskey", "n", "familycount"), as.integer))
156153
```
157154

158155
We create the package and add the dataset.
@@ -171,15 +168,15 @@ b3data_package <- create_package() %>%
171168
"Only grid cells that fall within the 10 km MGRS reference grid for",
172169
"mainland Belgium (see b3data: `mgrs10_refgrid_belgium.geojson`) are",
173170
"included."),
174-
sources = list(
171+
sources = list(list(
175172
title = "GBIF Occurrence Download",
176173
path = "https://doi.org/10.15468/dl.y3wpwk"
177-
),
178-
licenses = list(
179-
name = "CC BY-NC 4.0",
174+
)),
175+
licenses = list(list(
176+
name = "CC-BY-NC-4.0",
180177
path = "https://creativecommons.org/licenses/by-nc/4.0/",
181178
title = "Creative Commons Attribution-NonCommercial 4.0 International"
182-
)
179+
))
183180
)
184181
```
185182

@@ -196,62 +193,11 @@ b3data_package <- append(b3data_package,
196193
c(name = "b3data"),
197194
after = 0)
198195
b3data_package <- append(b3data_package,
199-
c(id = "https://doi.org/10.5281/zenodo.15181097"),
196+
c(id = "https://doi.org/10.5281/zenodo.15181098"),
200197
after = 1)
201-
b3data_package <- append(b3data_package,
202-
c(title = "b3data: Data resources for the b3verse"),
203-
after = 3)
204-
b3data_package <- append(
205-
b3data_package,
206-
c(description = paste(
207-
"This data package contains data resources to be used across the b3verse",
208-
"(https://docs.b-cubed.eu/guides/b3verse/).",
209-
"This includes example datasets (occurrence cubes) as well as spatial",
210-
"resources like reference grids or raster data."
211-
)),
212-
after = 4)
213-
b3data_package <- append(
214-
b3data_package,
215-
c(keywords = list(list(
216-
"data cubes", "b3verse", "frictionless", "biodiversity"
217-
))),
218-
after = 5)
219-
b3data_package <- append(
220-
b3data_package,
221-
c(licenses = list(list(
222-
name = "CC BY-NC 4.0",
223-
path = "https://creativecommons.org/licenses/by-nc/4.0/",
224-
title = "Creative Commons Attribution-NonCommercial 4.0 International"
225-
))),
226-
after = 6)
227198
b3data_package <- append(b3data_package,
228199
c(version = "0.1.0"),
229-
after = 7)
230-
b3data_package <- append(
231-
b3data_package,
232-
c(sources = list(list(
233-
title = "b3data-scripts",
234-
path = "https://github.com/b-cubed-eu/b3data-scripts"
235-
))),
236-
after = 8)
237-
b3data_package <- append(
238-
b3data_package,
239-
c(contributors = list(list(
240-
list(
241-
title = "Ward Langeraert",
242-
path = "https://orcid.org/0000-0002-5900-8109",
243-
email = "ward.langeraert@inbo.be",
244-
role = "author",
245-
organization = "Research Institute for Nature and Forest (INBO)"
246-
),
247-
list(
248-
title = "Toon Van Daele",
249-
path = "https://orcid.org/0000-0002-1362-853X",
250-
role = "contributor",
251-
organization = "Research Institute for Nature and Forest (INBO)"
252-
)
253-
))),
254-
after = 9)
200+
after = 2)
255201
256202
# Warning: append() drops the custom datapackage class.
257203
# It can be added again by running b3data_package through create_package()

0 commit comments

Comments
 (0)