Easyshiny is a package, that implements a shiny template for uploading and visualizing data. It tries to make the fill out process for this template as easy as possible. The goal is to make the difference between plotting data and showing it in a shiny app very small.
This package will most probably never be on CRAN. But it can be installed via github.
library(devtools)
install_github("mYstar/easyshiny")
The simple goal of a easyshiny app is to let the user upload a file (or a set of files) and calculate some visualizations (e.g. plots) from it. This can be achieved by:
library(shiny)
library(shinyBS)
library(easyshiny)
library(ggplot2)
es_init()
es_read('bike_buyers.csv')
es_renderPlot(
{
ggplot(bike_buyers(), aes(x=Commute.Distance, fill=Purchased.Bike)) +
geom_bar(position = 'fill')
}
)
es_start(title = 'Buying Bikes')
After starting the app, the user then needs to upload a file named bike_buyers.csv and a plot will be generated in the 'Results' tab.
To make the most of your visuals, you should see the documentation of these functions:
es_init()
-- for initializationes_read()
-- to register data sourceses_renderPlot()
-- to insert an plot into the app (there are functions for every shiny output type)es_add_input()
-- to insert and use dynamic shiny inputses_add_static()
-- to insert static shiny HTML elementses_start()
-- to start the appAfter running: devtools::build_vignettes('easyshiny')
there is also a vignette in vignette('example-app', package = 'easyshiny')
that shows how to use these functions.
For development the data and visualizations can also be generated locally (without starting a server). This is called console mode and the vignette vignette('console-mode', package = 'easyshiny')
shows how to use it, at the end.
If someone wants to contribute, has questions or finds a bug, just contact me at: eric.starke@htw-dresden.de. Pull requests and patches are very welcome.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.