The R dataviz world
www.milanor.net
20 Nov 2017 - Mariachiara Fortuna - 9th MilanoR meeting
plotly
flexdashboard
ggmap
shinydashboard
r2d3
A first version of R is released under GNU licence
ggplot2 is released
by Hadley Wickham
RStudio fundation
htmlwidget
Shiny is released by RStudio
Lattice
leaflet
2001
2008
1995
2005
2012
2015
2014
2016
2011
2017
- R base: graphics, lattice
- ggplot2
R's base graphics are implemented in the same way as in the S3 system developed by Becker, Chambers, and Wilks. There is a static device, which is treated as a static canvas and objects are drawn on the device through R plotting commands. The device has a set of global parameters such as margins and layouts which can be manipulated by the user using par() commands. The R graphics engine does not maintain a user visible graphics list, and there is no system of double buffering, so objects cannot be easily edited without redrawing a whole plot.
CRAN Task View: Graphic Displays
http://www.cookbook-r.com/
- Based on ggplot:
ggmap
- Based on leaflet js library: leaflet
Spatial visualization with ggplot2
Static output
Leaflet is one of the most popular open-source JavaScript libraries for interactive maps.
The leaflet R package makes it easy to integrate and control Leaflet maps in R.
Features
https://rstudio.github.io/leaflet/
Interactive plots use JavaScript visualization libraries through R
Allow the creation of widgets that can be embed in R Markdown documents and Shiny web applications
Plotly allows to easily translate ggplot2 graphics to interactive web-based version, and provides bindings to the plotly.js graphing library.
https://plot.ly/r/
The htmlwidgets package provides a framework for easily creating R bindings to JavaScript libraries.
Widgets created using the framework can be:
http://www.htmlwidgets.org/
By following a small set of conventions, it is possible to create HTML widgets with very little code. All widgets include:
Interactivity does not necessarily require a server behind it running code. Interactivity can be provided using embedded JavaScript, which would execute at the client-side (like plotly, highcharts, leaflet etc).
If whatever interactivity is required can be offered by an existing package (that uses htmlwidgets), then you can just use flexdashboard and you don't need to deploy it to any Shiny server. Otherwise, you do need to deploy to a Shiny server and you should use either Shiny, or shinydashboard
Shiny is an R package that builds interactive web apps straight from R.
Shiny needs a server behind it to execute R code on user input. Can implement any layout. Can run interactive code either by processing serverside (in R) or clientside (in embedded JavaScript).
http://shiny.rstudio.com/
Business-like dashboards
flexdashboard uses R Markdown to publish a group of related data visualizations as a dashboard.
It produces standard HTML documents that can be deployed on any web server or even attached to an email message.
It is possible to add Shiny components for additional interactivity and then deploy on Shiny Server or shinyapps.io.
https://www.r-graph-gallery.com/
http://viz.wtf/
http://www.htmlwidgets.org/
https://plot.ly/r/
https://github.com/ramnathv/htmlwidgets
http://civilstat.com/2012/10/basics-of-javascript-and-d3-for-r-users/
http://blog.revolutionanalytics.com/2015/05/a-first-look-at-htmlwidgets.html
https://github.com/hadley/r2d3
http://blog.revolutionanalytics.com/2014/09/how-to-publish-r-and-ggplot2-to-the-web.html
http://ramnathv.github.io/swc-nw-dataviz/visualize/base_graphics.html
http://ggplot2.org/
http://www.cookbook-r.com/Graphs/
http://ggplot2.tidyverse.org/reference/
http://shiny.rstudio.com/
https://rstudio.github.io/shinydashboard/index.html
https://blog.rstudio.com/2016/05/17/flexdashboard-easy-interactive-dashboards-for-r/
http://shiny.rstudio.com/articles/selecting-rows-of-data.html
https://stackoverflow.com/questions/37992147/r-shiny-which-hammer-straight-shiny-flexdashboard-or-shinydashboard
http://rstudio.github.io/shiny/tutorial/
http://stat405.had.co.nz/ggmap.pdf
https://www.nceas.ucsb.edu/~frazier/RSpatialGuides/ggmap/ggmapCheatsheet.pdf
https://rstudio.github.io/leaflet/
https://www.analytics-link.com/single-post/2017/08/14/SPOTLIGHT-The-Hadley-Wickham
https://rviews.rstudio.com/2017/01/04/interview-with-joe-cheng/