Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Access to the Dataverse Network APIs from R

NotificationsYou must be signed in to change notification settings

guhjy/dvn

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

R Access to the Dataverse Network

Project Status: Active – The project has reached a stable, usable state and is being actively developed.CRAN/GitHub 0.3.5_/_0.3.5

Many dataverse servers now use Dataverse version 4.0 or greater. A separate package,dataverse, is being developed to work with these newer installations.

Thedvn package for R integrates public data sharing into the reproducible research workflow. As such,dvn provides access to both the Data Sharing API and the Data Deposit API for theDataverse Network online data repository system. The Data Sharing API enables searches of any public dataverse, returning study and file metadata. Limited support is also provided for data download, when terms of use allow direct download of public data.

The Data Deposit API allows users to directly create and modify dataverse listings (studies, metadata, and files), thereby integrating data archiving directly into the R workflow with just a few simple functions. The Data Deposit API is built on theSWORD protocol, though not all features are fully supported by the API.

dvn defaults to providing access to theHarvard Dataverse Network, but this can be changed in each function call or globally usingoptions(dvn = 'https://thedata.harvard.edu/dvn/') for any validDataverse Network.

Users interested in downloading metadata from archives other than Dataverse may be interested in Kurt Hornik'sOAIHarvester, which offers metadata download from any web repository that is compliant with theOpen Archives Initiative standards. Additionally,rdryad uses OAIHarvester to interface withDryad. Therfigshare package works in a similar spirit todvn withhttp://figshare.com/.

Package status and installation

AppVeyor Build StatusTravis-CI Build Statuscodecovrstudio mirror downloads

Installation instructions

Stable Version

install.packages("dvn")

Development Version

# install.packages("devtools")devtools::install_github("ropensci/dvn")

Usage

Functions for the Data Sharing API

Metadata Search Functions

  • dvSearch, to search public dataverses
    • dvSearchFields, to provide the searchable fields for use indvSearch
  • dvMetadata, to retrieve the metadata for a study
    • dvMetadataFormats, to retrieve available metadataformats for a study
    • dvExtractFileIds, to extract available files from thedvMetadata response
    • UsingdvTermsOfUse(dvMetadata(objectId)) displays Terms Of Use as HTML for the study

File Access Functions

  • dvDownloadInfo, to retrieve information about a study file
  • dvDownload, to download a study file (if allowed)

Functions for the Data Deposit API

The core workflow for the Data Deposit API involves creating a study listing usingdvCreateStudy, adding one or more files withdvAddFile, and then making the study public withdvReleaseStudy. Use of all Data Deposit API functions requires a valid username and password for the selected Dataverse Network, which can be set in each function call or globally usingoptions(dvn.user = 'username', dvn.pwd = 'password').

  • dvCreateStudy, to create a study listing using metadata (i.e., cataloging information)
    • UsedvBuildMetadata to create metadata for use indvCreateStudy ordvEditStudy
    • UsedvEditStudy to overwrite a study's metadata
  • dvAddFile, to add file(s) or active R dataframes to a study
  • dvReleaseStudy, to publicly release a study

Here is simple code to enact that workflow:

options(dvn.user = 'username', dvn.pwd = 'password')doc <- dvServiceDoc()meta <- dvBuildMetadata(title="My Study", creator="Doe, John")study <- dvCreateStudy(doc, meta)dvAddFile(study, filename)dvReleaseStudy(study)

The following functions allow users to view and modify existing studies:

  • dvDeleteFile, to delete a file from a study
  • dvDeleteStudy, to deaccession a released study, or delete an unreleased study
  • dvUserStudies, to list studies in a named dataverse
  • dvStudyStatement, to access a summary of a study (including citation and stable URI)
  • dvServiceDoc, to identify the dataverse(s) accessible to a user (This is not particularly relevant to users with access to only one dataverse)
  • dvStudyAtom, to view study-level URIs for using the Data Deposit API (This is not important for most users, unless they plan to calldvDepositQuery directly)

Citation

Get citation information fordvn in R by running:citation(package = 'dvn')

Code of Conduct

Please note that this project is released with aContributor Code of Conduct.By participating in this project you agree to abide by its terms.

ropensci_footer

About

Access to the Dataverse Network APIs from R

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • R100.0%

[8]ページ先頭

©2009-2025 Movatter.jp