Create a record in Zenodo from eLTER data reporting format
Source:R/produce_zenodo_record.R
produce_zenodo_record_from_elter_reporting.Rd
This function allows to deposit a record to
Zenodo repository with the eLTER data reporting
format.
The function use the functions implemented by zen4r
package.
Blondel, Emmanuel, & Barde, Julien. (2021).
zen4R: R Interface to Zenodo REST API (0.5-2). Zenodo.
https://doi.org/10.5281/zenodo.5741143.
Usage
produce_zenodo_record_from_elter_reporting(
x,
saveRDS = FALSE,
filepath = tempdir(),
filename,
mytoken,
record_title,
record_description,
record_authors,
record_license = "CC-BY-SA-4.0",
record_accessRight = "open",
record_version = "1.0",
record_language = "eng",
record_keywords,
record_relatedIdentifier,
record_communities = c("lter-italy", "elter"),
record_grants
)
Arguments
- x
A
list
like the one created by functionreporting_produce_data_object_v1.3
- saveRDS
A
logical
. Save also object in RDS format. Defaults to FALSE.- filepath
A
character
file path. Defaults to temporary directory- filename
A
character
. Optional filename associated with the object, of the form provided as output by the functionreporting_compose_file_name
. Defaults to random string- mytoken
A
character
. Scopes assign permissions to your personal access token. A personal access token works just like a normal OAuth access token for authentication against the API. This token can be created at application page.- record_title
A
character
. The title of the record.- record_description
A
character
. The description of the record.- record_authors
A
tibble
. It is a list of creator(s) of the record. The approach is to use the firstname, lastname, affiliation, orcid of the authors of the record. Please follow the example.- record_license
A
character
. It is the license with which the record is released. The license should be set with the Zenodo id of the license. Default "CC-BY-SA-4.0". The supported licenses values are from https://opendefinition.org and https://spdx.org.- record_accessRight
A
character
. Default "open". Other options are: 'embargoed', 'restricted' and 'closed'.- record_version
A
character
. It is a version of the record. Default "1.0".- record_language
A
character
. It is the language of the record. Only one value is possible. Default "eng".- record_keywords
A
character
. A multiple values are possible. The keyword to the record of record.- record_relatedIdentifier
A
tibble
. It is the related entities (e.g. scientific paper, data paper, etc.) with the detaset. The tibble is composed by 2 variables: relation and identifier. Relation can be one of among following values: "isCitedBy", "cites", "isSupplementTo", "isSupplementedBy", "isNewVersionOf", "isPreviousVersionOf", "isPartOf", "hasPart", "compiles", "isCompiledBy", "isIdenticalTo", "isAlternateIdentifier". While identifier is any type of identifier (e.g. DOI).- record_communities
A
character
. It is a name of communities as created in Zenodo. A multiple values are possible. Default "lter-italy" and "elter".- record_grants
A
character
. A multiple values are possible. Put a list of project identifier as well as showed by the European Commission via OpenAIRE.
Value
A link (URL) of the deposited record in Zenodo. The user must then:
visit the webpage of record, 2. check the information provided, 3. 'save' and 'publish' the record on Zenodo repository, 4. use the DOI to cite the record.
See also
zen4R documentation https://github.com/eblondel/zen4R/wiki
Examples
if (FALSE) {
## Not run:
deimsid <- "https://deims.org/8eda49e9-1f4e-4f3e-b58e-e0bb25dc32a6"
time_span <- 2015 # e.g. whole year
time_span <- "20150302-20180415" # e.g. span between two dates
data_topic <- "VEG" # data provider defined abbreviation of "vegetation"
variable_group <- "SPECCOVER" # data provider defined abbreviation
version <- "V20220907"
filename <- reporting_compose_file_name(
deimsid = deimsid,
data_topic = data_topic,
variable_group = variable_group,
time_span = time_span,
version = version
)
data <- dplyr::tribble(
~id, ~value,
1, 7.5,
2, 4.2
)
station <- dplyr::tribble(
~SITE_CODE, ~STATION_CODE, ~STYPE, ~LAT, ~LON, ~ALTITUDE,
deimsid, "IP2", "AREA", 45.340805, 7.88887495, 265
)
method <- dplyr::tribble(
~VARIABLE, ~METH_DESCR,
"COVE_F", "Analysis of ammonium..."
)
research_object <- reporting_produce_data_object_v1.3(
filename = filename,
deimsid = deimsid,
data = data,
station = station,
method = method
)
authors <- tibble::tibble(
name = c("Luke", "Leia"),
surname = c("Skywalker", "Organa"),
affiliation = c("Tatooine", "Alderaan"),
orcid = c("0000-0002-7997-219X", "0000-0002-7997-219X")
)
keywords <- c("Star Wars", "species", "films", "planets")
relatedIdentifiers <- tibble::tibble(
relation = c("isSupplementTo", "isPartOf"),
identifier = c("10.1038/s4150-01-0032", "10.1016/j.2051.06.026")
)
grants <- c("871128", "654359", "871126")
produce_zenodo_record_from_elter_reporting(
x = research_object,
saveRDS = TRUE,
filepath = ".",
filename = filename,
mytoken = mytoken, # generate your Zenodo token
record_title = "The title of eLTER reporting",
record_description = "This is the description of the record of eLTER data
reporting format.",
record_authors = authors,
record_license = "CC-BY-SA-4.0",
record_accessRight = "open",
record_version = "1.0",
record_language = "eng",
record_keywords = keywords,
record_relatedIdentifier = relatedIdentifiers,
record_communities = "lter-italy",
record_grants = grants
)
}
## End (Not run)