http://ubc-library-rc.github.io/data-analysis-r//visualization/introduction.html
The Vancouver Campus is located on the traditional, ancestral, and unceded territory of the xʷməθkʷəy̓əm (Musqueam) people.
Map: https://native-land.ca/
0:05 | Setting the stage |
0:15 | Orientation to ggplot2 |
0:25 | Graph types: part 1 |
0:45 | Questions/practice/break |
0:50 | Graph types: part 2 |
1:15 | Themes and colors |
1:35 | Interactive graphs |
1:50 | Conclusion |
Experienced in visualization
New to visualization
New to R
Experienced in R
A text file that combines R commands, R output, and descriptive text
Good for documenting, experimenting, and sharing your work
Download and open workshop .Rmd file in RStudio
A data visualization package https://ggplot2.tidyverse.org/
Implements the grammar of graphics, a system for designing and building graphs
countries %>%
ggplot(aes(x=continent))+
geom_bar()
countries %>%
ggplot(aes(x=continent, fill=continent))+
geom_bar()
countries %>%
ggplot(aes(x=continent, fill=continent))+
geom_bar()+
labs(title="Counts of observations by continents",
x="Continents", y="Number of observations")
A ggplot geom is the geometrical object used to represent data (i.e. the chart type)
Other features can be controlled with additional ggplot2 components