Ask Your Question

How do I query and access data using the DataONE R client?

asked 2013-05-08 18:13:41 -0500

chamberlain gravatar image

updated 2013-05-08 18:21:07 -0500

I am trying to play around with the dataone R package. Is it possible for me to get whatever keys/etc. are needed to at least search D1 metadata through the package? It's not clear how to get the proper permissions...

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-05-08 18:20:41 -0500

Technically you don't need a certificate, at least to use the client read-only to search and download publicly accessible data. Here's a simple R script showing a query that finds a metadata record and an associated data file, and then downloads the data and converts that to a data frame.

cli <- D1Client()
results <- d1SolrQuery(cli, list(q="Commercial Harvest",fl="identifier,title,author,documents"))
# Note the identifiers of the data are listed in the 'documents' element for each metadata record
d1object <- getD1Object(cli, "doi:10.5063/AA/mbauer.56.1")
mydf <- asDataFrame(d1object)

You will see a bunch of WARNings about not having a certificate -- we should probably turn down the volume there as its annoying. If you do want to log in to write data to a Member Node, you can do so by logging into CILogon at this URL and downloading your certificate, which will be good for 18 hours:

You can log in with an institutional account if your university is part of InCommon, or you can use a Google account or ProtectNetwork account if not. That should put a certificate in the /tmp dir (or equivalent on your OS) which the R client should notice and use. See also:

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools


Asked: 2013-05-08 18:13:41 -0500

Seen: 235 times

Last updated: May 08 '13