DataONEorg / rdataone

R package for reading and writing data at DataONE data repositories
http://doi.org/10.5063/F1M61H5X
36 stars 19 forks source link

Feature idea: Integrate rdataone w/ RStudio Connections #244

Open amoeba opened 4 years ago

amoeba commented 4 years ago

@cboettig got me thinking about this so I figure I'd write it up for others to see too.

RStudio Connections are a nicely-integrated way for RStudio to connect R code to files, databases, etc. While you can still connect to any of these things with R code in a script, I think the Connections pane is a friendly way of helping a user manage such things.

It seems to me that we could connect DataONE and DataONE Data Packages to RStudio with this interface.

A user could register a Data Package as a connection and connect to it from a new session:

connection_connect

connection_new

And a user's session connected to a package:

connection_show

One feature of Connections that we probably would like here is that Connections automatically generate the necessary R code to connect to the source and will put it in your R script or RMarkdown automatically so the process of connecting to the Connection is scripted/documented.

I also think this is nice because it abstracts away the less interesting part of getting stuff from DataONE. A user can go from identifier to data.frame in as few steps as possible. They don't need to figure out where to store things if they don't want to because the files are stored on DataONE anyway so they can be retrieved again if lost.

PS: We might also be interested in the direction RStudio is going with [Pins][(https://github.com/rstudio/pins).

gothub commented 4 years ago

@amoeba hey this looks great!