rOpenSci | Blog

All posts (Page 127 of 131)

A task view for interacting with the web from R

There is an increasing set of R packages for interacting with the web from R, whether it be the low level tools to interact with the web via http (see RCurl and httr), parsing data from the web (like RJSONIO and XML), or wrappers to web APIs that provide data (like twitteR).

Most of you probably know about CRAN Task Views that aggregate information about R packages and functions on a particular subject area into a simple web page. There isn’t one for interacting with the web, so we have started drafting one on Github, and it is below.

...

Use cases as an interface to tool discovery

Good discovery tools for sotware are important as they can facilitate the pace of software development, bugs are found and squashed and new features added more quickly, and users find software they need faster. We have a page on our website for our packages that provides an overview of the packages we have, with descriptions and links.

Two other ways to discover things include

  • A gallery of examples, or use cases, in which the entry point is something someone would want to do. This is opposed to a list of software packages in which the entry point is a description of what the package does. Examples include the Rcpp gallery, R graph gallery, and the iPython Notebook Viewer gallery.
  • Images: Scrolling through images is a fast way to select an item of interest.

We just rolled out a new page for user stories, or use cases, organized in an gallery of thumbnail images with a brief description, which goes to another page with a brief script and output. Check it out. On this page we are gathering brief examples of tasks scientists can carry out in R. So far these include:

...

Working with climate data from the web in R

I recently attended ScienceOnline Climate, a conference in Washington, D.C. at AAAS. You may have heard of the ScienceOnline annual meeting in North Carolina - this was one of their topical meetings focused on Climate Change. I moderated a session on working with data from the web in R, focusing on climate data. Search Twitter for #scioClimate for tweets from the conference, and #sciordata for tweets from the session I ran. The following is an abbreviated demo of what I did in the workshop showing some of what you can do with climate data in R using our packages....

NOAA climate sparklines

We have started a new R package interacting with NOAA climate data called rnoaa. You can find our package in development here and documentation for NOAA web services here. It is still early days for this package, but we wanted to demo what you can do with the package.

In this example, we search for stations that collect climate data, then get the data for those stations, pull out only the precipitation data, then get latitude/longitude coordinates for each station, and plot data on a map.

...

Consuming article-level metrics

We recently had a paper come out in a special issue on article-level metrics in the journal Information Standards Quarterly. Our paper basically compared article-level metrics provided by different aggregators. The other papers covered various article-level metrics topics from folks at PLOS, Mendeley, and more. Get our paper.

To get data from the article-level metrics providers we used one R package we created to get DOIs for PLOS articles (rplos) and three R packages we created to get metrics: alm, rImpactStory, and rAltmetric. Here, we will show how we produced visualizations in the paper. The code here is basically that used in the paper - but modified to make it useable by you hopefully.

...

Working together to push science forward

Happy rOpenSci users can be found at