This function create a geolocator data package R object. The arguments of the functions correspond to the standard geolocator Data Package properties.
This function initiate a Geolocator Data Package R object. This function is similar to
frictionless::create_package()
but required specific metadata provided as arguments to the
function rather than the list descriptor
. These arguments correspond to field of
datapackage.json
.
A geolocator data package is also a Data Package object created by
frictionless::create_package()
and most (all?) functions
from the frictionless package should work.
Note that this function does not add any data resources, it returns an empty shell with only project level metadata.
Usage
create_gldp(
title,
contributors,
embargo = "1970-01-01",
licenses = list(list(name = "CC-BY-4.0", title = "Creative Commons Attribution 4.0",
path = "https://creativecommons.org/licenses/by/4.0/")),
id = NULL,
description = NULL,
version = NULL,
relatedIdentifiers = NULL,
grants = NULL,
keywords = NULL,
created = format(as.POSIXct(Sys.time(), tz = "UTC"), "%Y-%m-%dT%H:%M:%SZ"),
bibliographicCitation = NULL,
schema = NULL
)
Arguments
- title
A string providing a title or one sentence description for this package. It should be plain text (no markup), capitalised like a title, NOT end in a period and less than 65 characters. See Geolocator DP and thw Data Package specification.
- contributors
A list of contributors, where each contributor is a list with properties including at leas
title
but also optionallygivenName
,familyName
,path
,email
,roles
, andorganization
. See the Geolocator DP, the Data Package specification and the R Packages.- embargo
End date of the embargo. Default to
"1970-01-01"
. See the Geolocator DP and the Data Package specification.- licenses
A list of licenses under which the data is provided. Usually, a single license if sufficient and prefered. If you're not sure, checkout the Creative Commons License Chooser and the Open Data Commons .
name
orpath
must be provided. Defaults is a CC-BY-4.0 license. See the Geolocator DP and the Data Package specification.- id
A globally unique identifier for the package, typically the DOI link of the corresponding Zenodo repository which can be reserved prior to publication . Default to
NULL
. See the Geolocator DP and the Data Package specification.- description
A markdown-formatted string describing the package. You can (and should!) use multiple sentences, but limited to a single paragraph. See the Geolocator DP and the Data Package specification.
- version
(optional) A version string identifying the version of the package, following Semantic Versioning. Defaults to "1.0.0". See Geolocator DP and the Data Package specification and Data Package Version recipe.
(optional) A list of related identifiers for the package. Each related identifier is a list with properties
relationType
andrelatedIdentifier
. See the Geolocator DP and the Camtrap DP specification .- grants
(optional) A list of grants that funded the creation of the package. See the Geolocator DP and the Data Package specification.
- keywords
(optional) A list of keywords to assist users in searching for the package. See the Geolocator DP and the Data Package specification.
- created
Datetime on which this was created. See the Geolocator DP and the Data Package specification.
- bibliographicCitation
(optional) A string providing a citation for the package. See the Geolocator DP and the Data Package specification.
- schema
(optional) A URL to the JSON Table Schema that describes the data package. Defaults to the GeoLocator Data Package profile. See the Data Package specification .
Examples
# Create a Data Package with, at minimum a title and a list of contributors.
pkg <- create_gldp(
title = "Geolocator Data Package example",
contributors = list(
list(
title = "Raphaël Nussbaumer",
roles = c("ContactPerson", "DataCurator", "ProjectLeader")
),
list(
title = "Yann Rime",
roles = c("Researcher")
)
)
)
pkg
#>
#> ── A GeoLocator Data Package (v0.2)
#> • title: "Geolocator Data Package example"
#> • contributors:
#> Raphaël Nussbaumer (ContactPerson, DataCurator, ProjectLeader)
#> Yann Rime (Researcher)
#> • embargo: 1970-01-01
#> • licenses: Creative Commons Attribution 4.0 (CC-BY-4.0) -
#> <https://creativecommons.org/licenses/by/4.0/>
#> • created: 2025-01-17 12:33:38
#> • spatial:
#> • temporal: to
#> • taxonomic:
#> • numberTags:
#>
#> ── 0 resources.
#> Use `unclass()` to print the Geolocator Data Package as a list.
# See the structure of the (empty) Data Package
str(pkg)
#> List of 8
#> $ title : chr "Geolocator Data Package example"
#> $ contributors:List of 2
#> ..$ :List of 2
#> .. ..$ title: chr "Raphaël Nussbaumer"
#> .. ..$ roles: chr [1:3] "ContactPerson" "DataCurator" "ProjectLeader"
#> ..$ :List of 2
#> .. ..$ title: chr "Yann Rime"
#> .. ..$ roles: chr "Researcher"
#> $ embargo : chr "1970-01-01"
#> $ licenses :List of 1
#> ..$ :List of 3
#> .. ..$ name : chr "CC-BY-4.0"
#> .. ..$ title: chr "Creative Commons Attribution 4.0"
#> .. ..$ path : chr "https://creativecommons.org/licenses/by/4.0/"
#> $ created : chr "2025-01-17T12:33:38Z"
#> $ $schema : 'glue' chr "https://raw.githubusercontent.com/Rafnuss/GeoLocator-DP/v0.2/geolocator-dp-profile.json"
#> $ resources : list()
#> $ directory : chr "."
#> - attr(*, "class")= chr [1:3] "geolocatordp" "datapackage" "list"
#> - attr(*, "version")= 'glue' chr "v0.2"
# Create a Data Package with all possible metadata
pkg <- create_gldp(
title = "Geolocator Data Package example",
contributors = list(
list(
title = "Raphaël Nussbaumer",
roles = c("ContactPerson", "DataCurator", "ProjectLeader")
),
list(
title = "Yann Rime",
roles = c("Researcher")
)
),
embargo = "2025-01-01",
id = "https://doi.org/10.5281/zenodo.13829929",
version = "1.0.1",
relatedIdentifiers = list(
list(
relationType = "IsPartOf",
relatedIdentifier = "10.5281/zenodo.11207081",
relatedIdentifierType = "DOI"
),
list(
relationType = "IsSupplementTo",
relatedIdentifier = "",
relatedIdentifierType = "DOI"
)
),
grants = c("Swiss National Fundation grant no. 354251"),
keywords = c("Woodland Kingfisher", "intra-african", "multi-sensor geolocator")
)