From the course: Data Visualization in R with ggplot2

Unlock the full course today

Join today to access over 22,700 courses taught by industry experts or purchase this course individually.

Zooming in on California

Zooming in on California

From the course: Data Visualization in R with ggplot2

Start my 1-month free trial

Zooming in on California

- [Instructor] Once again, if you have access to the exercise files for this course and you need to catch up with where we are, you'll find the code that I have loaded here in the start file of the directory for this video. That code brings us to the point that you see on the screen. We have a map of the United States that's a little cluttered with schools because we've added the size dimension to each point representing the number of undergraduates at each school. I'd like to zoom in on California to get some more detail on the school locations in that state. The first thing that I need to do is to create a new map data set that only includes information about California. Since we're zooming in to a single state, I like to get a county map this time, but only for the region of California. I can do this by calling map data with the arguments county for map and California for region. Let's go ahead and give that a try. I'm going to create a tibble called California and I'm going to…

Contents