metajam v0.2.3
Monthly downloads
Easily Download Data and Metadata from 'DataONE'
A set of tools to foster the development of reproducible analytical workflow by simplifying the download of data and
metadata from 'DataONE' (<https://www.dataone.org>) and easily importing this information into R.
Readme
metajam
Download and read data and metadata from repositories in the DataONE network.
Authors
Irene Steves, Mitchell Maier and Julien Brun; NCEAS
Installation
The metajam
package can be installed from GitHub using the devtools
package:
#install.packages("devtools")
devtools::install_github('NCEAS/metajam')
Download data
To download a data object, specify the data object URL and local download path in the download_d1_data
function:
library(metajam)
download_d1_data("https://arcticdata.io/metacat/d1/mn/v2/object/urn%3Auuid%3A9e123f84-ce0d-4094-b898-c9e73680eafa", path = ".")
The output is saved in a folder with the name {metadata_id}__{file_name}
, which contains the data file and its associated metadata. The metadata follows these conventions:
{file_name}__summary_metadata.csv
- summary metadata in a tabular format, which includes date downloaded, data file name, file/metadata URLs, etc.{file_name}__full_metadata.xml
- metadata xml file, if it could be downloaded{file_name}__attribute_metadata.csv
- attribute metadata in a tabular format, if included in the metadata xml{file_name}__attribute_factor_metadata.csv
- attribute factor metadata in a tabular format, if included in the metadata xml
How to get the URL to your dataset of interest ?
From DataONE or any currently supported data repository (KNB, Arctic Data Center, or EDI/LTER), you can right-click on the Download
button of a specific dataset and choose Copy Link Address
to copy the URL to your clipboard
Read data
The read_d1_files
function allows you to read the downloaded data and metadata directly into your R environment. Simply run the function with the folder path to the downloaded objects, and all data and metadata files will be returned as data frames stored in a list. Use {object_name}$data
to access the data, and {object_name}${metadata_type}_metadata
to access its associated metadata.
schools <- read_d1_files("./doi_10.18739_A2DP3X__Alaska_Schools_Rentention2009_15")
Quick Overview of metajam
- Recent presentation on
metajam
and its functionalities: Click here - Package website: https://nceas.github.io/metajam/
Acknowledgements
Work on this package was supported by:
- NSF-PLR grant #1546024 to M. B. Jones, S. Baker-Yeboah, J. Dozier, M. Schildhauer, and A. Budden
- Long Term Ecological Research (LTER) National Communications Office (LNCO), NSF grant #1545288 to F. Davis, M. Schildhauer, S. Rebich Hespanha, J. Caselle and C. Blanchette
Thanks also go to NCEAS computing team members Mark Schildhauer, Peter Slaughter, Dominic Muellen, Steven Chong, Jesse Goldstein and Matt Jones for their inputs on this package.
Functions in metajam
Name | Description | |
metajam | metajam package | |
download_d1_data_pkg | Download all data and metadata of a data package from DataONE | |
read_d1_files | Read data and metadata based on download_d1_data() file structure | |
tabularize_eml | Get tabular metadata | |
download_d1_data | Download data and metadata from DataONE | |
check_version | Check PID version | |
No Results! |
Vignettes of metajam
Name | ||
dataset-batch-processing.Rmd | ||
dataset-single.Rmd | ||
package-download.Rmd | ||
reading-raster.Rmd | ||
No Results! |
Last month downloads
Details
Type | Package |
Date | 2020-10-14 |
License | Apache License (== 2.0) |
URL | https://github.com/nceas/metajam |
BugReports | https://github.com/nceas/metajam/issues |
Encoding | UTF-8 |
VignetteBuilder | knitr |
RoxygenNote | 7.1.1 |
NeedsCompilation | no |
Packaged | 2020-10-24 15:06:06 UTC; brun |
Repository | CRAN |
Date/Publication | 2020-11-03 11:40:02 UTC |
imports | dataone , dplyr , EML , emld , lubridate , purrr , readr , rlang , stats , stringr , tibble , tidyr |
suggests | knitr , rmarkdown , testthat , udunits2 |
Contributors | Irene Steves, Mitchell Maier, Nathan Hwangbo, Derek Strong, Colin Smith, Kristen Peach |
Include our badge in your README
[](http://www.rdocumentation.org/packages/metajam)