RStudio has a new product called Shiny that, quoting from their website, “makes it super simple for R users like you to turn analyses into interactive web applications that anyone can use”. See here for more information.
A Shiny basically consists of two files: a ui.r file and a server.r file. The ui.r file, as it says, provides the user interface, and the server.r file provides the the server logic.
Below is what it looks like in the wild (on a browser).
We tried to build in making real time API calls to GBIF’s servers, but the calls took too long for web speed. So we prepare the data first, and then serve it up from saved data in a .rda file. Let’s first prepare the data. –Well, this is what we do on the app itself, but see the next code block for
Here’s the server logic
The user interface
This should be all you need. To actually serve up the app in the web, request to be part of their beta-test of Shiny server on the web here.
Go play with our Shiny app here to see the kind of visualization you can do with the rgbif package.