课程: Data Visualization in R with ggplot2
免费学习该课程!
今天就开通帐号,24,700 门业界名师课程任您挑!
Creating a choropleth map
- [Instructor] Choropleth maps are a powerful visualization tool that allows us to see regional differences in data. In an earlier video, I showed you how the CDC uses choropleth maps to track outbreaks of influenza. Now that you've learned how to build maps using polygons, you're ready to create your own choropleth maps. Let's give it a try in R. I already have the code here to load the college dataset that we've been working with throughout the course, and I've run it, and I've also loaded the state map dataset. Now, I'd like to color code states based upon how many schools are in each state. Before I can plot a choropleth map, I need to get my data in order. First, I need to figure out how many schools are in each state. I can use some functions from the dplyr library to help me with that. I'm going to create a new dataset called college_summary, and I'm going to populate that by taking in the college dataset and piping it to the group_by function. I'm going to group this by state…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。
内容
-
-
-
-
-
-
(已锁定)
Visualizing data with maps2 分钟 14 秒
-
(已锁定)
Obtaining a Google Maps API key5 分钟 19 秒
-
(已锁定)
Working with map data2 分钟 32 秒
-
(已锁定)
Geocoding points3 分钟 26 秒
-
(已锁定)
Changing map types1 分钟 19 秒
-
(已锁定)
Plotting points on a map5 分钟 6 秒
-
(已锁定)
Building a map manually4 分钟 21 秒
-
(已锁定)
Creating a choropleth map6 分钟 53 秒
-
(已锁定)
-
-