rdataone
R package for reading and writing data at DataONE data repositories.
https://github.com/dataoneorg/rdataone
Category: Sustainable Development
Sub Category: Data Catalogs and Interfaces
Keywords from Contributors
ecology eml doi semantic-annotations science-metadata metadata-editor metacat knb ecoinformatics dataone
Last synced: about 17 hours ago
JSON representation
Repository metadata
R package for reading and writing data at DataONE data repositories
- Host: GitHub
- URL: https://github.com/dataoneorg/rdataone
- Owner: DataONEorg
- Created: 2013-11-15T17:27:47.000Z (over 11 years ago)
- Default Branch: main
- Last Pushed: 2022-06-10T21:15:56.000Z (almost 3 years ago)
- Last Synced: 2024-10-29T22:32:11.638Z (6 months ago)
- Language: R
- Homepage: http://doi.org/10.5063/F1M61H5X
- Size: 19.2 MB
- Stars: 36
- Watchers: 22
- Forks: 19
- Open Issues: 70
- Releases: 0
-
Metadata Files:
- Readme: README.md
README.md
dataone: R interface to the DataONE network of data repositories
- Authors: Matthew B. Jones (NCEAS), Peter Slaughter, Rob Nahf, Carl Boettiger, Chris Jones, Jordan Read, Lauren Walker, Edmund Hart, Scott Chamberlain
- doi:10.5063/F1M61H5X
- License: Apache 2
- Package source code on Github
- Submit Bugs and feature requests
Provides read and write access to data and metadata from the DataONE network
of data repositories, including the
KNB Data Repository, Dryad,
and the NSF Arctic Data Center.
Each DataONE repository implements a consistent repository application
programming interface. Users call methods in R to access these remote
repository functions, such as methods to query the metadata catalog, get
access to metadata for particular data packages, and read the data objects
from the data repository using the global identifier for each data object.
Users can also insert and update data objects on repositories that support
these methods. For more details, see the vignettes.
Installation Notes
Version 2.0 of the dataone R package removes the dependency on rJava and significantly changes the base
API to correspond to the published DataONE API. Previous methods for accessing DataONE will be maintained, but new methods have been added.
The dataone R package requires the R package redland. If you are installing on Ubuntu then the Redland C libraries
must be installed first. If you are installing on Mac OS X or Windows then installing these libraries is not required.
Installing on Mac OS X
On Mac OS X dataone can be installed with the following commands:
install.packages("dataone")
library(dataone)
The dataone R package should be available for use at this point.
Installing on Ubuntu
For ubuntu, install the required Redland C libraries by entering the following commands
in a terminal window:
sudo apt-get update
sudo apt-get install librdf0 librdf0-dev
Then install the R packages from the R console:
install.packages("dataone")
library(dataone)
The dataone R package should be available for use at this point
Installing on Windows
For windows, the required redland R package is distributed as a binary release, so it is not
necessary to install any additional system libraries.
To install the dataone R packages from the R console:
install.packages("dataone")
library(dataone)
The dataone R package should be available for use at this point.
Quick Start
See the full manual (help(dataone)
) for documentation.
To search the DataONE Federation Member Node Knowledge Network for Biocomplexity (KNB) for a dataset:
library(dataone)
cn <- CNode("PROD")
mn <- getMNode(cn, "urn:node:KNB")
mySearchTerms <- list(q="abstract:salmon+AND+keywords:spawn+AND+keywords:chinook",
fl="id,title,dateUploaded,abstract,size",
fq="dateUploaded:[2017-06-01T00:00:00.000Z TO 2017-07-01T00:00:00.000Z]",
sort="dateUploaded+desc")
result <- query(mn, solrQuery=mySearchTerms, as="data.frame")
result[1,c("id", "title")]
id <- result[1,'id']
The metadata file that describes the located research can be downloaded and viewed in an XML viewer, text
editor after being written to disk, or in R via the commands below:
library(XML)
metadata <- rawToChar(getObject(mn, id))
doc <- xmlRoot(xmlTreeParse(metadata, asText=TRUE, trim = TRUE, ignoreBlanks = TRUE))
tf <- tempfile()
saveXML(doc, tf)
file.show(tf)
This metadata file describes a data file (CSV) in this data collection (package) that can be obtained using
the listed identifier, using the commands:
dataRaw <- getObject(mn, "urn:uuid:49d7a4bc-e4c9-4609-b9a7-9033faf575e0")
dataChar <- rawToChar(dataRaw)
theData <- textConnection(dataChar)
df <- read.csv(theData, stringsAsFactors=FALSE)
df[1,]
Uploading a CSV file to a DataONE Member Node requires user authentication. DataONE user
authentication is described in the vignette dataone-federation
.
Once the authentication steps have been followed, uploading is done with:
library(datapack)
library(uuid)
d1c <- D1Client("STAGING", "urn:node:mnStageUCSB2")
id <- paste("urn:uuid:", UUIDgenerate(), sep="")
testdf <- data.frame(x=1:10,y=11:20)
csvfile <- paste(tempfile(), ".csv", sep="")
write.csv(testdf, csvfile, row.names=FALSE)
# Build a DataObject containing the csv, and upload it to the Member Node
d1Object <- new("DataObject", id, format="text/csv", filename=csvfile)
uploadDataObject(d1c, d1Object, public=TRUE)
In addition, a collection of science metadata and data can be downloaded with one
command, for example:
d1c <- D1Client("PROD", "urn:node:KNB")
pkg <- getDataPackage(d1c, id="urn:uuid:04cd34fd-25d4-447f-ab6e-73a572c5d383", quiet=FALSE)
See the R vignette dataone R Package for
more information.
Acknowledgments
Work on this package was supported by:
- NSF-ABI grant #1262458 to C. Gries, M. B. Jones, and S. Collins.
- NSF-DATANET grants #0830944 and #1430508 to W. Michener, M. B. Jones, D. Vieglais, S. Allard and P. Cruse
- NSF DIBBS grant #1443062 to T. Habermann and M. B. Jones
- NSF-PLR grant #1546024 to M. B. Jones, S. Baker-Yeboah, J. Dozier, M. Schildhauer, and A. Budden
- NSF-PLR grant #2042102 to M. B. Jones, A. Budden, J. Dozier, and M. Schildhauer
Additional support was provided for working group collaboration by the National Center for Ecological Analysis and Synthesis, a Center funded by the University of California, Santa Barbara, and the State of California.
Owner metadata
- Name: DataONE
- Login: DataONEorg
- Email: [email protected]
- Kind: organization
- Description:
- Website: https://dataone.org
- Location: United States of America
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/5865133?v=4
- Repositories: 116
- Last ynced at: 2023-08-04T20:20:50.123Z
- Profile URL: https://github.com/DataONEorg
GitHub Events
Total
Last Year
Committers metadata
Last synced: 7 days ago
Total Commits: 1,121
Total Committers: 31
Avg Commits per committer: 36.161
Development Distribution Score (DDS): 0.679
Commits in past year: 0
Committers in past year: 0
Avg Commits per committer in past year: 0.0
Development Distribution Score (DDS) in past year: 0.0
Name | Commits | |
---|---|---|
gothub | s****r@n****u | 360 |
Matt Jones | g****e@m****g | 293 |
sbpcs59 | s****u | 88 |
Rob Nahf | r****f@e****u | 73 |
Peter Slaughter | s****r@a****u | 64 |
Peter Slaughter | s****r@d****u | 39 |
Andy Pippin | p****n@n****u | 34 |
Jeanette | j****k@n****u | 34 |
Peter Slaughter | s****r@P****n | 29 |
Carl Boettiger | c****g@g****m | 17 |
Chris Jones | c****j@c****o | 16 |
Jordan S Read | j****d@u****v | 11 |
maier-m | m****r@u****u | 8 |
Bryce Mecum | p****h@g****m | 8 |
Peter Slaughter | s****r@P****l | 7 |
Peter Slaughter | s****r@d****u | 6 |
Peter Slaughter | s****r@d****u | 6 |
Lauren | w****r@n****u | 5 |
Jasmine | j****i@n****u | 3 |
Irene | 2****s | 3 |
Scott Chamberlain | m****s@g****m | 3 |
Ted Hart | e****t@g****m | 3 |
Hilmar Lapp | h****p@d****t | 2 |
Peter Slaughter | s****r@d****u | 2 |
vieglais | v****s@k****u | 1 |
Karthik Ram | k****m@g****m | 1 |
nahf | n****f | 1 |
leinfelder | l****r@n****u | 1 |
jsta | j****k@u****u | 1 |
Yvan Le Bras | y****s@m****r | 1 |
and 1 more... |
Committer domains:
- nceas.ucsb.edu: 6
- mnhn.fr: 1
- utexas.edu: 1
- ku.edu: 1
- dhcp215.nceas.ucsb.edu: 1
- drycafe.net: 1
- dhcp210.nceas.ucsb.edu: 1
- dhcp182.nceas.ucsb.edu: 1
- ucsb.edu: 1
- usgs.gov: 1
- christopherjones.co: 1
- peters-mbp.domain: 1
- dhcp244.nceas.ucsb.edu: 1
- avatar.nceas.ucsb.edu: 1
- epscor.unm.edu: 1
- magisa.org: 1
Issue and Pull Request metadata
Last synced: 1 day ago
Total issues: 95
Total pull requests: 8
Average time to close issues: 9 months
Average time to close pull requests: 16 days
Total issue authors: 17
Total pull request authors: 2
Average comments per issue: 2.06
Average comments per pull request: 1.13
Merged pull request: 5
Bot issues: 0
Bot pull requests: 0
Past year issues: 0
Past year pull requests: 0
Past year average time to close issues: N/A
Past year average time to close pull requests: N/A
Past year issue authors: 0
Past year pull request authors: 0
Past year average comments per issue: 0
Past year average comments per pull request: 0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- gothub (49)
- mbjones (13)
- amoeba (10)
- jeanetteclark (7)
- earnaud (3)
- sckott (2)
- williamgunn (1)
- cboettig (1)
- ranicrab (1)
- LiamBurke24 (1)
- taojing2002 (1)
- jpshanno (1)
- justinkadi (1)
- eblondel (1)
- ThomasThelen (1)
Top Pull Request Authors
- jeanetteclark (7)
- laijasmine (1)
Top Issue Labels
- enhancement (20)
- bug (16)
- task (10)
- help wanted (2)
- Epic (2)
- testing (2)
- documentation (1)
- question (1)
Top Pull Request Labels
Package metadata
- Total packages: 1
-
Total downloads:
- cran: 537 last-month
- Total docker downloads: 194,293
- Total dependent packages: 2
- Total dependent repositories: 31
- Total versions: 10
- Total maintainers: 1
cran.r-project.org: dataone
R Interface to the DataONE REST API
- Homepage: https://github.com/DataONEorg/rdataone
- Documentation: http://cran.r-project.org/web/packages/dataone/dataone.pdf
- Licenses: Apache License 2.0
- Latest release: 2.2.2 (published almost 3 years ago)
- Last Synced: 2025-04-25T14:04:37.198Z (1 day ago)
- Versions: 10
- Dependent Packages: 2
- Dependent Repositories: 31
- Downloads: 537 Last month
- Docker Downloads: 194,293
-
Rankings:
- Docker downloads count: 0.044%
- Forks count: 3.939%
- Dependent repos count: 4.838%
- Stargazers count: 8.777%
- Average: 9.154%
- Dependent packages count: 13.638%
- Downloads: 23.686%
- Maintainers (1)
Dependencies
- R >= 3.1.1 depends
- XML >= 3.95 imports
- base64enc * imports
- datapack >= 1.4.0 imports
- httr * imports
- jsonlite * imports
- methods * imports
- parsedate * imports
- plyr * imports
- stringi * imports
- stringr * imports
- uuid * imports
- digest * suggests
- knitr * suggests
- openssl >= 0.9.3 suggests
- rmarkdown * suggests
- testthat * suggests
- xml2 * suggests
Score: 20.277550167893722