Code Monkey home page Code Monkey logo

rice-data-viz's Introduction

Advanced Data Visualization with ggplot2

Rice University Workshop (March 2021)

by Allison Horst

Workshop guide

Available here: https://allisonhorst.github.io/rice-data-viz/

Workshop outline

  • Conceptual hierarchy of data viz
  • ggplot2 basics review
    • Aesthetic mapping
    • Themes
    • Labels
    • Facets (& facet grids vs facet wraps)
    • Getting things in order (e.g. fct_reorder)
  • Advanced customization in ggplot2
    • scales for thoughtful breaks and labels
    • …and color schemes (+ paletteer!)
    • In the weeds of themes (gridlines, panel colors, margins, etc.)
    • Direct annotation (as an alternative to legends)
    • Repulsive labels (e.g. ggrepel)
    • Highlighting for clarity (e.g. with gghighlight)
  • Compound figures with patchwork
  • A few new graph types to consider
    • Marginal plot
    • Beeswarm plots with ggbeeswarm
    • Heatmaps with geom_tile()
    • A map! in ggplot2
  • Export & save your graphs
  • Keep learning

Workshop prep:

There are two ways you can get the workshop materials:

  1. Create a free RStudio Cloud account, and access the materials here: https://rstudio.cloud/project/2256278. If you use this option, make sure to click “Make permanent copy” or your work will be deleted when you close the project.

  2. Fork & clone this repo to work locally.

Required packages:

Make sure you have recent versions of the following packages installed for the workshop:

General use packages:

  • tidyverse
  • here
  • janitor

Specifically for plots:

  • patchwork
  • ggrepel
  • gghighlight
  • paletteer
  • ggExtra
  • ggbeeswarm

Spatial data simplified:

  • sf

And for another dataset we’ll explore:

  • gapminder

rice-data-viz's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.