Title: | An API Client for the Environmental Data Initiative Repository |
---|---|
Description: | A client for the Environmental Data Initiative repository REST API. The 'EDI' data repository <https://portal.edirepository.org/nis/home.jsp> is for publication and reuse of ecological data with emphasis on metadata accuracy and completeness. It is built upon the 'PASTA+' software stack <https://pastaplus-core.readthedocs.io/en/latest/index.html#> and was developed in collaboration with the US 'LTER' Network <https://lternet.edu/>. 'EDIutils' includes functions to search and access existing data, evaluate and upload new data, and assist other data management tasks common to repository users. |
Authors: | Colin Smith [aut, cre] |
Maintainer: | Colin Smith <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.0.3 |
Built: | 2024-08-29 23:12:30 UTC |
Source: | https://github.com/ropensci/EDIutils |
Check data package creation status
check_status_create(transaction, wait = TRUE, env = "production")
check_status_create(transaction, wait = TRUE, env = "production")
transaction |
(character) Transaction identifier |
wait |
(logical) Wait for evaluation to complete? See details below. |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
If wait = TRUE
, then the function will enter a "while" loop
checking every 2 seconds for the completed evaluation report. If
wait = FALSE
, then the function will only check once and return the
result.
(logical) TRUE if creation has completed, FALSE if in progress, and error if an error was encountered while processing the request
User authentication is required (see login()
)
Other Evaluation and Upload:
check_status_evaluate()
,
check_status_update()
,
create_data_package()
,
evaluate_data_package()
,
update_data_package()
## Not run: login() # Create data package transaction <- create_data_package( eml = paste0(tempdir(), "/edi.595.1.xml"), env = "staging" ) transaction #> [1] "create_163966765080210573__edi.595.1" # Check creation status status <- check_status_create( transaction = transaction, env = "staging" ) status #> [1] TRUE logout() ## End(Not run)
## Not run: login() # Create data package transaction <- create_data_package( eml = paste0(tempdir(), "/edi.595.1.xml"), env = "staging" ) transaction #> [1] "create_163966765080210573__edi.595.1" # Check creation status status <- check_status_create( transaction = transaction, env = "staging" ) status #> [1] TRUE logout() ## End(Not run)
Check status of data package evaluation
check_status_evaluate(transaction, wait = TRUE, env = "production")
check_status_evaluate(transaction, wait = TRUE, env = "production")
transaction |
(character) Transaction identifier |
wait |
(logical) Wait for evaluation to complete? See details below. |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
If wait = TRUE
, then the function will enter a "while" loop
checking every 2 seconds for the completed evaluation report. If
wait = FALSE
, then the function will only check once and return the
result.
(logical) TRUE if evaluation has completed, FALSE if in progress, and error if an error was encountered while processing the request
User authentication is required (see login()
)
Other Evaluation and Upload:
check_status_create()
,
check_status_update()
,
create_data_package()
,
evaluate_data_package()
,
update_data_package()
## Not run: login() # Evaluate data package transaction <- evaluate_data_package( eml = paste0(tempdir(), "/edi.595.1.xml"), env = "staging" ) transaction #> [1] "evaluate_163966785813042760" # Check evaluation status status <- check_status_evaluate( transaction = transaction, env = "staging" ) status #> [1] TRUE logout() ## End(Not run)
## Not run: login() # Evaluate data package transaction <- evaluate_data_package( eml = paste0(tempdir(), "/edi.595.1.xml"), env = "staging" ) transaction #> [1] "evaluate_163966785813042760" # Check evaluation status status <- check_status_evaluate( transaction = transaction, env = "staging" ) status #> [1] TRUE logout() ## End(Not run)
Check data package update status
check_status_update(transaction, wait = TRUE, env = "production")
check_status_update(transaction, wait = TRUE, env = "production")
transaction |
(character) Transaction identifier |
wait |
(logical) Wait for evaluation to complete? See details below. |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
If wait = TRUE
, then the function will enter a "while" loop
checking every 2 seconds for the completed evaluation report. If
wait = FALSE
, then the function will only check once and return the
result.
(logical) TRUE if the update has completed, FALSE if in progress, and error if an error was encountered while processing the request
User authentication is required (see login()
)
Other Evaluation and Upload:
check_status_create()
,
check_status_evaluate()
,
create_data_package()
,
evaluate_data_package()
,
update_data_package()
## Not run: login() # Update data package transaction <- update_data_package( eml = paste0(tempdir(), "/edi.595.2.xml"), env = "staging" ) transaction #> [1] "update_edi.595_163966788658131920__edi.595.2" # Check update status status <- check_status_update( transaction = transaction, env = "staging" ) status #> [1] TRUE logout() ## End(Not run)
## Not run: login() # Update data package transaction <- update_data_package( eml = paste0(tempdir(), "/edi.595.2.xml"), env = "staging" ) transaction #> [1] "update_edi.595_163966788658131920__edi.595.2" # Check update status status <- check_status_update( transaction = transaction, env = "staging" ) status #> [1] TRUE logout() ## End(Not run)
Create data package
create_data_package(eml, env = "production")
create_data_package(eml, env = "production")
eml |
(character) Full path to an EML file describing the data package to be created |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
Each data entity described in eml
must be accompanied by a
web accessible URL at the EML XPath ".//physical/distribution/online/url".
The EDI data repository downloads the data entities via this URL. The URLs
must be static and not have any redirects otherwise the data entities will
not be downloaded.
transaction (character) Transaction identifier. May be used in a
subsequent call to check_status_create()
to determine the operation
status
User authentication is required (see login()
)
Other Evaluation and Upload:
check_status_create()
,
check_status_evaluate()
,
check_status_update()
,
evaluate_data_package()
,
update_data_package()
## Not run: login() # Create data package transaction <- create_data_package( eml = paste0(tempdir(), "/edi.595.1.xml"), env = "staging" ) transaction #> [1] "create_163966765080210573__edi.595.1" # Check creation status status <- check_status_create( transaction = transaction, env = "staging" ) status #> [1] TRUE logout() ## End(Not run)
## Not run: login() # Create data package transaction <- create_data_package( eml = paste0(tempdir(), "/edi.595.1.xml"), env = "staging" ) transaction #> [1] "create_163966765080210573__edi.595.1" # Check creation status status <- check_status_create( transaction = transaction, env = "staging" ) status #> [1] TRUE logout() ## End(Not run)
This function is DEPRECATED.
create_data_package_archive(packageId, env = "production")
create_data_package_archive(packageId, env = "production")
packageId |
(character) Data package identifier |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
transaction (character) Transaction identifier.
Other Miscellaneous:
create_dn()
,
is_authorized()
Create a users distinguished name
create_dn(userId, ou = "EDI")
create_dn(userId, ou = "EDI")
userId |
(character) User identifier of an EDI data repository account |
ou |
(character) Organizational unit in which |
(character) Distinguished name
Other Miscellaneous:
create_data_package_archive()
,
is_authorized()
# For an EDI account dn <- create_dn(userId = "my_userid", ou = "EDI") dn # For an LTER account dn <- create_dn(userId = "my_userid", ou = "LTER") dn
# For an EDI account dn <- create_dn(userId = "my_userid", ou = "EDI") dn # For an LTER account dn <- create_dn(userId = "my_userid", ou = "LTER") dn
Create event subscription
create_event_subscription(packageId, url, env = "production")
create_event_subscription(packageId, url, env = "production")
packageId |
(character) Data package identifier |
url |
(character) Where the event notification will be sent |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(numeric) Event subscription identifier
User authentication is required (see login()
)
The url
must have "http" as its scheme and must be able to receive
POST requests with MIME type text/plain. Additionally, because the
url
will be passed in an XML body, some characters must be escaped,
such as ampersands from & to &.
Other Event Notifications:
delete_event_subscription()
,
execute_event_subscription()
,
get_event_subscription_schema()
,
get_event_subscription()
,
query_event_subscriptions()
## Not run: login() # Create subscription subscriptionId <- create_event_subscription( packageId = "knb-lter-vcr.340.1", url = "https://my.webserver.org/", env = "staging" ) subscriptionId #> [1] 48 # Execute subscription execute_event_subscription(subscriptionId, env = "staging") #> [1] TRUE # Delete subscription delete_event_subscription(subscriptionId, env = "staging") #> [1] TRUE logout() ## End(Not run)
## Not run: login() # Create subscription subscriptionId <- create_event_subscription( packageId = "knb-lter-vcr.340.1", url = "https://my.webserver.org/", env = "staging" ) subscriptionId #> [1] 48 # Execute subscription execute_event_subscription(subscriptionId, env = "staging") #> [1] TRUE # Delete subscription delete_event_subscription(subscriptionId, env = "staging") #> [1] TRUE logout() ## End(Not run)
Create journal citation
create_journal_citation( packageId, articleDoi = NULL, articleUrl = NULL, articleTitle = NULL, journalTitle = NULL, relationType, env = "production" )
create_journal_citation( packageId, articleDoi = NULL, articleUrl = NULL, articleTitle = NULL, journalTitle = NULL, relationType, env = "production" )
packageId |
(character) Data package identifier |
articleDoi |
(character) Article DOI. Required if |
articleUrl |
(character) Article URL. Required if |
articleTitle |
(character) Article title |
journalTitle |
(character) Journal title |
relationType |
(character) Relation between citation and data package. Can be: "IsCitedBy" this data package is formally cited in the manuscript; "IsDescribedBy" - this data package is explicitly described within the manuscript; "IsReferencedBy" - this data package is implicitly described within the manuscript. |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
Creates a new journal citation entry in the EDI data repository
(numeric) Journal citation identifier
User authentication is required (see login()
)
Other Journal Citations:
delete_journal_citation()
,
get_journal_citation()
,
list_data_package_citations()
,
list_principal_owner_citations()
## Not run: login() # Create journal citation journalCitationId <- create_journal_citation( packageId = "edi.17.1", articleDoi = "10.1890/11-1026.1", articleTitle = "Corridors promote fire via connectivity and edge effects", journalTitle = "Ecological Applications", relationType = "IsCitedBy", env = "staging" ) journalCitationId #> [1] 74 # Delete journal citation delete_journal_citation(journalCitationId, env = "staging") #> [1] TRUE logout() ## End(Not run)
## Not run: login() # Create journal citation journalCitationId <- create_journal_citation( packageId = "edi.17.1", articleDoi = "10.1890/11-1026.1", articleTitle = "Corridors promote fire via connectivity and edge effects", journalTitle = "Ecological Applications", relationType = "IsCitedBy", env = "staging" ) journalCitationId #> [1] 74 # Delete journal citation delete_journal_citation(journalCitationId, env = "staging") #> [1] TRUE logout() ## End(Not run)
Reserves the next available identifier for the specified scope
create_reservation(scope, env = "production")
create_reservation(scope, env = "production")
scope |
(character) Scope of data package |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(numeric) Identifier of reserved data package
User authentication is required (see login()
)
Other Identifier Reservations:
delete_reservation()
,
list_active_reservations()
,
list_reservation_identifiers()
## Not run: login() # Create reservation identifier <- create_reservation(scope = "edi", env = "staging") identifier #> [1] 604 # Delete reservation delete_reservation(scope = "edi", identifier = identifier, env = "staging") #> [1] 604 logout() ## End(Not run)
## Not run: login() # Create reservation identifier <- create_reservation(scope = "edi", env = "staging") identifier #> [1] 604 # Delete reservation delete_reservation(scope = "edi", identifier = identifier, env = "staging") #> [1] 604 logout() ## End(Not run)
Delete event subscription
delete_event_subscription(subscriptionId, env = "production")
delete_event_subscription(subscriptionId, env = "production")
subscriptionId |
(numeric) Event subscription identifier |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
After "deletion", the subscription might still exist in the subscription database, but it will be inactive - it will not conflict with future creation requests, it cannot be read, and it will not be notified of events.
(logical) TRUE if the event subscription was deleted
User authentication is required (see login()
)
Other Event Notifications:
create_event_subscription()
,
execute_event_subscription()
,
get_event_subscription_schema()
,
get_event_subscription()
,
query_event_subscriptions()
## Not run: login() # Create subscription subscriptionId <- create_event_subscription( packageId = "knb-lter-vcr.340.1", url = "https://my.webserver.org/", env = "staging" ) subscriptionId #> [1] 48 # Execute subscription execute_event_subscription( subscriptionId = subscriptionId, env = "staging" ) #> [1] TRUE # Delete subscription delete_event_subscription(subscriptionId, env = "staging") #> [1] TRUE logout() ## End(Not run)
## Not run: login() # Create subscription subscriptionId <- create_event_subscription( packageId = "knb-lter-vcr.340.1", url = "https://my.webserver.org/", env = "staging" ) subscriptionId #> [1] 48 # Execute subscription execute_event_subscription( subscriptionId = subscriptionId, env = "staging" ) #> [1] TRUE # Delete subscription delete_event_subscription(subscriptionId, env = "staging") #> [1] TRUE logout() ## End(Not run)
Delete journal citation
delete_journal_citation(journalCitationId, env = "production")
delete_journal_citation(journalCitationId, env = "production")
journalCitationId |
(numeric) Journal citation identifier |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(logical) TRUE if deleted
User authentication is required (see login()
)
Other Journal Citations:
create_journal_citation()
,
get_journal_citation()
,
list_data_package_citations()
,
list_principal_owner_citations()
## Not run: login() # Create journal citation journalCitationId <- create_journal_citation( packageId = "edi.17.1", articleDoi = "https://doi.org/10.1890/11-1026.1", articleTitle = "Corridors promote fire via connectivity and edge effects", journalTitle = "Ecological Applications", relationType = "IsCitedBy", env = "staging" ) journalCitationId #> [1] 74 # Delete journal citation delete_journal_citation(journalCitationId, env = "staging") #> [1] TRUE logout() ## End(Not run)
## Not run: login() # Create journal citation journalCitationId <- create_journal_citation( packageId = "edi.17.1", articleDoi = "https://doi.org/10.1890/11-1026.1", articleTitle = "Corridors promote fire via connectivity and edge effects", journalTitle = "Ecological Applications", relationType = "IsCitedBy", env = "staging" ) journalCitationId #> [1] 74 # Delete journal citation delete_journal_citation(journalCitationId, env = "staging") #> [1] TRUE logout() ## End(Not run)
Delete reservation
delete_reservation(scope, identifier, env = "production")
delete_reservation(scope, identifier, env = "production")
scope |
(character) Scope of data package |
identifier |
(numeric) Identifier of data package |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(numeric) The deleted reservation identifier value
User authentication is required (see login()
). The same user
who originally authenticated to create the reservation must authenticate to
delete it.
Other Identifier Reservations:
create_reservation()
,
list_active_reservations()
,
list_reservation_identifiers()
## Not run: login() # Create reservation identifier <- create_reservation(scope = "edi", env = "staging") identifier #> [1] 604 # Delete reservation delete_reservation(scope = "edi", identifier = identifier, env = "staging") #> [1] 604 logout() ## End(Not run)
## Not run: login() # Create reservation identifier <- create_reservation(scope = "edi", env = "staging") identifier #> [1] 604 # Delete reservation delete_reservation(scope = "edi", identifier = identifier, env = "staging") #> [1] 604 logout() ## End(Not run)
Evaluate data package
evaluate_data_package(eml, useChecksum = FALSE, env = "production")
evaluate_data_package(eml, useChecksum = FALSE, env = "production")
eml |
(character) Full path to an EML file describing the data package to be evaluated |
useChecksum |
(logical) Use data entities from a previous version of the data package? See details below. |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
Each data entity described in eml
must be accompanied by a
web accessible URL at the EML XPath ".//physical/distribution/online/url".
The EDI data repository downloads the data entities via this URL. The URLs
must be static and not have any redirects otherwise the data entities will
not be downloaded.
An optional query parameter, "useChecksum", can be appended to the URL. When specified, the useChecksum query parameter directs the repository to determine whether it can use an existing copy of a data entity from a previous revision of the data package based on matching a metadata-documented checksum value (MD5 or SHA-1) to the checksum of the existing copy. If a match is found, the repository will skip the upload of the data entity from the remote URL and instead use its matching copy. Specifying "useChecksum" can save time by eliminating data uploads, but clients should take care to ensure that metadata-documented checksum values are accurate and up to date.
transaction (character) Transaction identifier. May be used in a subsequent call to:
check_status_evaluate()
to determine the operation status
read_evaluate_report()
to read the evaluation report
read_evaluate_report_summary()
to summarize the evaluation
report and raise exceptions
User authentication is required (see login()
)
Other Evaluation and Upload:
check_status_create()
,
check_status_evaluate()
,
check_status_update()
,
create_data_package()
,
update_data_package()
## Not run: login() transaction <- evaluate_data_package( eml = paste0(tempdir(), "/edi.595.1.xml"), env = "staging" ) transaction #> [1] "evaluate_163966785813042760" # Check evaluation status status <- check_status_evaluate(transaction, env = "staging") status #> [1] TRUE # Read evaluation report report <- read_evaluate_report(transaction, env = "staging") report #> {xml_document} #> <qualityReport schemaLocation="eml://ecoinformatics.org/qualityReport ... #> [1] <creationDate>2021-12-15T17:46:33</creationDate> #> [2] <packageId>edi.595.1</packageId> #> [3] <includeSystem>lter</includeSystem> #> [4] <includeSystem>knb</includeSystem> #> [5] <datasetReport>\n <qualityCheck qualityType="metadata" system=" ... #> [6] <entityReport>\n <entityName>data.txt</entityName>\n <qualityC ... # Summarize evaluation report read_evaluate_report_summary(transaction, env = "staging") #> =================================================== #> EVALUATION REPORT #> =================================================== #> #> PackageId: edi.595.1 #> Report Date/Time: 2021-12-15T17:46:33 #> Total Quality Checks: 29 #> Valid: 21 #> Info: 8 #> Warn: 0 #> Error: 0 logout() ## End(Not run)
## Not run: login() transaction <- evaluate_data_package( eml = paste0(tempdir(), "/edi.595.1.xml"), env = "staging" ) transaction #> [1] "evaluate_163966785813042760" # Check evaluation status status <- check_status_evaluate(transaction, env = "staging") status #> [1] TRUE # Read evaluation report report <- read_evaluate_report(transaction, env = "staging") report #> {xml_document} #> <qualityReport schemaLocation="eml://ecoinformatics.org/qualityReport ... #> [1] <creationDate>2021-12-15T17:46:33</creationDate> #> [2] <packageId>edi.595.1</packageId> #> [3] <includeSystem>lter</includeSystem> #> [4] <includeSystem>knb</includeSystem> #> [5] <datasetReport>\n <qualityCheck qualityType="metadata" system=" ... #> [6] <entityReport>\n <entityName>data.txt</entityName>\n <qualityC ... # Summarize evaluation report read_evaluate_report_summary(transaction, env = "staging") #> =================================================== #> EVALUATION REPORT #> =================================================== #> #> PackageId: edi.595.1 #> Report Date/Time: 2021-12-15T17:46:33 #> Total Quality Checks: 29 #> Valid: 21 #> Info: 8 #> Warn: 0 #> Error: 0 logout() ## End(Not run)
Execute event subscription
execute_event_subscription(subscriptionId, env = "production")
execute_event_subscription(subscriptionId, env = "production")
subscriptionId |
(numeric) Event subscription identifier |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
Upon notification, the event manager queries its database for the subscription matching the specified subscriptionId. POST requests are then made (asynchronously) to the matching subscription.
(logical) TRUE if the event subscription was executed
User authentication is required (see login()
)
Other Event Notifications:
create_event_subscription()
,
delete_event_subscription()
,
get_event_subscription_schema()
,
get_event_subscription()
,
query_event_subscriptions()
## Not run: login() # Create subscription subscriptionId <- create_event_subscription( packageId = "knb-lter-vcr.340.1", url = "https://my.webserver.org/", env = "staging" ) subscriptionId #> [1] 48 # Execute subscription execute_event_subscription( subscriptionId = subscriptionId, env = "staging" ) #> [1] TRUE # Delete subscription delete_event_subscription(subscriptionId, env = "staging") #> [1] TRUE logout() ## End(Not run)
## Not run: login() # Create subscription subscriptionId <- create_event_subscription( packageId = "knb-lter-vcr.340.1", url = "https://my.webserver.org/", env = "staging" ) subscriptionId #> [1] 48 # Execute subscription execute_event_subscription( subscriptionId = subscriptionId, env = "staging" ) #> [1] TRUE # Delete subscription delete_event_subscription(subscriptionId, env = "staging") #> [1] TRUE logout() ## End(Not run)
Get audit count
get_audit_count(query, env = "production")
get_audit_count(query, env = "production")
query |
(character) Query (see details below) |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
Query parameters are specified as key=value pairs, multiple pairs must be delimited with ampersands (&), and only a single value should be specified for a particular key. The following query parameter keys are allowed:
category - Can be: debug, info, error, warn
service - Any of the EDI data repository services
serviceMethod - Any of the EDI data repository service Resource class JAX-RS methods
user - Any user
group - Any group
authSystem - A valid auth system identifier
status - A valid HTTP Response Code
resourceId - An EDI data repository resource identifier, e.g. https://pasta.lternet.edu/package/eml/knb-lter-and/2719/6, or a substring thereof (see details below)
fromTime - An ISO8601 timestamp
toTime - An ISO8601 timestamp
limit - A positive whole number
The query parameters fromTime and optionally toTime should be used to indicate a time span. When toTime is absent, the count will include of all matching records up to the current time. Either of these parameters may only be used once. The query parameter limit sets an upper limit on the number of audit records returned. For example, "limit=1000". The query parameter resourceId will match any audit log entry whose resourceId value contains the specified string value. Thus, a query parameter of "resourceId=knb-lter-and" will match any audit log entry whose resourceId value contains the substring "knb-lter-and", while a query parameter of "resourceId=knb-lter-and/2719/6" will match any audit log entry whose resourceId value contains the substring "knb-lter-and/2719/6".
(numeric) Returns a count of the number of audit records matching the query parameters as specified in the request.
User authentication is required (see login()
)
Other Audit Manager Services:
get_audit_record()
,
get_audit_report()
,
get_docid_reads()
,
get_packageid_reads()
,
get_recent_uploads()
## Not run: login() # Count the number of warnings issued between 2021-12-01 and 2021-12-05 res <- get_audit_count( query = "category=warn&fromTime=2021-12-01&toTime=2021-12-05" ) res #> [1] 10022 logout() ## End(Not run)
## Not run: login() # Count the number of warnings issued between 2021-12-01 and 2021-12-05 res <- get_audit_count( query = "category=warn&fromTime=2021-12-01&toTime=2021-12-05" ) res #> [1] 10022 logout() ## End(Not run)
Get audit record
get_audit_record(oid, as = "data.frame", env = "production")
get_audit_record(oid, as = "data.frame", env = "production")
oid |
(numeric) Audit identifier |
as |
(character) Format of the returned object. Can be: "data.frame" or "xml". |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(data.frame or xml_document) An audit record
User authentication is required (see login()
)
Other Audit Manager Services:
get_audit_count()
,
get_audit_report()
,
get_docid_reads()
,
get_packageid_reads()
,
get_recent_uploads()
## Not run: login() # Get audit report auditReport <- get_audit_record(oid = "121606334") logout() ## End(Not run)
## Not run: login() # Get audit report auditReport <- get_audit_record(oid = "121606334") logout() ## End(Not run)
Get audit report
get_audit_report(query, as = "data.frame", env = "production")
get_audit_report(query, as = "data.frame", env = "production")
query |
(character) Query (see details below) |
as |
(character) Format of the returned object. Can be: "data.frame" or "xml". |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
Query parameters are specified as key=value pairs, multiple pairs must be delimited with ampersands (&), and only a single value should be specified for a particular key. The following query parameter keys are allowed:
category - Can be: debug, info, error, warn
service - Any of the EDI data repository services
serviceMethod - Any of the EDI data repository service Resource class JAX-RS methods
user - Any user
group - Any group
authSystem - A valid auth system identifier
status - A valid HTTP Response Code
resourceId - An EDI data repository resource identifier, e.g. https://pasta.lternet.edu/package/eml/knb-lter-and/2719/6, or a thereof (see details below)
fromTime - An ISO8601 timestamp
toTime - An ISO8601 timestamp
limit - A positive whole number
The query parameters fromTime and optionally toTime should be used to indicate a time span. When toTime is absent, the report will consist of all matching records up to the current time. Either of these parameters may only be used once. The query parameter limit sets an upper limit on the number of audit records returned. For example, "limit=1000". The query parameter resourceId will match any audit log entry whose resourceId value contains the specified string value. Thus, a query parameter of "resourceId=knb-lter-and" will match any audit log entry whose resourceId value contains the substring "knb-lter-and", while a query parameter of "resourceId=knb-lter-and/2719/6" will match any audit log entry whose resourceId value contains the substring "knb-lter-and/2719/6".
(data.frame or xml_document) Zero or more audit records matching the query parameters as specified in the request (see details below).
User authentication is required (see login()
)
Other Audit Manager Services:
get_audit_count()
,
get_audit_record()
,
get_docid_reads()
,
get_packageid_reads()
,
get_recent_uploads()
## Not run: login() # Get audit report for data reads between 2021-12-01 and 2021-12-02 query <- "serviceMethod=readDataEntity&fromTime=2021-12-01&toTime=2021-12-02" auditReport <- get_audit_report(query) logout() ## End(Not run)
## Not run: login() # Get audit report for data reads between 2021-12-01 and 2021-12-02 query <- "serviceMethod=readDataEntity&fromTime=2021-12-01&toTime=2021-12-02" auditReport <- get_audit_report(query) logout() ## End(Not run)
Get doc ID reads
get_docid_reads(scope, identifier, as = "data.frame", env = "production")
get_docid_reads(scope, identifier, as = "data.frame", env = "production")
scope |
(character) Scope of data package |
identifier |
(numeric) Identifier of data package |
as |
(character) Format of the returned object. Can be: "data.frame" or "xml". |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(data.frame or xml_document) Summary of all the successful reads
(total reads and non-robot reads) for all the resources of a given
scope
and identifier
.
Other Audit Manager Services:
get_audit_count()
,
get_audit_record()
,
get_audit_report()
,
get_packageid_reads()
,
get_recent_uploads()
## Not run: # Get all reads resourceReads <- get_docid_reads(scope = "knb-lter-sgs", identifier = 817) ## End(Not run)
## Not run: # Get all reads resourceReads <- get_docid_reads(scope = "knb-lter-sgs", identifier = 817) ## End(Not run)
Get event subscription
get_event_subscription(subscriptionId, as = "data.frame", env = "production")
get_event_subscription(subscriptionId, as = "data.frame", env = "production")
subscriptionId |
(numeric) Event subscription identifier |
as |
(character) Format of the returned object. Can be: "data.frame" or "xml". |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(data.frame or xml_document) Subscription metadata
User authentication is required (see login()
)
Other Event Notifications:
create_event_subscription()
,
delete_event_subscription()
,
execute_event_subscription()
,
get_event_subscription_schema()
,
query_event_subscriptions()
## Not run: login() # Get subscription subscription <- get_event_subscription( subscriptionId = 21, env = "staging" ) logout() ## End(Not run)
## Not run: login() # Get subscription subscription <- get_event_subscription( subscriptionId = 21, env = "staging" ) logout() ## End(Not run)
Get event subscription schema
get_event_subscription_schema(env = "production")
get_event_subscription_schema(env = "production")
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(xml_document) Schema for event subscription creation request entities.
See the xml2 library for more on working with XML.
Other Event Notifications:
create_event_subscription()
,
delete_event_subscription()
,
execute_event_subscription()
,
get_event_subscription()
,
query_event_subscriptions()
## Not run: # Get schema schema <- get_event_subscription_schema() schema #> {xml_document} #> <schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> #> [1] <xs:element name="subscription">\n <xs:complexType>\n <xs: ... # Show schema structure xml2::xml_structure(schema) #> <schema [xmlns:xs]> #> <element [name]> #> <complexType> #> <all> #> <element [name, type, minOccurs, maxOccurs]> #> <element [name, type, minOccurs, maxOccurs]> #> <attribute [name, type, use, fixed]> ## End(Not run)
## Not run: # Get schema schema <- get_event_subscription_schema() schema #> {xml_document} #> <schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> #> [1] <xs:element name="subscription">\n <xs:complexType>\n <xs: ... # Show schema structure xml2::xml_structure(schema) #> <schema [xmlns:xs]> #> <element [name]> #> <complexType> #> <all> #> <element [name, type, minOccurs, maxOccurs]> #> <element [name, type, minOccurs, maxOccurs]> #> <attribute [name, type, use, fixed]> ## End(Not run)
Get journal citation
get_journal_citation(journalCitationId, as = "data.frame", env = "production")
get_journal_citation(journalCitationId, as = "data.frame", env = "production")
journalCitationId |
(numeric) Journal citation identifier |
as |
(character) Format of the returned object. Can be: "data.frame" or "xml". |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(data.frame or xml_document) Journal citation
Other Journal Citations:
create_journal_citation()
,
delete_journal_citation()
,
list_data_package_citations()
,
list_principal_owner_citations()
## Not run: # Get citation journalCitation <- get_journal_citation(381) ## End(Not run)
## Not run: # Get citation journalCitation <- get_journal_citation(381) ## End(Not run)
Get package ID reads
get_packageid_reads(packageId, as = "data.frame", env = "production")
get_packageid_reads(packageId, as = "data.frame", env = "production")
packageId |
(character) Data package identifier |
as |
(character) Format of the returned object. Can be: "data.frame" or "xml". |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(data.frame or xml_document) Summary of all the successful reads
(total reads and non-robot reads) of packageId
Other Audit Manager Services:
get_audit_count()
,
get_audit_record()
,
get_audit_report()
,
get_docid_reads()
,
get_recent_uploads()
## Not run: # Get packageId reads resourceReads <- get_packageid_reads("knb-lter-sgs.817.17") ## End(Not run)
## Not run: # Get packageId reads resourceReads <- get_packageid_reads("knb-lter-sgs.817.17") ## End(Not run)
Generates the provenance metadata of a source data package
get_provenance_metadata(packageId, env = "production")
get_provenance_metadata(packageId, env = "production")
packageId |
(character) Data package identifier |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(xml_document) Provenance metadata of packageId
, representing
a <methodStep> element that can be inserted into the <methods> section of a
dependent data package.
See the emld library for more on working with EML as a list or JSON-LD. See the xml2 library for working with EML as XML.
## Not run: methodStep <- get_provenance_metadata("knb-lter-pal.309.1") methodStep #> {xml_document} #> <methodStep> #> [1] <description>\n <para>This method step describes provenance-based ... #> [2] <dataSource>\n <title>Stable isotope composition (d18O) of seawat ... ## End(Not run)
## Not run: methodStep <- get_provenance_metadata("knb-lter-pal.309.1") methodStep #> {xml_document} #> <methodStep> #> [1] <description>\n <para>This method step describes provenance-based ... #> [2] <dataSource>\n <title>Stable isotope composition (d18O) of seawat ... ## End(Not run)
Get recent uploads
get_recent_uploads(query, as = "data.frame", env = "production")
get_recent_uploads(query, as = "data.frame", env = "production")
query |
(character) Query (see details below) |
as |
(character) Format of the returned object. Can be: "data.frame" or "xml". |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
Query parameters are specified as key=value pairs, multiple pairs must be delimited with ampersands (&), and only a single value should be specified for a particular key. The following query parameter keys are allowed:
serviceMethod - Can be: createDataPackage, updateDataPackage
fromTime - An ISO8601 timestamp
limit - A positive whole number
The query parameter serviceMethod should have the value "createDataPackage" (to retrieve recent inserts) or "updateDataPackage" (to retrieve recent updates). The query parameter fromTime is used to specify the date/time in the past that represents the oldest audit records that should be returned. Data packages uploaded prior to that time are not considered recent uploads and are thus filtered from the query results. The query parameter limit sets an upper limit on the number of audit records returned. For example, "limit=3".
(data.frame or xml_document) A list of zero or more audit records of either recently inserted or recently updated data packages.
Other Audit Manager Services:
get_audit_count()
,
get_audit_record()
,
get_audit_report()
,
get_docid_reads()
,
get_packageid_reads()
## Not run: # Get the 5 most recently created data packages auditReport <- get_recent_uploads( query = "serviceMethod=createDataPackage&limit=5" ) ## End(Not run)
## Not run: # Get the 5 most recently created data packages auditReport <- get_recent_uploads( query = "serviceMethod=createDataPackage&limit=5" ) ## End(Not run)
Is authorized to read
is_authorized(resourceId, env = "production")
is_authorized(resourceId, env = "production")
resourceId |
(character) Resource identifier |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(logical) TRUE if the authenticated user has permission to read the specified resource
User authentication is required (see login()
)
Other Miscellaneous:
create_data_package_archive()
,
create_dn()
## Not run: login() # Get the most recently created data package auditReport <- get_recent_uploads( query = "serviceMethod=createDataPackage&limit=1" ) # Get the resourceId resourceId <- xml2::xml_text( xml2::xml_find_all(auditReport, ".//resourceId") ) resourceId #> [1] "https://pasta.lternet.edu/package/eml/knb-lter-hbr/345/1" # Check read authorization is_authorized(resourceId) #> [1] TRUE logout() ## End(Not run)
## Not run: login() # Get the most recently created data package auditReport <- get_recent_uploads( query = "serviceMethod=createDataPackage&limit=1" ) # Get the resourceId resourceId <- xml2::xml_text( xml2::xml_find_all(auditReport, ".//resourceId") ) resourceId #> [1] "https://pasta.lternet.edu/package/eml/knb-lter-hbr/345/1" # Check read authorization is_authorized(resourceId) #> [1] TRUE logout() ## End(Not run)
List active reservations
list_active_reservations(as = "data.frame", env = "production")
list_active_reservations(as = "data.frame", env = "production")
as |
(character) Format of the returned object. Can be: "data.frame" or "xml". |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(data.frame or xml_document) The set of data package identifiers that users have actively reserved. Note that data package identifiers that have been successfully uploaded are no longer considered active reservations and thus are not included in this list.
Other Identifier Reservations:
create_reservation()
,
delete_reservation()
,
list_reservation_identifiers()
## Not run: # List reservations reservations <- list_active_reservations() ## End(Not run)
## Not run: # List reservations reservations <- list_active_reservations() ## End(Not run)
Data descendants are data packages that are known to be derived, in whole or in part, from the specified source data package.
list_data_descendants(packageId, as = "data.frame", env = "production")
list_data_descendants(packageId, as = "data.frame", env = "production")
packageId |
(character) Data package identifier |
as |
(character) Format of the returned object. Can be: "data.frame" or "xml". |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(data.frame or xml_document) Descendants of packageId
Other Listing:
list_data_entities()
,
list_data_package_identifiers()
,
list_data_package_revisions()
,
list_data_package_scopes()
,
list_data_sources()
,
list_deleted_data_packages()
,
list_recent_changes()
,
list_recent_uploads()
,
list_service_methods()
,
list_user_data_packages()
## Not run: # List descendants dataDescendants <- list_data_descendants("knb-lter-bnz.501.17") ## End(Not run)
## Not run: # List descendants dataDescendants <- list_data_descendants("knb-lter-bnz.501.17") ## End(Not run)
List data entities
list_data_entities(packageId, env = "production")
list_data_entities(packageId, env = "production")
packageId |
(character) Data package identifier |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(character) Identifiers for all data entities in packageId
Other Listing:
list_data_descendants()
,
list_data_package_identifiers()
,
list_data_package_revisions()
,
list_data_package_scopes()
,
list_data_sources()
,
list_deleted_data_packages()
,
list_recent_changes()
,
list_recent_uploads()
,
list_service_methods()
,
list_user_data_packages()
## Not run: entityIds <- list_data_entities("knb-lter-and.2732.7") entityIds #> [1] "0464a1d9262fc6e609cb0b24adb7e5ba" #> [2] "cc3ade83d3655edd2ca674721a52ef46" ## End(Not run)
## Not run: entityIds <- list_data_entities("knb-lter-and.2732.7") entityIds #> [1] "0464a1d9262fc6e609cb0b24adb7e5ba" #> [2] "cc3ade83d3655edd2ca674721a52ef46" ## End(Not run)
List data package citations
list_data_package_citations( packageId, as = "data.frame", list_all = FALSE, env = "production" )
list_data_package_citations( packageId, as = "data.frame", list_all = FALSE, env = "production" )
packageId |
(character) Data package identifier |
as |
(character) Format of the returned object. Can be: "data.frame" or "xml". |
list_all |
(logical) Return all citations within a data package series? |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(data.frame or xml_document) A list of journal citations
Other Journal Citations:
create_journal_citation()
,
delete_journal_citation()
,
get_journal_citation()
,
list_principal_owner_citations()
## Not run: # List citations journalCitations <- list_data_package_citations("edi.845.1") ## End(Not run)
## Not run: # List citations journalCitations <- list_data_package_citations("edi.845.1") ## End(Not run)
List data package identifiers
list_data_package_identifiers(scope, env = "production")
list_data_package_identifiers(scope, env = "production")
scope |
(character) Scope of data package |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(numeric) Identifiers of data packages within a specified
scope
Other Listing:
list_data_descendants()
,
list_data_entities()
,
list_data_package_revisions()
,
list_data_package_scopes()
,
list_data_sources()
,
list_deleted_data_packages()
,
list_recent_changes()
,
list_recent_uploads()
,
list_service_methods()
,
list_user_data_packages()
## Not run: # List identifiers identifiers <- list_data_package_identifiers("knb-lter-ble") identifiers #> [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 23 ## End(Not run)
## Not run: # List identifiers identifiers <- list_data_package_identifiers("knb-lter-ble") identifiers #> [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 23 ## End(Not run)
List data package revisions
list_data_package_revisions( scope, identifier, filter = NULL, env = "production" )
list_data_package_revisions( scope, identifier, filter = NULL, env = "production" )
scope |
(character) Scope of data package |
identifier |
(numeric) Identifier of data package |
filter |
(character) Filter results by "newest" or "oldest" |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(numeric) Revisions of a data package within a specified
scope
and identifier
Other Listing:
list_data_descendants()
,
list_data_entities()
,
list_data_package_identifiers()
,
list_data_package_scopes()
,
list_data_sources()
,
list_deleted_data_packages()
,
list_recent_changes()
,
list_recent_uploads()
,
list_service_methods()
,
list_user_data_packages()
## Not run: # List revisions revisions <- list_data_package_revisions("knb-lter-arc", 20131) revisions #> [1] 1 2 ## End(Not run)
## Not run: # List revisions revisions <- list_data_package_revisions("knb-lter-arc", 20131) revisions #> [1] 1 2 ## End(Not run)
List data package scopes
list_data_package_scopes(env = "production")
list_data_package_scopes(env = "production")
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(numeric) Scopes within a specified env
Other Listing:
list_data_descendants()
,
list_data_entities()
,
list_data_package_identifiers()
,
list_data_package_revisions()
,
list_data_sources()
,
list_deleted_data_packages()
,
list_recent_changes()
,
list_recent_uploads()
,
list_service_methods()
,
list_user_data_packages()
## Not run: # List scopes scopes <- list_data_package_scopes() scopes #> [1] "ecotrends" "edi" "knb-lter-and" #> [4] "knb-lter-arc" "knb-lter-bes" "knb-lter-ble" #> [7] "knb-lter-bnz" "knb-lter-cap" "knb-lter-cce" #> [10] "knb-lter-cdr" "knb-lter-cwt" "knb-lter-fce" #> [13] "knb-lter-gce" "knb-lter-hbr" "knb-lter-hfr" #> [16] "knb-lter-jrn" "knb-lter-kbs" "knb-lter-knz" #> [19] "knb-lter-luq" "knb-lter-mcm" "knb-lter-mcr" #> [22] "knb-lter-nes" "knb-lter-nin" "knb-lter-ntl" #> [25] "knb-lter-nwk" "knb-lter-nwt" "knb-lter-pal" #> [28] "knb-lter-pie" "knb-lter-sbc" "knb-lter-sev" #> [31] "knb-lter-sgs" "knb-lter-vcr" "lter-landsat" #> [34] "lter-landsat-ledaps" "msb-cap" "msb-paleon" #> [37] "msb-tempbiodev" ## End(Not run)
## Not run: # List scopes scopes <- list_data_package_scopes() scopes #> [1] "ecotrends" "edi" "knb-lter-and" #> [4] "knb-lter-arc" "knb-lter-bes" "knb-lter-ble" #> [7] "knb-lter-bnz" "knb-lter-cap" "knb-lter-cce" #> [10] "knb-lter-cdr" "knb-lter-cwt" "knb-lter-fce" #> [13] "knb-lter-gce" "knb-lter-hbr" "knb-lter-hfr" #> [16] "knb-lter-jrn" "knb-lter-kbs" "knb-lter-knz" #> [19] "knb-lter-luq" "knb-lter-mcm" "knb-lter-mcr" #> [22] "knb-lter-nes" "knb-lter-nin" "knb-lter-ntl" #> [25] "knb-lter-nwk" "knb-lter-nwt" "knb-lter-pal" #> [28] "knb-lter-pie" "knb-lter-sbc" "knb-lter-sev" #> [31] "knb-lter-sgs" "knb-lter-vcr" "lter-landsat" #> [34] "lter-landsat-ledaps" "msb-cap" "msb-paleon" #> [37] "msb-tempbiodev" ## End(Not run)
Data sources are data packages, or other online digital objects, that are known to be inputs to the specified derived data package.
list_data_sources(packageId, as = "data.frame", env = "production")
list_data_sources(packageId, as = "data.frame", env = "production")
packageId |
(character) Data package identifier |
as |
(character) Format of the returned object. Can be: "data.frame" or "xml". |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
Data sources can be either internal or external to the EDI data repository. Internal data sources include a packageId value and a URL to the source metadata. For data sources external to PASTA, the packageId element will be empty and a URL value may or not be documented.
(data.frame or xml_document) Data sources to packageId
Other Listing:
list_data_descendants()
,
list_data_entities()
,
list_data_package_identifiers()
,
list_data_package_revisions()
,
list_data_package_scopes()
,
list_deleted_data_packages()
,
list_recent_changes()
,
list_recent_uploads()
,
list_service_methods()
,
list_user_data_packages()
## Not run: # List sources dataSources <- list_data_sources("edi.275.4") ## End(Not run)
## Not run: # List sources dataSources <- list_data_sources("edi.275.4") ## End(Not run)
List deleted data packages
list_deleted_data_packages(env = "production")
list_deleted_data_packages(env = "production")
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(character) All data packages (excluding revision values) that have been deleted from the data package registry.
Other Listing:
list_data_descendants()
,
list_data_entities()
,
list_data_package_identifiers()
,
list_data_package_revisions()
,
list_data_package_scopes()
,
list_data_sources()
,
list_recent_changes()
,
list_recent_uploads()
,
list_service_methods()
,
list_user_data_packages()
## Not run: # List deleted data packages deleted <- list_deleted_data_packages() head(deleted) #> [1] "edi.10" "edi.222" "edi.419" "edi.511" "edi.857" "edi.878" ## End(Not run)
## Not run: # List deleted data packages deleted <- list_deleted_data_packages() head(deleted) #> [1] "edi.10" "edi.222" "edi.419" "edi.511" "edi.857" "edi.878" ## End(Not run)
List principal owner citations
list_principal_owner_citations( principalOwner, as = "data.frame", env = "production" )
list_principal_owner_citations( principalOwner, as = "data.frame", env = "production" )
principalOwner |
(character) Principal owner in the format returned by
|
as |
(character) Format of the returned object. Can be: "data.frame" or "xml". |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(data.frame or xml_document) Journal citations metadata for all entries owned by the specified principal owner
Other Journal Citations:
create_journal_citation()
,
delete_journal_citation()
,
get_journal_citation()
,
list_data_package_citations()
## Not run: # List citations dn <- create_dn(userId = "FCE", ou = "EDI") journalCitations <- list_principal_owner_citations(principalOwner = dn) ## End(Not run)
## Not run: # List citations dn <- create_dn(userId = "FCE", ou = "EDI") journalCitations <- list_principal_owner_citations(principalOwner = dn) ## End(Not run)
List all data package insert, update, and delete operations, optionally specifying the date and time to and/or from which the changes should be listed. An optional scope value can be specified to filter results for a particular data package scope.
list_recent_changes( fromDate = NULL, toDate = NULL, scope = NULL, as = "data.frame", env = "production" )
list_recent_changes( fromDate = NULL, toDate = NULL, scope = NULL, as = "data.frame", env = "production" )
fromDate |
(character) Start date in the format "YYYY-MM-DDThh:mm:ss" |
toDate |
(character) End date in the format "YYYY-MM-DDThh:mm:ss" |
scope |
(character) Scope of data package |
as |
(character) Format of the returned object. Can be: "data.frame" or "xml". |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(data.frame or xml_document) Recent changes and their corresponding packageId, scope, identifier, revision, principal, doi, serviceMethod, and date.
Other Listing:
list_data_descendants()
,
list_data_entities()
,
list_data_package_identifiers()
,
list_data_package_revisions()
,
list_data_package_scopes()
,
list_data_sources()
,
list_deleted_data_packages()
,
list_recent_uploads()
,
list_service_methods()
,
list_user_data_packages()
## Not run: # Changes occurring in the first 3 days of 2021 for all scopes dataPackageChanges <- list_recent_changes( fromDate = "2021-01-01T00:00:00", toDate = "2021-01-03T00:00:00" ) ## End(Not run)
## Not run: # Changes occurring in the first 3 days of 2021 for all scopes dataPackageChanges <- list_recent_changes( fromDate = "2021-01-01T00:00:00", toDate = "2021-01-03T00:00:00" ) ## End(Not run)
List recent uploads
list_recent_uploads(type, limit = 5, as = "data.frame", env = "production")
list_recent_uploads(type, limit = 5, as = "data.frame", env = "production")
type |
(character) Upload type. Can be: "insert" or "update". |
limit |
(numeric) Maximum number of results to return |
as |
(character) Format of the returned object. Can be: "data.frame" or "xml". |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(data.frame or xml_document) Data package uploads
Other Listing:
list_data_descendants()
,
list_data_entities()
,
list_data_package_identifiers()
,
list_data_package_revisions()
,
list_data_package_scopes()
,
list_data_sources()
,
list_deleted_data_packages()
,
list_recent_changes()
,
list_service_methods()
,
list_user_data_packages()
## Not run: # Get the 3 newest revisions dataPackageUploads <- list_recent_uploads("update", 3) ## End(Not run)
## Not run: # Get the 3 newest revisions dataPackageUploads <- list_recent_uploads("update", 3) ## End(Not run)
List reservation identifiers
list_reservation_identifiers(scope, env = "production")
list_reservation_identifiers(scope, env = "production")
scope |
(character) Scope of data package |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(numeric) The set of identifiers for the specified scope
that
end users have actively reserved for future upload
Other Identifier Reservations:
create_reservation()
,
delete_reservation()
,
list_active_reservations()
## Not run: # List reservations reservations <- list_reservation_identifiers(scope = "edi") reservations #> [1] 11 130 131 132 142 152 154 156 158 159 161 162 171 #> [14] 172 173 174 175 177 178 180 182 183 185 196 203 ... ## End(Not run)
## Not run: # List reservations reservations <- list_reservation_identifiers(scope = "edi") reservations #> [1] 11 130 131 132 142 152 154 156 158 159 161 162 171 #> [14] 172 173 174 175 177 178 180 182 183 185 196 203 ... ## End(Not run)
List service methods
list_service_methods(env = "production")
list_service_methods(env = "production")
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(character) A simple list of web service methods supported by the Data Package Manager web service
Other Listing:
list_data_descendants()
,
list_data_entities()
,
list_data_package_identifiers()
,
list_data_package_revisions()
,
list_data_package_scopes()
,
list_data_sources()
,
list_deleted_data_packages()
,
list_recent_changes()
,
list_recent_uploads()
,
list_user_data_packages()
## Not run: # All service methods services <- list_service_methods() services #> [1] "appendProvenance" "createDataPackage" #> [3] "createDataPackageArchive" "createReservation" #> [5] "deleteReservation" "deleteDataPackage" #> [7] "evaluateDataPackage" "getProvenanceMetadata" #> [9] "isAuthorized" "listActiveReservations" #> [11] "listDataEntities" "listDataDescendants" #> [13] "listDataSources" "listRecentChanges" #> [15] "listDataPackageIdentifiers" "listDataPackageRevisions" #> [17] "listDataPackageScopes" "listDeletedDataPackages" #> [19] "listRecentUploads" "listReservationIdentifiers" #> [21] "listServiceMethods" "listUserDataPackages" #> [23] "listWorkingOn" "readDataEntity" #> [25] "readDataEntityAcl" "readDataEntityRmd" #> [27] "readDataEntityChecksum" "readDataEntityDoi" #> [29] "readDataEntityName" "readDataEntityNames" #> [31] "readDataEntitySize" "readDataEntitySizes" #> [33] "readDataPackage" "readDataPackageAcl" #> [35] "readDataPackageRmd" "readDataPackageArchive" #> [37] "readDataPackageDoi" "readDataPackageError" #> [39] "readDataPackageFromDoi" "readDataPackageReport" #> [41] "readDataPackageReportAcl" "readDataPackageReportRmd" #> [43] "readDataPackageReportChecksum" "readDataPackageReportDoi" #> [45] "readEvaluateReport" "readMetadata" #> [47] "readMetadataDublinCore" "readMetadataAcl" #> [49] "readMetadataRmd" "readMetadataChecksum" #> [51] "readMetadataDoi" "readMetadataFormat" #> [53] "searchDataPackages" "updateDataPackage" #> [55] "createSubscription" "deleteSubscription" #> [57] "executeSubscription" "getMatchingSubscriptions" #> [59] "getSubscriptionWithId" "notifyOfEvent" #> [61] "createJournalCitation" "deleteJournalCitation" #> [63] "getCitationWithId" "listDataPackageCitations" #> [65] "listPrincipalOwnerCitations" ## End(Not run)
## Not run: # All service methods services <- list_service_methods() services #> [1] "appendProvenance" "createDataPackage" #> [3] "createDataPackageArchive" "createReservation" #> [5] "deleteReservation" "deleteDataPackage" #> [7] "evaluateDataPackage" "getProvenanceMetadata" #> [9] "isAuthorized" "listActiveReservations" #> [11] "listDataEntities" "listDataDescendants" #> [13] "listDataSources" "listRecentChanges" #> [15] "listDataPackageIdentifiers" "listDataPackageRevisions" #> [17] "listDataPackageScopes" "listDeletedDataPackages" #> [19] "listRecentUploads" "listReservationIdentifiers" #> [21] "listServiceMethods" "listUserDataPackages" #> [23] "listWorkingOn" "readDataEntity" #> [25] "readDataEntityAcl" "readDataEntityRmd" #> [27] "readDataEntityChecksum" "readDataEntityDoi" #> [29] "readDataEntityName" "readDataEntityNames" #> [31] "readDataEntitySize" "readDataEntitySizes" #> [33] "readDataPackage" "readDataPackageAcl" #> [35] "readDataPackageRmd" "readDataPackageArchive" #> [37] "readDataPackageDoi" "readDataPackageError" #> [39] "readDataPackageFromDoi" "readDataPackageReport" #> [41] "readDataPackageReportAcl" "readDataPackageReportRmd" #> [43] "readDataPackageReportChecksum" "readDataPackageReportDoi" #> [45] "readEvaluateReport" "readMetadata" #> [47] "readMetadataDublinCore" "readMetadataAcl" #> [49] "readMetadataRmd" "readMetadataChecksum" #> [51] "readMetadataDoi" "readMetadataFormat" #> [53] "searchDataPackages" "updateDataPackage" #> [55] "createSubscription" "deleteSubscription" #> [57] "executeSubscription" "getMatchingSubscriptions" #> [59] "getSubscriptionWithId" "notifyOfEvent" #> [61] "createJournalCitation" "deleteJournalCitation" #> [63] "getCitationWithId" "listDataPackageCitations" #> [65] "listPrincipalOwnerCitations" ## End(Not run)
List all data packages (including their revision values) uploaded to the repository by a particular user, specified by a distinguished name. Data packages that were uploaded by the specified user but have since been deleted are excluded from the list.
list_user_data_packages(dn, env = "production")
list_user_data_packages(dn, env = "production")
dn |
(character) Distinguished name of user. Create with
|
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(character) Data package identifiers belonging to a dn
Other Listing:
list_data_descendants()
,
list_data_entities()
,
list_data_package_identifiers()
,
list_data_package_revisions()
,
list_data_package_scopes()
,
list_data_sources()
,
list_deleted_data_packages()
,
list_recent_changes()
,
list_recent_uploads()
,
list_service_methods()
## Not run: # List user data packages dn <- create_dn(userId = "dbjourneynorth") packageIds <- list_user_data_packages(dn) packageIds #> [1] "edi.948.1" "edi.949.1" ## End(Not run)
## Not run: # List user data packages dn <- create_dn(userId = "dbjourneynorth") packageIds <- list_user_data_packages(dn) packageIds #> [1] "edi.948.1" "edi.949.1" ## End(Not run)
List working on
list_working_on(as = "data.frame", env = "production")
list_working_on(as = "data.frame", env = "production")
as |
(character) Format of the returned object. Can be: "data.frame" or "xml". |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(data.frame or xml_document) The set of data packages the EDI repository is currently working on inserting or updating. Note that data packages currently being evaluated by the EDI repository are not included in the list.
## Not run: list_working_on() ## End(Not run)
## Not run: list_working_on() ## End(Not run)
Login to the EDI repository
login(userId = NULL, userPass = NULL, config = NULL)
login(userId = NULL, userPass = NULL, config = NULL)
userId |
(character) User identifier of an EDI data repository account. If using |
userPass |
(character) Password of |
config |
(character) Path to config.txt, which contains |
If userId
, userPass
, and config
are NULL, the console
will prompt for credentials.
config
: Supplying credentials in a file named config.txt facilitates
authentication within automated/unassisted processes. Contents of this file
should be new line separated and have the form "<argument> = <value>" (e.g.
userId = myname).
(character) A temporary (~10 hour) authentication token written to the system variable "EDI_TOKEN".
Only works when authenticating with EDI credentials. Does not work when authenticating with ORCiD, GitHub, or Google credentials.
Be careful not to accidentally share your userId
and userPass
.
Some tips to avoid this:
Don't write code that explicitly lists your credentials.
Don't save your workspace when exiting an R session.
Do store your credentials as environmental variables and reference these.
Do use config
but if using version control ensure the
config.txt file is listed in your .gitignore.
If you may have shared your credentials, please reset your password at https://dashboard.edirepository.org/dashboard/auth/reset_password_init.
Other Authentication:
logout()
## Not run: # Interactively at the console login() #> User name: "my_name" #> User password: "my_secret" # Programmatically with function arguments login(userId = "my_name", userPass = "my_secret") # Programmatically with a file containing userId and userPass arguments login(config = paste0(tempdir(), "/config.txt")) ## End(Not run)
## Not run: # Interactively at the console login() #> User name: "my_name" #> User password: "my_secret" # Programmatically with function arguments login(userId = "my_name", userPass = "my_secret") # Programmatically with a file containing userId and userPass arguments login(config = paste0(tempdir(), "/config.txt")) ## End(Not run)
Logout of the EDI repository
logout()
logout()
Removes the temporary authentication token system variable "EDI_TOKEN".
(NULL) No return value.
Other Authentication:
login()
## Not run: logout() ## End(Not run)
## Not run: logout() ## End(Not run)
Query event subscriptions
query_event_subscriptions(query = NULL, as = "data.frame", env = "production")
query_event_subscriptions(query = NULL, as = "data.frame", env = "production")
query |
(character) Query (see details below) |
as |
(character) Format of the returned object. Can be: "data.frame" or "xml". |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
Query parameters are specified as key=value pairs, multiple pairs must be delimited with ampersands (&), and only a single value should be specified for a particular key. The following query parameter keys are allowed:
creator
scope
identifier
revision
url
If a query parameter is specified, and a subscription's respective attribute does not match it, that subscription will not be included in the group of subscriptions returned. If scope, identifier, or revision are used, their values must together constitute a syntactically and semantically correct EML packageId (i.e. "scope.identifier.revision") - either partial or complete. If url is used, its value must not contain ampersands. Therefore, if a subscription's URL contains ampersands, it cannot be filtered based on its URL.
(data.frame or xml_document) A list of the subscriptions whose attributes match those specified in the query string (see details below). If a query string is omitted, all subscriptions in the subscription database will be returned for which the requesting user is authorized to read. If query parameters are included, they are used to filter that set of subscriptions based on their attributes.
User authentication is required (see login()
)
Other Event Notifications:
create_event_subscription()
,
delete_event_subscription()
,
execute_event_subscription()
,
get_event_subscription_schema()
,
get_event_subscription()
## Not run: login() # Query subscriptions query <- "scope=edi" subscriptions <- query_event_subscriptions(query, env = "staging") logout() ## End(Not run)
## Not run: login() # Query subscriptions query <- "scope=edi" subscriptions <- query_event_subscriptions(query, env = "staging") logout() ## End(Not run)
Read data entity
read_data_entity(packageId, entityId, env = "production")
read_data_entity(packageId, entityId, env = "production")
packageId |
(character) Data package identifier |
entityId |
(character) Data entity identifier |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(raw) Raw bytes (i.e. application/octet-stream) to be parsed by a reader function appropriate for the data type
Other Accessing:
read_data_entity_checksum()
,
read_data_entity_names()
,
read_data_entity_name()
,
read_data_entity_resource_metadata()
,
read_data_entity_sizes()
,
read_data_entity_size()
,
read_data_package_archive()
,
read_data_package_citation()
,
read_data_package_doi()
,
read_data_package_error()
,
read_data_package_from_doi()
,
read_data_package_report_checksum()
,
read_data_package_report_resource_metadata()
,
read_data_package_report_summary()
,
read_data_package_report()
,
read_data_package_resource_metadata()
,
read_data_package()
,
read_evaluate_report_summary()
,
read_evaluate_report()
,
read_metadata_checksum()
,
read_metadata_dublin_core()
,
read_metadata_entity()
,
read_metadata_format()
,
read_metadata_resource_metadata()
,
read_metadata()
## Not run: # Read names and IDs of data entities in package "edi.1047.1" res <- read_data_entity_names(packageId = "edi.1047.1") res #> entityId entityName #> 1 3abac5f99ecc1585879178a355176f6d Environmentals.csv #> 2 f6bfa89b48ced8292840e53567cbf0c8 ByCatch.csv #> 3 c75642ddccb4301327b4b1a86bdee906 Chinook.csv #> 4 2c9ee86cc3f3ffc729c5f18bfe0a2a1d Steelhead.csv #> 5 785690848dd20f4910637250cdc96819 TrapEfficiencyRelease.csv #> 6 58b9000439a5671ea7fe13212e889ba5 TrapEfficiencySummary.csv #> 7 86e61c1a501b7dcf0040d10e009bfd87 TrapOperations.csv # Read raw bytes of the 3rd data entity raw <- read_data_entity(packageId = "edi.1047.1", entityId = res$entityId[3]) head(raw) #> [1] ef bb bf 44 61 74 # Parse with .csv reader data <- readr::read_csv(file = raw) data #> # A tibble: 105,325 x 20 #> Date trapVisitID subSiteName catchRawID releaseID commonName n #> <chr> <dbl> <chr> <dbl> <dbl> <chr> <dbl> #> 1 1/8/2~ 330 North Chann~ 32409 0 Chinook s~ 1 #> 2 1/8/2~ 330 North Chann~ 32412 0 Chinook s~ 1 #> 3 1/8/2~ 330 North Chann~ 32410 0 Chinook s~ 1 #> 4 1/8/2~ 330 North Chann~ 32408 0 Chinook s~ 1 #> 5 1/8/2~ 330 North Chann~ 32406 0 Chinook s~ 1 #> 6 1/8/2~ 322 North Chann~ 31958 0 Chinook s~ 1 #> 7 1/8/2~ 322 North Chann~ 31975 0 Chinook s~ 1 #> 8 1/8/2~ 322 North Chann~ 31974 0 Chinook s~ 1 #> 9 1/8/2~ 322 North Chann~ 31973 0 Chinook s~ 1 #> 10 1/8/2~ 322 North Chann~ 31972 0 Chinook s~ 1 #> # ... with 105,315 more rows, and 13 more variables: #> # atCaptureRun <chr>, finalRun <chr>, finalRunMethod <chr>, #> # lifeStage <chr>, forkLength <dbl>, weight <dbl>, mort <chr>, #> # fishOrigin <chr>, markType <chr>, CatchRaw.comments <chr>, #> # specimenTypeID <dbl>, physicalSpecimenCode <chr>, #> # Specimen.comments <lgl> ## End(Not run)
## Not run: # Read names and IDs of data entities in package "edi.1047.1" res <- read_data_entity_names(packageId = "edi.1047.1") res #> entityId entityName #> 1 3abac5f99ecc1585879178a355176f6d Environmentals.csv #> 2 f6bfa89b48ced8292840e53567cbf0c8 ByCatch.csv #> 3 c75642ddccb4301327b4b1a86bdee906 Chinook.csv #> 4 2c9ee86cc3f3ffc729c5f18bfe0a2a1d Steelhead.csv #> 5 785690848dd20f4910637250cdc96819 TrapEfficiencyRelease.csv #> 6 58b9000439a5671ea7fe13212e889ba5 TrapEfficiencySummary.csv #> 7 86e61c1a501b7dcf0040d10e009bfd87 TrapOperations.csv # Read raw bytes of the 3rd data entity raw <- read_data_entity(packageId = "edi.1047.1", entityId = res$entityId[3]) head(raw) #> [1] ef bb bf 44 61 74 # Parse with .csv reader data <- readr::read_csv(file = raw) data #> # A tibble: 105,325 x 20 #> Date trapVisitID subSiteName catchRawID releaseID commonName n #> <chr> <dbl> <chr> <dbl> <dbl> <chr> <dbl> #> 1 1/8/2~ 330 North Chann~ 32409 0 Chinook s~ 1 #> 2 1/8/2~ 330 North Chann~ 32412 0 Chinook s~ 1 #> 3 1/8/2~ 330 North Chann~ 32410 0 Chinook s~ 1 #> 4 1/8/2~ 330 North Chann~ 32408 0 Chinook s~ 1 #> 5 1/8/2~ 330 North Chann~ 32406 0 Chinook s~ 1 #> 6 1/8/2~ 322 North Chann~ 31958 0 Chinook s~ 1 #> 7 1/8/2~ 322 North Chann~ 31975 0 Chinook s~ 1 #> 8 1/8/2~ 322 North Chann~ 31974 0 Chinook s~ 1 #> 9 1/8/2~ 322 North Chann~ 31973 0 Chinook s~ 1 #> 10 1/8/2~ 322 North Chann~ 31972 0 Chinook s~ 1 #> # ... with 105,315 more rows, and 13 more variables: #> # atCaptureRun <chr>, finalRun <chr>, finalRunMethod <chr>, #> # lifeStage <chr>, forkLength <dbl>, weight <dbl>, mort <chr>, #> # fishOrigin <chr>, markType <chr>, CatchRaw.comments <chr>, #> # specimenTypeID <dbl>, physicalSpecimenCode <chr>, #> # Specimen.comments <lgl> ## End(Not run)
Read data entity checksum
read_data_entity_checksum(packageId, entityId, env = "production")
read_data_entity_checksum(packageId, entityId, env = "production")
packageId |
(character) Data package identifier |
entityId |
(character) Data entity identifier |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(character) A 40-character SHA-1 checksum value of entityId
in packageId
Other Accessing:
read_data_entity_names()
,
read_data_entity_name()
,
read_data_entity_resource_metadata()
,
read_data_entity_sizes()
,
read_data_entity_size()
,
read_data_entity()
,
read_data_package_archive()
,
read_data_package_citation()
,
read_data_package_doi()
,
read_data_package_error()
,
read_data_package_from_doi()
,
read_data_package_report_checksum()
,
read_data_package_report_resource_metadata()
,
read_data_package_report_summary()
,
read_data_package_report()
,
read_data_package_resource_metadata()
,
read_data_package()
,
read_evaluate_report_summary()
,
read_evaluate_report()
,
read_metadata_checksum()
,
read_metadata_dublin_core()
,
read_metadata_entity()
,
read_metadata_format()
,
read_metadata_resource_metadata()
,
read_metadata()
## Not run: # List data entities entityIds <- list_data_entities(packageId = "knb-lter-ble.1.7") entityIds #> [1] "a1723e0e5f3c4881f1a7ede1b036aba6" #> [2] "b698644419ea88ab1072f4fcbef9083c" #> [3] "617415426847fd900b644283d86c1c66" #> [4] "9942544de7e794ce84a62151bd41e6b3" # Read checksum checksum <- read_data_entity_checksum( packageId = "knb-lter-ble.1.7", entityId = entityIds[1] ) checksum #> [1] "22b189095bc9a166c3891e80b67b2a636eae60a4" ## End(Not run)
## Not run: # List data entities entityIds <- list_data_entities(packageId = "knb-lter-ble.1.7") entityIds #> [1] "a1723e0e5f3c4881f1a7ede1b036aba6" #> [2] "b698644419ea88ab1072f4fcbef9083c" #> [3] "617415426847fd900b644283d86c1c66" #> [4] "9942544de7e794ce84a62151bd41e6b3" # Read checksum checksum <- read_data_entity_checksum( packageId = "knb-lter-ble.1.7", entityId = entityIds[1] ) checksum #> [1] "22b189095bc9a166c3891e80b67b2a636eae60a4" ## End(Not run)
Read data entity name
read_data_entity_name(packageId, entityId, env = "production")
read_data_entity_name(packageId, entityId, env = "production")
packageId |
(character) Data package identifier |
entityId |
(character) Data entity identifier |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(character) Name of entityId
in packageId
Other Accessing:
read_data_entity_checksum()
,
read_data_entity_names()
,
read_data_entity_resource_metadata()
,
read_data_entity_sizes()
,
read_data_entity_size()
,
read_data_entity()
,
read_data_package_archive()
,
read_data_package_citation()
,
read_data_package_doi()
,
read_data_package_error()
,
read_data_package_from_doi()
,
read_data_package_report_checksum()
,
read_data_package_report_resource_metadata()
,
read_data_package_report_summary()
,
read_data_package_report()
,
read_data_package_resource_metadata()
,
read_data_package()
,
read_evaluate_report_summary()
,
read_evaluate_report()
,
read_metadata_checksum()
,
read_metadata_dublin_core()
,
read_metadata_entity()
,
read_metadata_format()
,
read_metadata_resource_metadata()
,
read_metadata()
## Not run: # List entities entityIds <- list_data_entities(packageId = "knb-lter-cap.691.2") entityIds #> [1] "f6e4efd0b04aea3860724824ca05c5dd" #> [2] "d2263480e75cc7888b41928602cda4c6" #> [3] "d5cb83e4556408e48f636157e4dee49e" # Read name entityName <- read_data_entity_name( packageId = "knb-lter-cap.691.2", entityId = entityIds[1] ) entityName #> [1] "691_arthropods_00742cd00ab0d3d02337e28d1c919654.csv" ## End(Not run)
## Not run: # List entities entityIds <- list_data_entities(packageId = "knb-lter-cap.691.2") entityIds #> [1] "f6e4efd0b04aea3860724824ca05c5dd" #> [2] "d2263480e75cc7888b41928602cda4c6" #> [3] "d5cb83e4556408e48f636157e4dee49e" # Read name entityName <- read_data_entity_name( packageId = "knb-lter-cap.691.2", entityId = entityIds[1] ) entityName #> [1] "691_arthropods_00742cd00ab0d3d02337e28d1c919654.csv" ## End(Not run)
Read data entity names
read_data_entity_names(packageId, env = "production")
read_data_entity_names(packageId, env = "production")
packageId |
(character) Data package identifier |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(data.frame) Names and identifiers of all data entities in
packageId
Other Accessing:
read_data_entity_checksum()
,
read_data_entity_name()
,
read_data_entity_resource_metadata()
,
read_data_entity_sizes()
,
read_data_entity_size()
,
read_data_entity()
,
read_data_package_archive()
,
read_data_package_citation()
,
read_data_package_doi()
,
read_data_package_error()
,
read_data_package_from_doi()
,
read_data_package_report_checksum()
,
read_data_package_report_resource_metadata()
,
read_data_package_report_summary()
,
read_data_package_report()
,
read_data_package_resource_metadata()
,
read_data_package()
,
read_evaluate_report_summary()
,
read_evaluate_report()
,
read_metadata_checksum()
,
read_metadata_dublin_core()
,
read_metadata_entity()
,
read_metadata_format()
,
read_metadata_resource_metadata()
,
read_metadata()
## Not run: read_data_entity_names("knb-lter-cap.691.2") #> entityId #> 1 f6e4efd0b04aea3860724824ca05c5dd #> 2 d2263480e75cc7888b41928602cda4c6 #> 3 d5cb83e4556408e48f636157e4dee49e #> entityName #> 1 691_arthropods_00742cd00ab0d3d02337e28d1c919654.csv #> 2 691_captures_e5f57a98ae0b7941b10d4a600645495a.csv #> 3 691_sampling_events_e8d76d7e76385e4ae84bcafb754d0093.csv ## End(Not run)
## Not run: read_data_entity_names("knb-lter-cap.691.2") #> entityId #> 1 f6e4efd0b04aea3860724824ca05c5dd #> 2 d2263480e75cc7888b41928602cda4c6 #> 3 d5cb83e4556408e48f636157e4dee49e #> entityName #> 1 691_arthropods_00742cd00ab0d3d02337e28d1c919654.csv #> 2 691_captures_e5f57a98ae0b7941b10d4a600645495a.csv #> 3 691_sampling_events_e8d76d7e76385e4ae84bcafb754d0093.csv ## End(Not run)
Read data entity resource metadata
read_data_entity_resource_metadata( packageId, entityId, as = "data.frame", env = "production" )
read_data_entity_resource_metadata( packageId, entityId, as = "data.frame", env = "production" )
packageId |
(character) Data package identifier |
entityId |
(character) Data entity identifier |
as |
(character) Format of the returned object. Can be: "data.frame" or "xml". |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(data.frame or xml_document) The resource metadata of
entityId
in packageId
Other Accessing:
read_data_entity_checksum()
,
read_data_entity_names()
,
read_data_entity_name()
,
read_data_entity_sizes()
,
read_data_entity_size()
,
read_data_entity()
,
read_data_package_archive()
,
read_data_package_citation()
,
read_data_package_doi()
,
read_data_package_error()
,
read_data_package_from_doi()
,
read_data_package_report_checksum()
,
read_data_package_report_resource_metadata()
,
read_data_package_report_summary()
,
read_data_package_report()
,
read_data_package_resource_metadata()
,
read_data_package()
,
read_evaluate_report_summary()
,
read_evaluate_report()
,
read_metadata_checksum()
,
read_metadata_dublin_core()
,
read_metadata_entity()
,
read_metadata_format()
,
read_metadata_resource_metadata()
,
read_metadata()
## Not run: # List entities entityIds <- list_data_entities(packageId = "knb-lter-cce.310.1") head(entityIds) #> [1] "4aaaff61e0d316130be0b445d3013877" #> [2] "088775341e7fb65206af8c9e67d076e2" #> [3] "6982dd80cba66470c49a2f3dc0f82459" #> [4] "782fbaa20ea62987c838378e9eadcfa6" #> [5] "ae8ecd148df1275b30358577d0fa6b4a" #> [6] "a53b312efe0a176fdfc74ab7ccb0916b" # Read resource metadata for first entity resourceMetadata <- read_data_entity_resource_metadata( packageId = "knb-lter-cce.310.1", entityId = entityIds[1] ) ## End(Not run)
## Not run: # List entities entityIds <- list_data_entities(packageId = "knb-lter-cce.310.1") head(entityIds) #> [1] "4aaaff61e0d316130be0b445d3013877" #> [2] "088775341e7fb65206af8c9e67d076e2" #> [3] "6982dd80cba66470c49a2f3dc0f82459" #> [4] "782fbaa20ea62987c838378e9eadcfa6" #> [5] "ae8ecd148df1275b30358577d0fa6b4a" #> [6] "a53b312efe0a176fdfc74ab7ccb0916b" # Read resource metadata for first entity resourceMetadata <- read_data_entity_resource_metadata( packageId = "knb-lter-cce.310.1", entityId = entityIds[1] ) ## End(Not run)
Read data entity size
read_data_entity_size(packageId, entityId, env = "production")
read_data_entity_size(packageId, entityId, env = "production")
packageId |
(character) Data package identifier |
entityId |
(character) Data entity identifier |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(numeric) Size, in bytes, of entityId
in packageId
Other Accessing:
read_data_entity_checksum()
,
read_data_entity_names()
,
read_data_entity_name()
,
read_data_entity_resource_metadata()
,
read_data_entity_sizes()
,
read_data_entity()
,
read_data_package_archive()
,
read_data_package_citation()
,
read_data_package_doi()
,
read_data_package_error()
,
read_data_package_from_doi()
,
read_data_package_report_checksum()
,
read_data_package_report_resource_metadata()
,
read_data_package_report_summary()
,
read_data_package_report()
,
read_data_package_resource_metadata()
,
read_data_package()
,
read_evaluate_report_summary()
,
read_evaluate_report()
,
read_metadata_checksum()
,
read_metadata_dublin_core()
,
read_metadata_entity()
,
read_metadata_format()
,
read_metadata_resource_metadata()
,
read_metadata()
## Not run: # List data entities entityIds <- list_data_entities(packageId = "knb-lter-cdr.711.1") entityIds #> [1] "c61703839eac9a641ea0c3c69dc3345b" # Read size size <- read_data_entity_size( packageId = "knb-lter-cdr.711.1", entityId = entityIds ) size #> [1] 707094 ## End(Not run)
## Not run: # List data entities entityIds <- list_data_entities(packageId = "knb-lter-cdr.711.1") entityIds #> [1] "c61703839eac9a641ea0c3c69dc3345b" # Read size size <- read_data_entity_size( packageId = "knb-lter-cdr.711.1", entityId = entityIds ) size #> [1] 707094 ## End(Not run)
Read data entity sizes
read_data_entity_sizes(packageId, env = "production")
read_data_entity_sizes(packageId, env = "production")
packageId |
(character) Data package identifier |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(data.frame) Size (in bytes) and identifiers of data entities in
packageId
Other Accessing:
read_data_entity_checksum()
,
read_data_entity_names()
,
read_data_entity_name()
,
read_data_entity_resource_metadata()
,
read_data_entity_size()
,
read_data_entity()
,
read_data_package_archive()
,
read_data_package_citation()
,
read_data_package_doi()
,
read_data_package_error()
,
read_data_package_from_doi()
,
read_data_package_report_checksum()
,
read_data_package_report_resource_metadata()
,
read_data_package_report_summary()
,
read_data_package_report()
,
read_data_package_resource_metadata()
,
read_data_package()
,
read_evaluate_report_summary()
,
read_evaluate_report()
,
read_metadata_checksum()
,
read_metadata_dublin_core()
,
read_metadata_entity()
,
read_metadata_format()
,
read_metadata_resource_metadata()
,
read_metadata()
## Not run: # Read entity sizes sizes <- read_data_entity_sizes(packageId = "knb-lter-bnz.786.3") sizes #> entityId size #> 1 66bf513405f7799c35f24e4b33f7d835 19513 #> 2 33d2d8cedeea9d5dbefc973680d4557e 26429 #> 3 197b0d4372ecabd697cfd5ff1157e41b 2295 #> 4 bb8cdcf1d6f06f61007620bfa5333f2a 123366 #> 5 0916ac12f9896c35a27ea156c653718e 46475 ## End(Not run)
## Not run: # Read entity sizes sizes <- read_data_entity_sizes(packageId = "knb-lter-bnz.786.3") sizes #> entityId size #> 1 66bf513405f7799c35f24e4b33f7d835 19513 #> 2 33d2d8cedeea9d5dbefc973680d4557e 26429 #> 3 197b0d4372ecabd697cfd5ff1157e41b 2295 #> 4 bb8cdcf1d6f06f61007620bfa5333f2a 123366 #> 5 0916ac12f9896c35a27ea156c653718e 46475 ## End(Not run)
Read data package
read_data_package(packageId, ore = FALSE, env = "production")
read_data_package(packageId, ore = FALSE, env = "production")
packageId |
(character) Data package identifier |
ore |
(logical) Return an OAI-ORE compliant resource map in RDF-XML format |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(character or xml_document) A resource map with reference URLs to
each of the metadata, data, and quality report resources that comprise the
packageId
.
Other Accessing:
read_data_entity_checksum()
,
read_data_entity_names()
,
read_data_entity_name()
,
read_data_entity_resource_metadata()
,
read_data_entity_sizes()
,
read_data_entity_size()
,
read_data_entity()
,
read_data_package_archive()
,
read_data_package_citation()
,
read_data_package_doi()
,
read_data_package_error()
,
read_data_package_from_doi()
,
read_data_package_report_checksum()
,
read_data_package_report_resource_metadata()
,
read_data_package_report_summary()
,
read_data_package_report()
,
read_data_package_resource_metadata()
,
read_evaluate_report_summary()
,
read_evaluate_report()
,
read_metadata_checksum()
,
read_metadata_dublin_core()
,
read_metadata_entity()
,
read_metadata_format()
,
read_metadata_resource_metadata()
,
read_metadata()
## Not run: # Get resource map resourceMap <- read_data_package(packageId = "knb-lter-cwt.5026.13") resourceMap #> [1] "https://pasta.lternet.edu/package/data/eml/knb-lter-cwt/5026/13/ ... #> [2] "https://pasta.lternet.edu/package/data/eml/knb-lter-cwt/5026/13/ ... #> [3] "https://pasta.lternet.edu/package/metadata/eml/knb-lter-cwt/5026 ... #> [4] "https://pasta.lternet.edu/package/report/eml/knb-lter-cwt/5026/1 ... #> [5] "https://pasta.lternet.edu/package/eml/knb-lter-cwt/5026/13" # Get resource map in ORE format resourceMap <- read_data_package( packageId = "knb-lter-cwt.5026.13", ore = TRUE ) resourceMap #> {xml_document} #> <RDF xmlns:cito="http://purl.org/spar/cito/" xmlns:dc="http://purl.or ... #> [1] <rdf:Description rdf:about="https://pasta.lternet.edu/package/eml ... #> [2] <rdf:Description rdf:about="https://pasta.lternet.edu/package/eml ... #> [3] <rdf:Description rdf:about="https://pasta.lternet.edu/package/eml ... #> [4] <rdf:Description rdf:about="https://pasta.lternet.edu/package/eml ... #> [5] <rdf:Description rdf:about="https://pasta.lternet.edu/package/eml ... #> [6] <rdf:Description rdf:about="https://pasta.lternet.edu/package/eml ... #> [7] <rdf:Description rdf:about="http://environmentaldatainitiative.or ... #> [8] <rdf:Description rdf:about="http://www.openarchives.org/ore/terms ... #> [9] <rdf:Description rdf:about="http://www.openarchives.org/ore/terms ... ## End(Not run)
## Not run: # Get resource map resourceMap <- read_data_package(packageId = "knb-lter-cwt.5026.13") resourceMap #> [1] "https://pasta.lternet.edu/package/data/eml/knb-lter-cwt/5026/13/ ... #> [2] "https://pasta.lternet.edu/package/data/eml/knb-lter-cwt/5026/13/ ... #> [3] "https://pasta.lternet.edu/package/metadata/eml/knb-lter-cwt/5026 ... #> [4] "https://pasta.lternet.edu/package/report/eml/knb-lter-cwt/5026/1 ... #> [5] "https://pasta.lternet.edu/package/eml/knb-lter-cwt/5026/13" # Get resource map in ORE format resourceMap <- read_data_package( packageId = "knb-lter-cwt.5026.13", ore = TRUE ) resourceMap #> {xml_document} #> <RDF xmlns:cito="http://purl.org/spar/cito/" xmlns:dc="http://purl.or ... #> [1] <rdf:Description rdf:about="https://pasta.lternet.edu/package/eml ... #> [2] <rdf:Description rdf:about="https://pasta.lternet.edu/package/eml ... #> [3] <rdf:Description rdf:about="https://pasta.lternet.edu/package/eml ... #> [4] <rdf:Description rdf:about="https://pasta.lternet.edu/package/eml ... #> [5] <rdf:Description rdf:about="https://pasta.lternet.edu/package/eml ... #> [6] <rdf:Description rdf:about="https://pasta.lternet.edu/package/eml ... #> [7] <rdf:Description rdf:about="http://environmentaldatainitiative.or ... #> [8] <rdf:Description rdf:about="http://www.openarchives.org/ore/terms ... #> [9] <rdf:Description rdf:about="http://www.openarchives.org/ore/terms ... ## End(Not run)
Read data package archive
read_data_package_archive(packageId, transaction, path, env = "production")
read_data_package_archive(packageId, transaction, path, env = "production")
packageId |
(character) Data package identifier |
transaction |
(character) Transaction identifier. This parameter is DEPRECATED. |
path |
(character) Path of directory in which the result will be written |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(.zip file) The data package archive of packageId
requested
by transaction
Other Accessing:
read_data_entity_checksum()
,
read_data_entity_names()
,
read_data_entity_name()
,
read_data_entity_resource_metadata()
,
read_data_entity_sizes()
,
read_data_entity_size()
,
read_data_entity()
,
read_data_package_citation()
,
read_data_package_doi()
,
read_data_package_error()
,
read_data_package_from_doi()
,
read_data_package_report_checksum()
,
read_data_package_report_resource_metadata()
,
read_data_package_report_summary()
,
read_data_package_report()
,
read_data_package_resource_metadata()
,
read_data_package()
,
read_evaluate_report_summary()
,
read_evaluate_report()
,
read_metadata_checksum()
,
read_metadata_dublin_core()
,
read_metadata_entity()
,
read_metadata_format()
,
read_metadata_resource_metadata()
,
read_metadata()
## Not run: # Download zip archive read_data_package_archive("knb-lter-sev.31999.1", path = tempdir()) #> |=============================================================| 100% dir(tempdir()) #> [1] "knb-lter-sev.31999.1.zip" ## End(Not run)
## Not run: # Download zip archive read_data_package_archive("knb-lter-sev.31999.1", path = tempdir()) #> |=============================================================| 100% dir(tempdir()) #> [1] "knb-lter-sev.31999.1.zip" ## End(Not run)
Read data package citation
read_data_package_citation( packageId, access = TRUE, style = "ESIP", ignore = NULL, as = "char", env = "production" )
read_data_package_citation( packageId, access = TRUE, style = "ESIP", ignore = NULL, as = "char", env = "production" )
packageId |
(character) Data package identifier |
access |
(logical) Return a datestamp in the citation of the current UTC date. This is recommended by the ESIP citation style guide. |
style |
(character) Set the style for which to format the citation. Can be: "ESIP", "DRYAD", "BIBTEX", "RAW". |
ignore |
(character) Ignore individuals, organizations, or positions in the author list. Can be: "INDIVIDUALS", "ORGANIZATIONS", or "POSITIONS". See details below. |
as |
(character) Format of the returned citation. Can be: "char", "html", "json". |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
A citation may consist of a list of authors, publication year,
title, data package version, publisher, digital object identifier, and
access date. The order and presence of these components depends on the
style
requested for the citation (see query parameters above).
A brief discussion of the fields in a citation:
Authors - This function uses content extracted from the science metadata described by an Ecological Metadata Language (EML) document to generate the author list. Specifically, it uses the creator section of EML to generate the list of authors, including individuals, organizations, and positions.
This function preserves the order of the creator list as defined within the EML document. As such, if you would like the citation to begin with an organization name, you should position the creator element that describes the organization at the beginning of the creator list in the EML document.
This function also assumes that a creator element contains information pertaining to only a single "creator", although EML allows for multiple identities in a single creator element. It will do its best to accommodate multi-named subjects within a creator element, but mileage will vary.
This function is opinionated in how it determines an author: individuals, take precedence over organizations and positions, and organizations take precedence over positions. What this means is if an individual and organization and position are all defined in a single creator element, this function sets the author to the named information within the individual element; and, if only an organization and position exist within a single creator element, this function will set the author to the named information within the organization element. Finally, if only a position is defined within a single creator element, this function will set the author to the named information within the position element. It is important to note that this function respects the creator content as defined in the EML document and will set a position name to an author if it is present and meets the above hierarchy. If you believe that a position should not be displayed as data package author, then you should not include it as a data package creator.
Finally, this function does not collect or use tertiary information (e.g., phone number, addresses, emails) from within the creator element since this type of information is not used as part of a data package citation.
Publication Year - The publication year is defined by the calendar year when the data package was archived into the EDI data repository. The publication year may differ from the year of the publication date entered into the EML, which is often set to the date when the data package became publicly available, although not yet archived into the EDI data repository.
Title - This function uses the title section of EML as the citation title. EML title elements are copied verbatim into the citation.
Version Number - The citation version number represents the revision step (or increment) of the data package as archived in the EDI data repository. Revision values are whole numbers and have a one-to-one correspondence to the revision of the data package in the repository.
Publisher - By default, the publisher field of the citation is permanently set to "Environmental Data Initiative". This value will not change during the tenure of the EDI data repository.
DOI - The Digital Object Identifier (DOI) is the EDI generated DOI value that is registered with DataCite, and is displayed using the fully qualified "doi.org" URL. This DOI URL will resolve to the corresponding "landing page" of the data package as displayed on the EDI Data Portal.
Access Date - The access date is the UTC date in which the citation was requested.
(character or html_document or json) The data package citation
Other Accessing:
read_data_entity_checksum()
,
read_data_entity_names()
,
read_data_entity_name()
,
read_data_entity_resource_metadata()
,
read_data_entity_sizes()
,
read_data_entity_size()
,
read_data_entity()
,
read_data_package_archive()
,
read_data_package_doi()
,
read_data_package_error()
,
read_data_package_from_doi()
,
read_data_package_report_checksum()
,
read_data_package_report_resource_metadata()
,
read_data_package_report_summary()
,
read_data_package_report()
,
read_data_package_resource_metadata()
,
read_data_package()
,
read_evaluate_report_summary()
,
read_evaluate_report()
,
read_metadata_checksum()
,
read_metadata_dublin_core()
,
read_metadata_entity()
,
read_metadata_format()
,
read_metadata_resource_metadata()
,
read_metadata()
## Not run: packageId <- "edi.460.1" # Retrieve "ESIP" stylized citation (default) in plain text format citation <- read_data_package_citation(packageId) citation #> [1] "Armitage, A.R., C.A. Weaver, J.S. Kominoski, and S.C. Pennings. ..." # Retrieve "DRYAD" stylized citation in plain text format citation <- read_data_package_citation(packageId, style = "DRYAD") citation #> [1] "Armitage AR, Weaver CA, Kominoski JS, and Pennings SC (2020) Hur..." # Retrieve "ESIP" stylized citation (default) in HTML format citation <- read_data_package_citation(packageId, as = "html") citation #> {html_document} #> <html> #> [1] <body><p>Armitage, A.R., C.A. Weaver, J.S. Kominoski, and S.C. Pen... # Retrieve "ESIP" stylized citation (default), ignoring individuals, in # plain text format citation <- read_data_package_citation(packageId, ignore = "INDIVIDUALS") citation #> [1] "Texas A&M University at Galveston, Texas A&M University - Corpu ..." ## End(Not run)
## Not run: packageId <- "edi.460.1" # Retrieve "ESIP" stylized citation (default) in plain text format citation <- read_data_package_citation(packageId) citation #> [1] "Armitage, A.R., C.A. Weaver, J.S. Kominoski, and S.C. Pennings. ..." # Retrieve "DRYAD" stylized citation in plain text format citation <- read_data_package_citation(packageId, style = "DRYAD") citation #> [1] "Armitage AR, Weaver CA, Kominoski JS, and Pennings SC (2020) Hur..." # Retrieve "ESIP" stylized citation (default) in HTML format citation <- read_data_package_citation(packageId, as = "html") citation #> {html_document} #> <html> #> [1] <body><p>Armitage, A.R., C.A. Weaver, J.S. Kominoski, and S.C. Pen... # Retrieve "ESIP" stylized citation (default), ignoring individuals, in # plain text format citation <- read_data_package_citation(packageId, ignore = "INDIVIDUALS") citation #> [1] "Texas A&M University at Galveston, Texas A&M University - Corpu ..." ## End(Not run)
Read data package Digital Object Identifier
read_data_package_doi(packageId, as_url = FALSE, env = "production")
read_data_package_doi(packageId, as_url = FALSE, env = "production")
packageId |
(character) Data package identifier |
as_url |
(logical) Returns the DOI as a URL if TRUE. |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(character) The Digital Object Identifier for packageId
Other Accessing:
read_data_entity_checksum()
,
read_data_entity_names()
,
read_data_entity_name()
,
read_data_entity_resource_metadata()
,
read_data_entity_sizes()
,
read_data_entity_size()
,
read_data_entity()
,
read_data_package_archive()
,
read_data_package_citation()
,
read_data_package_error()
,
read_data_package_from_doi()
,
read_data_package_report_checksum()
,
read_data_package_report_resource_metadata()
,
read_data_package_report_summary()
,
read_data_package_report()
,
read_data_package_resource_metadata()
,
read_data_package()
,
read_evaluate_report_summary()
,
read_evaluate_report()
,
read_metadata_checksum()
,
read_metadata_dublin_core()
,
read_metadata_entity()
,
read_metadata_format()
,
read_metadata_resource_metadata()
,
read_metadata()
## Not run: # Read package DOI doi <- read_data_package_doi("knb-lter-jrn.210548103.15") doi #> [1] "doi:10.6073/pasta/c80c0c03d22791524d4b870d2193c843" # Read package DOI as URL doi <- read_data_package_doi("knb-lter-jrn.210548103.15", as_url = TRUE) doi #> [1] "https://doi.org/10.6073/pasta/c80c0c03d22791524d4b870d2193c843" ## End(Not run)
## Not run: # Read package DOI doi <- read_data_package_doi("knb-lter-jrn.210548103.15") doi #> [1] "doi:10.6073/pasta/c80c0c03d22791524d4b870d2193c843" # Read package DOI as URL doi <- read_data_package_doi("knb-lter-jrn.210548103.15", as_url = TRUE) doi #> [1] "https://doi.org/10.6073/pasta/c80c0c03d22791524d4b870d2193c843" ## End(Not run)
Read data package error
read_data_package_error(transaction, env = "production")
read_data_package_error(transaction, env = "production")
transaction |
(character) Transaction identifier |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
An error is returned if an error occurred while processing the
request, otherwise NULL
is returned if no error was encountered or if
processing is still underway.
User authentication is required (see login()
)
Other Accessing:
read_data_entity_checksum()
,
read_data_entity_names()
,
read_data_entity_name()
,
read_data_entity_resource_metadata()
,
read_data_entity_sizes()
,
read_data_entity_size()
,
read_data_entity()
,
read_data_package_archive()
,
read_data_package_citation()
,
read_data_package_doi()
,
read_data_package_from_doi()
,
read_data_package_report_checksum()
,
read_data_package_report_resource_metadata()
,
read_data_package_report_summary()
,
read_data_package_report()
,
read_data_package_resource_metadata()
,
read_data_package()
,
read_evaluate_report_summary()
,
read_evaluate_report()
,
read_metadata_checksum()
,
read_metadata_dublin_core()
,
read_metadata_entity()
,
read_metadata_format()
,
read_metadata_resource_metadata()
,
read_metadata()
Read data package from Digital Object Identifier
read_data_package_from_doi(doi, ore = FALSE)
read_data_package_from_doi(doi, ore = FALSE)
doi |
(character) Digital Object Identifier of data package in the format "shoulder/pasta/md5" |
ore |
(logical) Return an OAI-ORE compliant resource map in RDF-XML format |
(character or xml_document) A resource map with reference URLs to each of the metadata, data, and quality report resources that comprise the data package.
Other Accessing:
read_data_entity_checksum()
,
read_data_entity_names()
,
read_data_entity_name()
,
read_data_entity_resource_metadata()
,
read_data_entity_sizes()
,
read_data_entity_size()
,
read_data_entity()
,
read_data_package_archive()
,
read_data_package_citation()
,
read_data_package_doi()
,
read_data_package_error()
,
read_data_package_report_checksum()
,
read_data_package_report_resource_metadata()
,
read_data_package_report_summary()
,
read_data_package_report()
,
read_data_package_resource_metadata()
,
read_data_package()
,
read_evaluate_report_summary()
,
read_evaluate_report()
,
read_metadata_checksum()
,
read_metadata_dublin_core()
,
read_metadata_entity()
,
read_metadata_format()
,
read_metadata_resource_metadata()
,
read_metadata()
## Not run: # Get resource map resourceMap <- read_data_package_from_doi( doi = "doi:10.6073/pasta/b202c11db7c64943f6b4ed9f8c17fb25" ) resourceMap #> [1] "https://pasta.lternet.edu/package/data/eml/knb-lter-fce/1233/2/5 ... #> [2] "https://pasta.lternet.edu/package/metadata/eml/knb-lter-fce/1233/2" #> [3] "https://pasta.lternet.edu/package/report/eml/knb-lter-fce/1233/2" #> [4] "https://pasta.lternet.edu/package/eml/knb-lter-fce/1233/2" # Get resource map in ORE format resourceMap <- read_data_package_from_doi( doi = "doi:10.6073/pasta/b202c11db7c64943f6b4ed9f8c17fb25", ore = TRUE ) resourceMap #> {xml_document} #> <RDF xmlns:cito="http://purl.org/spar/cito/" xmlns:dc="http://purl.or ... #> [1] <rdf:Description rdf:about="https://pasta.lternet.edu/package/eml ... #> [2] <rdf:Description rdf:about="https://pasta.lternet.edu/package/eml ... #> [3] <rdf:Description rdf:about="https://pasta.lternet.edu/package/eml ... #> [4] <rdf:Description rdf:about="https://pasta.lternet.edu/package/eml ... #> [5] <rdf:Description rdf:about="https://pasta.lternet.edu/package/eml ... #> [6] <rdf:Description rdf:about="http://environmentaldatainitiative.or ... #> [7] <rdf:Description rdf:about="http://www.openarchives.org/ore/terms ... #> [8] <rdf:Description rdf:about="http://www.openarchives.org/ore/terms ... ## End(Not run)
## Not run: # Get resource map resourceMap <- read_data_package_from_doi( doi = "doi:10.6073/pasta/b202c11db7c64943f6b4ed9f8c17fb25" ) resourceMap #> [1] "https://pasta.lternet.edu/package/data/eml/knb-lter-fce/1233/2/5 ... #> [2] "https://pasta.lternet.edu/package/metadata/eml/knb-lter-fce/1233/2" #> [3] "https://pasta.lternet.edu/package/report/eml/knb-lter-fce/1233/2" #> [4] "https://pasta.lternet.edu/package/eml/knb-lter-fce/1233/2" # Get resource map in ORE format resourceMap <- read_data_package_from_doi( doi = "doi:10.6073/pasta/b202c11db7c64943f6b4ed9f8c17fb25", ore = TRUE ) resourceMap #> {xml_document} #> <RDF xmlns:cito="http://purl.org/spar/cito/" xmlns:dc="http://purl.or ... #> [1] <rdf:Description rdf:about="https://pasta.lternet.edu/package/eml ... #> [2] <rdf:Description rdf:about="https://pasta.lternet.edu/package/eml ... #> [3] <rdf:Description rdf:about="https://pasta.lternet.edu/package/eml ... #> [4] <rdf:Description rdf:about="https://pasta.lternet.edu/package/eml ... #> [5] <rdf:Description rdf:about="https://pasta.lternet.edu/package/eml ... #> [6] <rdf:Description rdf:about="http://environmentaldatainitiative.or ... #> [7] <rdf:Description rdf:about="http://www.openarchives.org/ore/terms ... #> [8] <rdf:Description rdf:about="http://www.openarchives.org/ore/terms ... ## End(Not run)
Read data package report
read_data_package_report(packageId, as = "xml", env = "production")
read_data_package_report(packageId, as = "xml", env = "production")
packageId |
(character) Data package identifier |
as |
(character) Format of the returned report. Can be: "xml", "html", or "char". |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(xml_document) Data package report
Other Accessing:
read_data_entity_checksum()
,
read_data_entity_names()
,
read_data_entity_name()
,
read_data_entity_resource_metadata()
,
read_data_entity_sizes()
,
read_data_entity_size()
,
read_data_entity()
,
read_data_package_archive()
,
read_data_package_citation()
,
read_data_package_doi()
,
read_data_package_error()
,
read_data_package_from_doi()
,
read_data_package_report_checksum()
,
read_data_package_report_resource_metadata()
,
read_data_package_report_summary()
,
read_data_package_resource_metadata()
,
read_data_package()
,
read_evaluate_report_summary()
,
read_evaluate_report()
,
read_metadata_checksum()
,
read_metadata_dublin_core()
,
read_metadata_entity()
,
read_metadata_format()
,
read_metadata_resource_metadata()
,
read_metadata()
## Not run: # Read as XML qualityReport <- read_data_package_report("knb-lter-knz.260.4") qualityReport #> {xml_document} #> <qualityReport schemaLocation="eml://ecoinformatics.org/qualityReport ... #> [1] <creationDate>2020-02-04T16:38:38</creationDate> #> [2] <packageId>knb-lter-knz.260.4</packageId> #> [3] <includeSystem>lter</includeSystem> #> [4] <includeSystem>knb</includeSystem> #> [5] <datasetReport>\n <qualityCheck qualityType="metadata" system=" ... #> [6] <entityReport>\n <entityName>GIS600</entityName>\n <qualityChe ... #> [7] <entityReport>\n <entityName>KMZGIS600</entityName>\n <quality ... #> [8] <entityReport>\n <entityName>GIS605</entityName>\n <qualityChe ... #> [9] <entityReport>\n <entityName>KMZGIS605</entityName>\n <quality ... #> [10] <entityReport>\n <entityName>GIS610</entityName>\n <qualityChe ... #> ... # Read as HTML qualityReport <- read_data_package_report( packageId = "knb-lter-knz.260.4", as = "html" ) qualityReport #> {html_document} #> <html> #> [1] <body><table xmlns:qr="eml://ecoinformatics.org/qualityReport"><t ... # Read as character qualityReport <- read_data_package_report( packageId = "knb-lter-knz.260.4", as = "char" ) # writeLines(qualityReport, paste0(tempdir(), "/report.txt")) ## End(Not run)
## Not run: # Read as XML qualityReport <- read_data_package_report("knb-lter-knz.260.4") qualityReport #> {xml_document} #> <qualityReport schemaLocation="eml://ecoinformatics.org/qualityReport ... #> [1] <creationDate>2020-02-04T16:38:38</creationDate> #> [2] <packageId>knb-lter-knz.260.4</packageId> #> [3] <includeSystem>lter</includeSystem> #> [4] <includeSystem>knb</includeSystem> #> [5] <datasetReport>\n <qualityCheck qualityType="metadata" system=" ... #> [6] <entityReport>\n <entityName>GIS600</entityName>\n <qualityChe ... #> [7] <entityReport>\n <entityName>KMZGIS600</entityName>\n <quality ... #> [8] <entityReport>\n <entityName>GIS605</entityName>\n <qualityChe ... #> [9] <entityReport>\n <entityName>KMZGIS605</entityName>\n <quality ... #> [10] <entityReport>\n <entityName>GIS610</entityName>\n <qualityChe ... #> ... # Read as HTML qualityReport <- read_data_package_report( packageId = "knb-lter-knz.260.4", as = "html" ) qualityReport #> {html_document} #> <html> #> [1] <body><table xmlns:qr="eml://ecoinformatics.org/qualityReport"><t ... # Read as character qualityReport <- read_data_package_report( packageId = "knb-lter-knz.260.4", as = "char" ) # writeLines(qualityReport, paste0(tempdir(), "/report.txt")) ## End(Not run)
Read data package report checksum
read_data_package_report_checksum(packageId, env = "production")
read_data_package_report_checksum(packageId, env = "production")
packageId |
(character) Data package identifier |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(character) A 40 character SHA-1 checksum value for the report
Other Accessing:
read_data_entity_checksum()
,
read_data_entity_names()
,
read_data_entity_name()
,
read_data_entity_resource_metadata()
,
read_data_entity_sizes()
,
read_data_entity_size()
,
read_data_entity()
,
read_data_package_archive()
,
read_data_package_citation()
,
read_data_package_doi()
,
read_data_package_error()
,
read_data_package_from_doi()
,
read_data_package_report_resource_metadata()
,
read_data_package_report_summary()
,
read_data_package_report()
,
read_data_package_resource_metadata()
,
read_data_package()
,
read_evaluate_report_summary()
,
read_evaluate_report()
,
read_metadata_checksum()
,
read_metadata_dublin_core()
,
read_metadata_entity()
,
read_metadata_format()
,
read_metadata_resource_metadata()
,
read_metadata()
## Not run: # Read report checksum packageId <- "knb-lter-luq.208.1" checksum <- read_data_package_report_checksum(packageId) checksum #> "980dbf3f3cdb7395933b711b005722033bdcd12f" ## End(Not run)
## Not run: # Read report checksum packageId <- "knb-lter-luq.208.1" checksum <- read_data_package_report_checksum(packageId) checksum #> "980dbf3f3cdb7395933b711b005722033bdcd12f" ## End(Not run)
Read data package report resource metadata
read_data_package_report_resource_metadata( packageId, as = "data.frame", env = "production" )
read_data_package_report_resource_metadata( packageId, as = "data.frame", env = "production" )
packageId |
(character) Data package identifier |
as |
(character) Format of the returned object. Can be: "data.frame" or "xml". |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(data.frame or xml_document) Report resource metadata
Other Accessing:
read_data_entity_checksum()
,
read_data_entity_names()
,
read_data_entity_name()
,
read_data_entity_resource_metadata()
,
read_data_entity_sizes()
,
read_data_entity_size()
,
read_data_entity()
,
read_data_package_archive()
,
read_data_package_citation()
,
read_data_package_doi()
,
read_data_package_error()
,
read_data_package_from_doi()
,
read_data_package_report_checksum()
,
read_data_package_report_summary()
,
read_data_package_report()
,
read_data_package_resource_metadata()
,
read_data_package()
,
read_evaluate_report_summary()
,
read_evaluate_report()
,
read_metadata_checksum()
,
read_metadata_dublin_core()
,
read_metadata_entity()
,
read_metadata_format()
,
read_metadata_resource_metadata()
,
read_metadata()
## Not run: # Read resource metadata resourceMetadata <- read_data_package_report_resource_metadata( packageId = "knb-lter-mcm.9129.3" ) ## End(Not run)
## Not run: # Read resource metadata resourceMetadata <- read_data_package_report_resource_metadata( packageId = "knb-lter-mcm.9129.3" ) ## End(Not run)
Summarize the data package quality report
read_data_package_report_summary( packageId, with_exceptions = TRUE, env = "production" )
read_data_package_report_summary( packageId, with_exceptions = TRUE, env = "production" )
packageId |
(character) Data package identifier |
with_exceptions |
(logical) Convert quality report warnings and errors to R warnings and errors |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(message/warning/error) A message listing the total number of checks
resulting in valid, info, warn, and error status. Exceptions are raised if
warnings and errors are found and with_exceptions
is TRUE.
Other Accessing:
read_data_entity_checksum()
,
read_data_entity_names()
,
read_data_entity_name()
,
read_data_entity_resource_metadata()
,
read_data_entity_sizes()
,
read_data_entity_size()
,
read_data_entity()
,
read_data_package_archive()
,
read_data_package_citation()
,
read_data_package_doi()
,
read_data_package_error()
,
read_data_package_from_doi()
,
read_data_package_report_checksum()
,
read_data_package_report_resource_metadata()
,
read_data_package_report()
,
read_data_package_resource_metadata()
,
read_data_package()
,
read_evaluate_report_summary()
,
read_evaluate_report()
,
read_metadata_checksum()
,
read_metadata_dublin_core()
,
read_metadata_entity()
,
read_metadata_format()
,
read_metadata_resource_metadata()
,
read_metadata()
## Not run: # Read report summary read_data_package_report_summary("knb-lter-knz.260.4") #> =================================================== #> EVALUATION REPORT #> =================================================== #> #> PackageId: knb-lter-knz.260.4 #> Report Date/Time: 2020-02-04T16:38:38 #> Total Quality Checks: 213 #> Valid: 139 #> Info: 73 #> Warn: 1 #> Error: 0 #> #> #> Warning message: #> One or more quality checks resulted in 'warn' ## End(Not run)
## Not run: # Read report summary read_data_package_report_summary("knb-lter-knz.260.4") #> =================================================== #> EVALUATION REPORT #> =================================================== #> #> PackageId: knb-lter-knz.260.4 #> Report Date/Time: 2020-02-04T16:38:38 #> Total Quality Checks: 213 #> Valid: 139 #> Info: 73 #> Warn: 1 #> Error: 0 #> #> #> Warning message: #> One or more quality checks resulted in 'warn' ## End(Not run)
Read data package resource metadata
read_data_package_resource_metadata( packageId, as = "data.frame", env = "production" )
read_data_package_resource_metadata( packageId, as = "data.frame", env = "production" )
packageId |
(character) Data package identifier |
as |
(character) Format of the returned object. Can be: "data.frame" or "xml". |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(data.frame or xml_document) Resource metadata of packageId
Other Accessing:
read_data_entity_checksum()
,
read_data_entity_names()
,
read_data_entity_name()
,
read_data_entity_resource_metadata()
,
read_data_entity_sizes()
,
read_data_entity_size()
,
read_data_entity()
,
read_data_package_archive()
,
read_data_package_citation()
,
read_data_package_doi()
,
read_data_package_error()
,
read_data_package_from_doi()
,
read_data_package_report_checksum()
,
read_data_package_report_resource_metadata()
,
read_data_package_report_summary()
,
read_data_package_report()
,
read_data_package()
,
read_evaluate_report_summary()
,
read_evaluate_report()
,
read_metadata_checksum()
,
read_metadata_dublin_core()
,
read_metadata_entity()
,
read_metadata_format()
,
read_metadata_resource_metadata()
,
read_metadata()
## Not run: # Read resource metadata resourceMetadata <- read_data_package_resource_metadata( packageId = "edi.613.1" ) ## End(Not run)
## Not run: # Read resource metadata resourceMetadata <- read_data_package_resource_metadata( packageId = "edi.613.1" ) ## End(Not run)
Read evaluate report
read_evaluate_report(transaction, as = "xml", env = "production")
read_evaluate_report(transaction, as = "xml", env = "production")
transaction |
(character) Transaction identifier |
as |
(character) Format of the returned report. Can be: "xml", "html", or "char". |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(xml_document or html_document or character) The evaluate quality report document
User authentication is required (see login()
)
Other Accessing:
read_data_entity_checksum()
,
read_data_entity_names()
,
read_data_entity_name()
,
read_data_entity_resource_metadata()
,
read_data_entity_sizes()
,
read_data_entity_size()
,
read_data_entity()
,
read_data_package_archive()
,
read_data_package_citation()
,
read_data_package_doi()
,
read_data_package_error()
,
read_data_package_from_doi()
,
read_data_package_report_checksum()
,
read_data_package_report_resource_metadata()
,
read_data_package_report_summary()
,
read_data_package_report()
,
read_data_package_resource_metadata()
,
read_data_package()
,
read_evaluate_report_summary()
,
read_metadata_checksum()
,
read_metadata_dublin_core()
,
read_metadata_entity()
,
read_metadata_format()
,
read_metadata_resource_metadata()
,
read_metadata()
## Not run: login() # Evaluate data package transaction <- evaluate_data_package( eml = paste0(tempdir(), "/edi.595.1.xml"), env = "staging" ) transaction #> [1] "evaluate_163966785813042760" # Read as HTML and write to file for a web browser view qualityReport <- read_evaluate_report( transaction = transaction, as = "html", env = "staging" ) writeLines(qualityReport, paste0(tempdir(), "/report.html")) # Read as character and write to file for browsing qualityReport <- read_evaluate_report( transaction = transaction, as = "char", env = "staging" ) writeLines(qualityReport, paste0(tempdir(), "/report.txt")) # Read as XML qualityReport <- read_evaluate_report( transaction = transaction, env = "staging" ) qualityReport #> {xml_document} #> <qualityReport schemaLocation="eml://ecoinformatics.org/qualityReport ... #> [1] <creationDate>2021-12-16T22:15:38</creationDate> #> [2] <packageId>edi.606.1</packageId> #> [3] <includeSystem>lter</includeSystem> #> [4] <includeSystem>knb</includeSystem> #> [5] <datasetReport>\n <qualityCheck qualityType="metadata" system=" ... #> [6] <entityReport>\n <entityName>data.txt</entityName>\n <qualityC ... logout() ## End(Not run)
## Not run: login() # Evaluate data package transaction <- evaluate_data_package( eml = paste0(tempdir(), "/edi.595.1.xml"), env = "staging" ) transaction #> [1] "evaluate_163966785813042760" # Read as HTML and write to file for a web browser view qualityReport <- read_evaluate_report( transaction = transaction, as = "html", env = "staging" ) writeLines(qualityReport, paste0(tempdir(), "/report.html")) # Read as character and write to file for browsing qualityReport <- read_evaluate_report( transaction = transaction, as = "char", env = "staging" ) writeLines(qualityReport, paste0(tempdir(), "/report.txt")) # Read as XML qualityReport <- read_evaluate_report( transaction = transaction, env = "staging" ) qualityReport #> {xml_document} #> <qualityReport schemaLocation="eml://ecoinformatics.org/qualityReport ... #> [1] <creationDate>2021-12-16T22:15:38</creationDate> #> [2] <packageId>edi.606.1</packageId> #> [3] <includeSystem>lter</includeSystem> #> [4] <includeSystem>knb</includeSystem> #> [5] <datasetReport>\n <qualityCheck qualityType="metadata" system=" ... #> [6] <entityReport>\n <entityName>data.txt</entityName>\n <qualityC ... logout() ## End(Not run)
Summarize the evaluate quality report
read_evaluate_report_summary( transaction, with_exceptions = TRUE, env = "production" )
read_evaluate_report_summary( transaction, with_exceptions = TRUE, env = "production" )
transaction |
(character) Transaction identifier |
with_exceptions |
(logical) Convert quality report warnings and errors to R warnings and errors |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
Get transaction
from evaluate_data_package()
(message/warning/error) A message listing the total number of checks
resulting in valid, info, warn, and error status. Exceptions are raised if
warnings and errors are found and with_exceptions
is TRUE.
User authentication is required (see login()
)
Other Accessing:
read_data_entity_checksum()
,
read_data_entity_names()
,
read_data_entity_name()
,
read_data_entity_resource_metadata()
,
read_data_entity_sizes()
,
read_data_entity_size()
,
read_data_entity()
,
read_data_package_archive()
,
read_data_package_citation()
,
read_data_package_doi()
,
read_data_package_error()
,
read_data_package_from_doi()
,
read_data_package_report_checksum()
,
read_data_package_report_resource_metadata()
,
read_data_package_report_summary()
,
read_data_package_report()
,
read_data_package_resource_metadata()
,
read_data_package()
,
read_evaluate_report()
,
read_metadata_checksum()
,
read_metadata_dublin_core()
,
read_metadata_entity()
,
read_metadata_format()
,
read_metadata_resource_metadata()
,
read_metadata()
## Not run: login() # Evaluate data package transaction <- evaluate_data_package( eml = paste0(tempdir(), "/edi.595.1.xml"), env = "staging" ) transaction #> [1] "evaluate_163966785813042760" # Summarize report read_evaluate_report_summary(transaction, env = "staging") #> =================================================== #> EVALUATION REPORT #> =================================================== #> #> PackageId: edi.595.1 #> Report Date/Time: 2021-12-16T22:49:25 #> Total Quality Checks: 29 #> Valid: 21 #> Info: 8 #> Warn: 0 #> Error: 0 logout() ## End(Not run)
## Not run: login() # Evaluate data package transaction <- evaluate_data_package( eml = paste0(tempdir(), "/edi.595.1.xml"), env = "staging" ) transaction #> [1] "evaluate_163966785813042760" # Summarize report read_evaluate_report_summary(transaction, env = "staging") #> =================================================== #> EVALUATION REPORT #> =================================================== #> #> PackageId: edi.595.1 #> Report Date/Time: 2021-12-16T22:49:25 #> Total Quality Checks: 29 #> Valid: 21 #> Info: 8 #> Warn: 0 #> Error: 0 logout() ## End(Not run)
Read metadata
read_metadata(packageId, env = "production")
read_metadata(packageId, env = "production")
packageId |
(character) Data package identifier |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(xml_document) EML metadata document.
See the emld library for more on working with EML as a list or JSON-LD. See the xml2 library for working with EML as XML.
Other Accessing:
read_data_entity_checksum()
,
read_data_entity_names()
,
read_data_entity_name()
,
read_data_entity_resource_metadata()
,
read_data_entity_sizes()
,
read_data_entity_size()
,
read_data_entity()
,
read_data_package_archive()
,
read_data_package_citation()
,
read_data_package_doi()
,
read_data_package_error()
,
read_data_package_from_doi()
,
read_data_package_report_checksum()
,
read_data_package_report_resource_metadata()
,
read_data_package_report_summary()
,
read_data_package_report()
,
read_data_package_resource_metadata()
,
read_data_package()
,
read_evaluate_report_summary()
,
read_evaluate_report()
,
read_metadata_checksum()
,
read_metadata_dublin_core()
,
read_metadata_entity()
,
read_metadata_format()
,
read_metadata_resource_metadata()
## Not run: # Read metadata eml <- read_metadata("edi.100.1") eml #> {xml_document} #> <eml packageId="edi.100.1" system="https://pasta.edirepository.org" ... #> [1] <access authSystem="https://pasta.edirepository.org/authenticatio ... #> [2] <dataset>\n <alternateIdentifier system="https://doi.org">doi:10 ... ## End(Not run)
## Not run: # Read metadata eml <- read_metadata("edi.100.1") eml #> {xml_document} #> <eml packageId="edi.100.1" system="https://pasta.edirepository.org" ... #> [1] <access authSystem="https://pasta.edirepository.org/authenticatio ... #> [2] <dataset>\n <alternateIdentifier system="https://doi.org">doi:10 ... ## End(Not run)
Read metadata checksum
read_metadata_checksum(packageId, env = "production")
read_metadata_checksum(packageId, env = "production")
packageId |
(character) Data package identifier |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(character) A 40 character SHA-1 checksum value
Other Accessing:
read_data_entity_checksum()
,
read_data_entity_names()
,
read_data_entity_name()
,
read_data_entity_resource_metadata()
,
read_data_entity_sizes()
,
read_data_entity_size()
,
read_data_entity()
,
read_data_package_archive()
,
read_data_package_citation()
,
read_data_package_doi()
,
read_data_package_error()
,
read_data_package_from_doi()
,
read_data_package_report_checksum()
,
read_data_package_report_resource_metadata()
,
read_data_package_report_summary()
,
read_data_package_report()
,
read_data_package_resource_metadata()
,
read_data_package()
,
read_evaluate_report_summary()
,
read_evaluate_report()
,
read_metadata_dublin_core()
,
read_metadata_entity()
,
read_metadata_format()
,
read_metadata_resource_metadata()
,
read_metadata()
## Not run: # Read checksum checksum <- read_metadata_checksum("knb-lter-ntl.409.1") checksum #> [1] "c89d0ac740f65ef599c6a90619221441e20b8b6e" ## End(Not run)
## Not run: # Read checksum checksum <- read_metadata_checksum("knb-lter-ntl.409.1") checksum #> [1] "c89d0ac740f65ef599c6a90619221441e20b8b6e" ## End(Not run)
Read metadata Dublin Core
read_metadata_dublin_core(packageId, env = "production")
read_metadata_dublin_core(packageId, env = "production")
packageId |
(character) Data package identifier |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(xml_document) Dublin Core metadata.
See the xml2 library for more on working with XML.
Other Accessing:
read_data_entity_checksum()
,
read_data_entity_names()
,
read_data_entity_name()
,
read_data_entity_resource_metadata()
,
read_data_entity_sizes()
,
read_data_entity_size()
,
read_data_entity()
,
read_data_package_archive()
,
read_data_package_citation()
,
read_data_package_doi()
,
read_data_package_error()
,
read_data_package_from_doi()
,
read_data_package_report_checksum()
,
read_data_package_report_resource_metadata()
,
read_data_package_report_summary()
,
read_data_package_report()
,
read_data_package_resource_metadata()
,
read_data_package()
,
read_evaluate_report_summary()
,
read_evaluate_report()
,
read_metadata_checksum()
,
read_metadata_entity()
,
read_metadata_format()
,
read_metadata_resource_metadata()
,
read_metadata()
## Not run: # Read dc metadata dc <- read_metadata_dublin_core("knb-lter-nes.10.1") dc #> {xml_document} #> <dc schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http: ... #> [1] <dc:type/> #> [2] <dc:identifier/> ## End(Not run)
## Not run: # Read dc metadata dc <- read_metadata_dublin_core("knb-lter-nes.10.1") dc #> {xml_document} #> <dc schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http: ... #> [1] <dc:type/> #> [2] <dc:identifier/> ## End(Not run)
Read data entity metadata
read_metadata_entity(packageId, entityId, env = "production")
read_metadata_entity(packageId, entityId, env = "production")
packageId |
(character) Data package identifier |
entityId |
(character) Data entity identifier |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(xml_nodeset) The metadata of entityId
in packageId
Other Accessing:
read_data_entity_checksum()
,
read_data_entity_names()
,
read_data_entity_name()
,
read_data_entity_resource_metadata()
,
read_data_entity_sizes()
,
read_data_entity_size()
,
read_data_entity()
,
read_data_package_archive()
,
read_data_package_citation()
,
read_data_package_doi()
,
read_data_package_error()
,
read_data_package_from_doi()
,
read_data_package_report_checksum()
,
read_data_package_report_resource_metadata()
,
read_data_package_report_summary()
,
read_data_package_report()
,
read_data_package_resource_metadata()
,
read_data_package()
,
read_evaluate_report_summary()
,
read_evaluate_report()
,
read_metadata_checksum()
,
read_metadata_dublin_core()
,
read_metadata_format()
,
read_metadata_resource_metadata()
,
read_metadata()
## Not run: # Read entity names and IDs packageId <- "knb-lter-cap.691.2" entities <- read_data_entity_names(packageId) entities #> entityId #> 1 f6e4efd0b04aea3860724824ca05c5dd #> 2 d2263480e75cc7888b41928602cda4c6 #> 3 d5cb83e4556408e48f636157e4dee49e #> entityName #> 1 691_arthropods_00742cd00ab0d3d02337e28d1c919654.csv #> 2 691_captures_e5f57a98ae0b7941b10d4a600645495a.csv #> 3 691_sampling_events_e8d76d7e76385e4ae84bcafb754d0093.csv # Read metadata of the first entity meta <- read_metadata_entity(packageId, entityId = entities$entityId[1]) meta #> {xml_nodeset (1)} #> [1] <dataTable id="691_arthropods_00742cd00ab0d3d02337e28d1c919654.cs ... ## End(Not run)
## Not run: # Read entity names and IDs packageId <- "knb-lter-cap.691.2" entities <- read_data_entity_names(packageId) entities #> entityId #> 1 f6e4efd0b04aea3860724824ca05c5dd #> 2 d2263480e75cc7888b41928602cda4c6 #> 3 d5cb83e4556408e48f636157e4dee49e #> entityName #> 1 691_arthropods_00742cd00ab0d3d02337e28d1c919654.csv #> 2 691_captures_e5f57a98ae0b7941b10d4a600645495a.csv #> 3 691_sampling_events_e8d76d7e76385e4ae84bcafb754d0093.csv # Read metadata of the first entity meta <- read_metadata_entity(packageId, entityId = entities$entityId[1]) meta #> {xml_nodeset (1)} #> [1] <dataTable id="691_arthropods_00742cd00ab0d3d02337e28d1c919654.cs ... ## End(Not run)
Read metadata format
read_metadata_format(packageId, env = "production")
read_metadata_format(packageId, env = "production")
packageId |
(character) Data package identifier |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(character) Metadata format type
Other Accessing:
read_data_entity_checksum()
,
read_data_entity_names()
,
read_data_entity_name()
,
read_data_entity_resource_metadata()
,
read_data_entity_sizes()
,
read_data_entity_size()
,
read_data_entity()
,
read_data_package_archive()
,
read_data_package_citation()
,
read_data_package_doi()
,
read_data_package_error()
,
read_data_package_from_doi()
,
read_data_package_report_checksum()
,
read_data_package_report_resource_metadata()
,
read_data_package_report_summary()
,
read_data_package_report()
,
read_data_package_resource_metadata()
,
read_data_package()
,
read_evaluate_report_summary()
,
read_evaluate_report()
,
read_metadata_checksum()
,
read_metadata_dublin_core()
,
read_metadata_entity()
,
read_metadata_resource_metadata()
,
read_metadata()
## Not run: # Read format metadataFormat <- read_metadata_format("knb-lter-nwt.930.1") metadataFormat #> [1] "eml://ecoinformatics.org/eml-2.1.1" ## End(Not run)
## Not run: # Read format metadataFormat <- read_metadata_format("knb-lter-nwt.930.1") metadataFormat #> [1] "eml://ecoinformatics.org/eml-2.1.1" ## End(Not run)
Read metadata resource metadata
read_metadata_resource_metadata( packageId, as = "data.frame", env = "production" )
read_metadata_resource_metadata( packageId, as = "data.frame", env = "production" )
packageId |
(character) Data package identifier |
as |
(character) Format of the returned object. Can be: "data.frame" or "xml". |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
(data.frame or xml_document) Resource metadata for the data package metadata resource
Other Accessing:
read_data_entity_checksum()
,
read_data_entity_names()
,
read_data_entity_name()
,
read_data_entity_resource_metadata()
,
read_data_entity_sizes()
,
read_data_entity_size()
,
read_data_entity()
,
read_data_package_archive()
,
read_data_package_citation()
,
read_data_package_doi()
,
read_data_package_error()
,
read_data_package_from_doi()
,
read_data_package_report_checksum()
,
read_data_package_report_resource_metadata()
,
read_data_package_report_summary()
,
read_data_package_report()
,
read_data_package_resource_metadata()
,
read_data_package()
,
read_evaluate_report_summary()
,
read_evaluate_report()
,
read_metadata_checksum()
,
read_metadata_dublin_core()
,
read_metadata_entity()
,
read_metadata_format()
,
read_metadata()
## Not run: # Read resource metadata resourceMetadata <- read_metadata_resource_metadata( packageId = "knb-lter-pal.309.1" ) ## End(Not run)
## Not run: # Read resource metadata resourceMetadata <- read_metadata_resource_metadata( packageId = "knb-lter-pal.309.1" ) ## End(Not run)
Searches data packages in the EDI data repository using the specified Solr query.
search_data_packages(query, as = "data.frame", env = "production")
search_data_packages(query, as = "data.frame", env = "production")
query |
(character) Query (see details below) |
as |
(character) Format of the returned object. Can be: "data.frame" or "xml". |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
Documents in the EDI data repository Solr index can be discovered based on metadata values stored in the following list of searchable fields (not all EML content is queryable):
Single-value fields:
abstract
begindate - In ISO format (YYYY-MM-DDThh:mm:ss)
doi
enddate - In ISO format (YYYY-MM-DDThh:mm:ss)
funding
geographicdescription
id
methods
packageid - Data Id in "scope.identifier.revision" format
pubdate - In ISO format (YYYY-MM-DDThh:mm:ss)
responsibleParties
scope
singledate
site
taxonomic
title
Multi-value fields:
author
coordinates - Use "IsWithin(West+East+North+South)"
where each
cardinal direction is in decimal degrees with South of the equator as
negative and East of the prime meridian positive.
keyword
organization
projectTitle
relatedProjectTitle
timescale
query
parser: The optimal query parser (defType=edismax) is added to
every query.
See Apache Solr Wiki for how to construct a Solr query.
(data.frame or xml_document) Search results containing the fields:
abstract
begindate
doi
enddate
funding
geographicdescription
id
methods
packageid
pubdate
responsibleParties
scope
site
taxonomic
title
authors
spatialCoverage
sources
keywords
organizations
singledates
timescales
Only the newest version of data packages are searchable, older versions are not.
When constructing a query note that the 15403 data packages of the
ecotrends project and
10492 data packages of the
LTER Landsat
project, can be excluded from the returned results by including
&fq=-scope:(ecotrends+lter-landsat)
in the query string.
## Not run: # Search for data packages containing the term "air temperature" res <- search_data_packages(query = 'q="air+temperature"&fl=*') # Search for data packages containing the term "air temperature" and # returning only the packageid, title, and score of each match res <- search_data_packages(query = 'q="air+temperature"&fl=packageid,title,score') # Search for data packages containing the term "air temperature", returning # only the packageid, title, score, and excluding ecotrends and lter-landsat # scopes from the returned results query <- paste0('q="air+temperature"&fl=packageid,title,score&', 'fq=-scope:(ecotrends+lter-landsat)') res <- search_data_packages(query) ## End(Not run)
## Not run: # Search for data packages containing the term "air temperature" res <- search_data_packages(query = 'q="air+temperature"&fl=*') # Search for data packages containing the term "air temperature" and # returning only the packageid, title, and score of each match res <- search_data_packages(query = 'q="air+temperature"&fl=packageid,title,score') # Search for data packages containing the term "air temperature", returning # only the packageid, title, score, and excluding ecotrends and lter-landsat # scopes from the returned results query <- paste0('q="air+temperature"&fl=packageid,title,score&', 'fq=-scope:(ecotrends+lter-landsat)') res <- search_data_packages(query) ## End(Not run)
Update data package
update_data_package(eml, useChecksum = FALSE, env = "production")
update_data_package(eml, useChecksum = FALSE, env = "production")
eml |
(character) Full path to an EML file describing the data package to be updated |
useChecksum |
(logical) Use data entities from a previous version of the data package? See details below. |
env |
(character) Repository environment. Can be: "production", "staging", or "development". |
Each data entity described in eml
must be accompanied by a
web accessible URL at the XPath ".//physical/distribution/online/url". The
EDI data repository uses these links to download the data entities. The URLs
must be static and not have any redirects otherwise the data entities will
not be downloadable.
transaction (character) Transaction identifier. May be used in a
subsequent call to check_status_update()
to determine the operation
status
User authentication is required (see login()
)
Other Evaluation and Upload:
check_status_create()
,
check_status_evaluate()
,
check_status_update()
,
create_data_package()
,
evaluate_data_package()
## Not run: login() # Update data package transaction <- update_data_package( eml = paste0(tempdir(), "/edi.595.2.xml"), env = "staging" ) transaction #> [1] "update_edi.595_163966788658131920__edi.595.2" # Check update status status <- check_status_update( transaction = transaction, env = "staging" ) status #> [1] TRUE logout() ## End(Not run)
## Not run: login() # Update data package transaction <- update_data_package( eml = paste0(tempdir(), "/edi.595.2.xml"), env = "staging" ) transaction #> [1] "update_edi.595_163966788658131920__edi.595.2" # Check update status status <- check_status_update( transaction = transaction, env = "staging" ) status #> [1] TRUE logout() ## End(Not run)