ggplot2 UO Workshop
These are my notes from the University of Oregon’s Data Service Consultants workshop on ggplot2.
Gabriele Hayden with help from Cameron Mulder ran the workshop. They can be contacted via their consultation page here.
# install.pcakages("ggpot2")
library(ggplot2)
download.file("https://raw.githubusercontent.com/swcarpentry/r-novice-gapminder/gh-pages/_episodes_rmd/data/gapminder_data.csv", destfile = "gapminder_data.csv")
gapminder <- read.csv("gapminder_data.csv", stringsAsFactors = TRUE)
ggplot(data = gapminder, mapping = aes(x = gdpPercap, y = lifeExp)) +
geom_point()

Challenge 1
Modify the example so the figure shows how life expectancy has changed over time
ggplot(data = gapminder, mapping = aes(x = year, y = lifeExp)) +
geom_point()
