{"id":29212164,"url":"https://github.com/b-cubed-eu/b3data-scripts","last_synced_at":"2025-07-02T22:30:34.689Z","repository":{"id":286796252,"uuid":"962580990","full_name":"b-cubed-eu/b3data-scripts","owner":"b-cubed-eu","description":"Scripts used to create the frictionless b3data data package","archived":false,"fork":false,"pushed_at":"2025-04-08T12:20:15.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-08T12:28:55.024Z","etag":null,"topics":["b3verse","data-cubes","data-package","frictionless"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/b-cubed-eu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-04-08T11:17:53.000Z","updated_at":"2025-04-08T11:43:02.000Z","dependencies_parsed_at":"2025-04-08T12:40:18.724Z","dependency_job_id":null,"html_url":"https://github.com/b-cubed-eu/b3data-scripts","commit_stats":null,"previous_names":["b-cubed-eu/b3data-scripts"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/b-cubed-eu/b3data-scripts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b-cubed-eu%2Fb3data-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b-cubed-eu%2Fb3data-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b-cubed-eu%2Fb3data-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b-cubed-eu%2Fb3data-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/b-cubed-eu","download_url":"https://codeload.github.com/b-cubed-eu/b3data-scripts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b-cubed-eu%2Fb3data-scripts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263225516,"owners_count":23433511,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["b3verse","data-cubes","data-package","frictionless"],"created_at":"2025-07-02T22:30:29.227Z","updated_at":"2025-07-02T22:30:34.639Z","avatar_url":"https://github.com/b-cubed-eu.png","language":"R","readme":"\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\u003c!-- badges: start --\u003e\n\n![GitHub](https://img.shields.io/github/license/b-cubed-eu/b3data-scripts)\n[![Release](https://img.shields.io/github/release/b-cubed-eu/b3data-scripts.svg)](https://github.com/b-cubed-eu/b3data-scripts/releases)\n[![repo\nstatus](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)\n![GitHub repo\nsize](https://img.shields.io/github/repo-size/b-cubed-eu/b3data-scripts)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.15190796.svg)](https://doi.org/10.5281/zenodo.15190796)\n\u003c!-- badges: end --\u003e\n\n# Scripts used to create the b3data frictionless data package\n\n[Langeraert, Ward![ORCID\nlogo](https://info.orcid.org/wp-content/uploads/2019/11/orcid_16x16.png)](https://orcid.org/0000-0002-5900-8109)[^1][^2][^3]\n[Van Daele, Toon![ORCID\nlogo](https://info.orcid.org/wp-content/uploads/2019/11/orcid_16x16.png)](https://orcid.org/0000-0002-1362-853X)[^4][^5]\nResearch Institute for Nature and Forest (INBO)[^6] European Union’s\nHorizon Europe Research and Innovation Programme (ID No 101059592)[^7]\n\n**keywords**: data package; b3verse; frictionless; data cubes\n\n\u003c!-- community: b3 --\u003e\n\u003c!-- community: inbo --\u003e\n\u003c!-- description: start --\u003e\n\nThis repository contains scripts to create the b3data\n[frictionless](https://docs.ropensci.org/frictionless/) data package.\nThis data package includes data resources used across the\n[b3verse](https://docs.b-cubed.eu/guides/b3verse/) and is published on\n[Zenodo](https://doi.org/10.5281/zenodo.15181097).\n\u003c!-- description: end --\u003e\n\nThis code is developed in context of **T5.5** of the [B-Cubed\nproject](https://b-cubed.eu/).\n\n## Order of execution\n\nFollow the steps below to run the scripts in a logical order.\n\n**1.** `create_b3data_package.Rmd`\n\n- creates the data package\n- adds tabular resources\n- writes data package\n\n**2.** `add_spatial_resources.Rmd`\n\n- loads data package\n- adds spatial resources\n- writes data package\n\n## 📦 The `b3data` data package\n\n- **Name**: `b3data`\n- **Published at**:\n  [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.15181097.svg)](https://doi.org/10.5281/zenodo.15181097)\n- **Used in**: [b3verse](https://docs.b-cubed.eu/guides/b3verse/)\n- **Importable in R via**:\n  [frictionless](https://docs.ropensci.org/frictionless/) R package\n\nResources can be imported in R like this:\n\n### Step 1 — Load the frictionless R package\n\n``` r\n# install.packages(\"frictionless\")\nlibrary(frictionless)\n```\n\n### Step 2 — Read the package descriptor from Zenodo\n\nThe content of the data package can be consulted using `read_package()`.\n\n``` r\nb3data_package \u003c- read_package(\"https://zenodo.org/records/15211029/files/datapackage.json\")\nb3data_package\n#\u003e A Data Package with 2 resources:\n#\u003e • bird_cube_belgium_mgrs10\n#\u003e • mgrs10_refgrid_belgium\n#\u003e For more information, see \u003chttps://doi.org/10.5281/zenodo.15211029\u003e.\n#\u003e Use `unclass()` to print the Data Package as a list.\n```\n\n### Step 3 — Import a resource (dataset)\n\nTabular datasets can be loaded using `read_resource()`.\n\n``` r\nbird_cube_belgium \u003c- read_resource(b3data_package, \"bird_cube_belgium_mgrs10\")\nhead(bird_cube_belgium)\n#\u003e # A tibble: 6 × 8\n#\u003e    year mgrscode specieskey species          family     n mincoordinateuncerta…¹\n#\u003e   \u003cdbl\u003e \u003cchr\u003e         \u003cdbl\u003e \u003cchr\u003e            \u003cchr\u003e  \u003cdbl\u003e                  \u003cdbl\u003e\n#\u003e 1  2000 31UDS65     2473958 Perdix perdix    Phasi…     1                   3536\n#\u003e 2  2000 31UDS65     2474156 Coturnix coturn… Phasi…     1                   3536\n#\u003e 3  2000 31UDS65     2474377 Fulica atra      Ralli…     5                   1000\n#\u003e 4  2000 31UDS65     2475443 Merops apiaster  Merop…     6                   1000\n#\u003e 5  2000 31UDS65     2480242 Vanellus vanell… Chara…     1                   3536\n#\u003e 6  2000 31UDS65     2480637 Accipiter nisus  Accip…     1                   3536\n#\u003e # ℹ abbreviated name: ¹​mincoordinateuncertaintyinmeters\n#\u003e # ℹ 1 more variable: familycount \u003cdbl\u003e\n```\n\nFor non-tabular resources (e.g. spatial or raster data), use packages\nlike `sf` or `terra` directly.\n\n``` r\nmgrs10_belgium \u003c- sf::st_read(\n  \"https://zenodo.org/records/15211029/files/mgrs10_refgrid_belgium.gpkg\",\n  quiet = TRUE)\nhead(mgrs10_belgium)\n#\u003e Simple feature collection with 6 features and 1 field\n#\u003e Geometry type: POLYGON\n#\u003e Dimension:     XY\n#\u003e Bounding box:  xmin: 460000.1 ymin: 5620000 xmax: 480000.1 ymax: 5670000\n#\u003e Projected CRS: WGS 84 / UTM zone 31N\n#\u003e   mgrscode                           geom\n#\u003e 1  31UDS65 POLYGON ((470000.1 5651000,...\n#\u003e 2  31UDS66 POLYGON ((470000.1 5661000,...\n#\u003e 3  31UDS72 POLYGON ((480000 5621000, 4...\n#\u003e 4  31UDS73 POLYGON ((480000.1 5631000,...\n#\u003e 5  31UDS74 POLYGON ((480000.1 5641000,...\n#\u003e 6  31UDS75 POLYGON ((480000.1 5651000,...\n```\n\n## 📁 Repository structure\n\n    ├── source                         ├ R markdown files\n    │   └── R                          ├ R scripts\n    ├── data\n    │   ├── raw                        ├ create this folder and store raw data\n    │   ├── processed                  ├ store processed data\n    │   └── b3data_package             ├ b3data frictionless data package\n    ├── checklist.yml                  ├ options checklist package (https://github.com/inbo/checklist)\n    ├── organisation.yml               ├ organisation info (https://inbo.github.io/checklist/articles/organisation.html)\n    ├── inst\n    │   └── en_gb.dic                  ├ dictionary with words that should not be checked by the checklist package\n    ├── .github                        │ \n    │   ├── workflows                  │ \n    │   │   └── checklist_project.yml  ├ GitHub action settings\n    │   ├── CODE_OF_CONDUCT.md         │ \n    │   └── CONTRIBUTING.md            │\n    ├── b3data-scripts.Rproj           ├ R project\n    ├── README.md                      ├ project description\n    ├── LICENSE.md                     ├ license\n    ├── CITATION.cff                   ├ citation info\n    ├── .zenodo.json                   ├ zenodo metadata\n    └── .gitignore                     ├ files to ignore\n\n[^1]: author\n\n[^2]: contact person\n\n[^3]: Research Institute for Nature and Forest (INBO), Herman\n    Teirlinckgebouw, Havenlaan 88 PO Box 73, B-1000 Brussels, Belgium\n\n[^4]: author\n\n[^5]: Research Institute for Nature and Forest (INBO), Herman\n    Teirlinckgebouw, Havenlaan 88 PO Box 73, B-1000 Brussels, Belgium\n\n[^6]: copyright holder\n\n[^7]: funder\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb-cubed-eu%2Fb3data-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fb-cubed-eu%2Fb3data-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb-cubed-eu%2Fb3data-scripts/lists"}