Welcome! This is a workshop for the Cascadia R conference that is meant to be a gentle introduction to data visualization using the ggplot2
and the plotly
packages.
You’ll learn the basics of the grammar of graphics and learn how to visualize and understand relationships between different kinds of variables in your dataset.
Please make sure to have this completed prior to the workshop beginning. Reading over all the materials here will help you get an understanding of what is to be expected and a better grounding to dive into the material as the workshop gets started. To participate in this workshop, you’ll need to do the following on your own laptops:
Have the following R packages installed: dplyr
, readr
, plotly
, gapminder
, remotes
, fivethirtyeight
, and ggplot2
.
This can be accomplished by copying the following code into the Console in RStudio and pressing Enter. Note that you’ll see quite a few lines of code run while the packages are installing. Don’t be alarmed. After all of these packages are installed you should see them listed in the Packages tab in the bottom right section of RStudio.
We needed to install the developmental version of the ggplot2
package in order for it to work nicely with the plotly
package in Part 3 of this workshop and this is the reason for installing the remotes
package as well.
install.packages(c("dplyr", "readr", "plotly", "gapminder", "remotes", "fivethirtyeight"))
remotes::install_github("tidyverse/ggplot2")
tidyverse
contains a variety of different packages that will be useful in your analysis including the ggplot2
package that will be the focus of this workshop. We’ll also use the dplyr
package for data wrangling and the readr
package for reading in data.plotly
package will be used for interactive graphics.gapminder
package contains a data set made famous by Hans Rosling exploring data on the world’s countries.fivethirtyeight
package contains many datasets used by data journalists at FiveThirtyEight.com.You’ll be following along in the Part1-ggplot2_intro.Rmd, Part2-working_with_factors.Rmd, and Part3-interactive_plots.Rmd files, running the R code in the “chunks” there, and writing your own code to practice. You can also follow along with the webpage for the workshop at https://cascadiarconf-viz.netlify.com.
Remember, in this workshop we will adhere to the code of conduct for this conference. Be respectful of your fellow students, workshop leaders, and workshop TAs and let’s learn together.
Please bring a pencil, at least one color of pen, and some paper to write on.
aes
thetics and mapping
of variablesgeom
etriesgeom
sfacet
ingggplotly()
function in the plotly
package