Data Visualization With Ggplot2 PDF
Data Visualization With Ggplot2 PDF
Expectations
• You are experienced with R coding.
Prerequisites
• Install R & RStudio
The Data
The Data
• H1B data from U.S. Department of Labor for 2018.
Data Visualization with ggplot2
ggplot2
• Standard visualization package in R
The Grammar
Every visualization in ggplot2 is composed of the following:
▪ Data – The raw material of your visualization.
▪ Layers – What you see on the plots (e.g., points, lines etc.).
▪ Scales – Maps the data to graphical output
▪ Coordinates – The visualization’s perspective (e.g., a grid).
▪ Faceting – Provides “visual drill-down’ into the data.
▪ Themes – Controls the details of the display (e.g., fonts).
Data Visualization with ggplot2
▪ Layers – A visualization requires at least once layer to render the data and aesthetics
to the screen. These layers typically take the form of a ggplot2 geom function – for
example, a simple scatter plot.
Data Visualization with ggplot2
R CODE!
Data Visualization with ggplot2
QUESTIONS
Data Visualization with ggplot2
THANK YOU!
Want More?
• Follow us on Facebook, Twitter, & LinkedIn
• More tutorials available on
https://tutorials.datasciencedojo.com/.
• Hear what our students say about our bootcamp on
https://datasciencedojo.com/bootcamp/reviews/