R for Visual Analytics
This page provides links to useful R packages and references for data visualisation and visual analytics.
ggplot2
ggplot2 Core
Books
- Hadley Wickham, Danielle Navarro, and Thomas Lin Pedersen (2020)ggplot2: Elegant Graphics for Data Analysis (3rd Edition, online version).
- Kieran Healy (2019) Data Visualization: A practical introduction. This is the online version.
- Aravind Hebbali (2020) Data Visualization with ggplot2
- Winston Chang (2020) R Graphics Cookbook (2nd edition, online version)
- Rob Kabacoff (2020) Modern Data Visualization with R
- Zuguang Gu Circular Visualization in R. Last visit: 27/12/2020.
- Zach Bogart & Joyce Robbins (2020) Exploratory Data Analysis & Visualization
- BBC Visual and Data Journalism cookbook for R graphics
- Nordmann, E., McAleer, P., Toivo, W., Paterson, H. & DeBruine, L. Data visualisation using R, for researchers who don’t use R
Articles/Blog posts
- How to make any plot in ggplot2?
- The Complete ggplot2 Tutorial - Part1 | Introduction To ggplot2 (Full R code)
- The Complete ggplot2 Tutorial - Part 2 | How To Customize ggplot2 (Full R code)
- Top 50 ggplot2 Visualizations - The Master List (With Full R Code)
- ggplot2 Quickref
- Data visualization with ggplot2
- ggplot Wizardary
Webminers
ggplots Extension
- ggVis
- ggmap
- ggtern, an extension to ggplot2 specifically for the plotting of ternary diagrams.
- ggExtra, a collection of functions and layers to enhance ggplot2. The main function is ggMarginal, which can be used to add marginal histograms/boxplots/density plots to ggplot2 scatterplots.
- ggthemes, some extra themes, geoms, and scales for ‘ggplot2’. Provides ‘ggplot2’ themes and scales that replicate the look of plots by Edward Tufte, Stephen Few, ‘Fivethirtyeight’, ‘The Economist’, ‘Stata’, ‘Excel’, and ‘The Wall Street Journal’, among others. Provides ‘geoms’ for Tufte’s box plot and range frame.
- GGally extends ‘ggplot2’ by adding several functions to reduce the complexity of combining geometric objects with transformed data. Some of these functions include a pairwise plot matrix, a two group pairwise plot matrix, a parallel coordinates plot, a survival plot, and several functions to plot networks.
- sjPlot:Data Visualization for Statistics in Social Science
- ggstatsplot is an extension of ggplot2 package for creating graphics with details from statistical tests included in the plots themselves and targeted primarily at behavioral sciences community to provide a one-line code to produce information-rich plots.
- ggside allows the user to add graphical information about one of the main panel’s axis. This is particularly useful for metadata for discrete axis, or summary graphics on a continuous axis such as a boxplot or a density distribution. These vignette and article provide useful introduction.
- Patchwork is a package designed to make plot composition in R extremely simple and powerful. It is mainly intended for users of ggplot2 and goes to great lengths to make sure ggplots are properly aligned no matter the complexity of your composition. The Getting Started page explains the main features of the package.
- gganimate extends the grammar of graphics as implemented by ggplot2 to include the description of animation. It does this by providing a range of new grammar classes that can be added to the plot object in order to customise how it should change with time.
- ggdist is an R package that provides a flexible set of ggplot2 geoms and stats designed especially for visualizing distributions and uncertainty. It is designed for both frequentist and [https://mjskay.github.io/ggdist/articles/freq-uncertainty-vis.html] visualization, taking the view that uncertainty visualization can be unified through the perspective of distribution visualization: for frequentist models, one visualizes confidence distributions or bootstrap distributions (see vignette(“freq-uncertainty-vis”)); for Bayesian models, one visualizes probability distributions (see the tidybayes package, which builds on top of ggdist).
Interactive Data Visualisation with R
plotly R
- plotly: Create Interactive Web Graphics via ‘plotly.js’
- Interactive web-based data visualization with R, plotly, and shiny
- Plotly R Open Source Graphing Library
- Getting Started with Plotly and ggplot2
ggigraph
- ggigraph lets R users to make ggplot interactive.
Other R graphics packages
- corrplot. A graphical display of a correlation matrix or general matrix. It also contains some algorithms to do matrix reordering. In addition, corrplot is good at details, including choosing color, text labels, color labels, layout, etc.
- corrgram calculates correlation of variables and displays the results graphically. Included panel functions can display points, shading, ellipses, and correlation values with confidence intervals. [https://cran.r-project.org/web/packages/corrgram/index.html]
- vcd, Visualization techniques, data sets, summary and inference procedures aimed particularly at categorical data. Special emphasis is given to highly extensible grid graphics.
- tmap offers a flexible, layer-based, and easy to use approach to create thematic maps, such as choropleths and bubble maps.