课程: Data Visualization in R with ggplot2
免费学习该课程!
今天就开通帐号,24,700 门业界名师课程任您挑!
Plotting points on a map
- [Instructor] Now that you know how to pull up maps using ggmap and how to geocode points, let's combine those two tasks and begin plotting data points on a map. I already have the code loaded here to geocode a couple of points. Let's run that and complete that geocoding, and now let's use one of those points to pull up a map of the United States. I'm going to use the ggmap function on get_map using this USA point that I geocoded. Well, that doesn't look like what I expected. That's because this is zoomed in way too far. We're looking at a region in Kansas that is near the center of the continental United States. Let's try zooming this out a little bit. There we go. Now that's the map of the United States that we're more familiar with. Now let's try plotting a point on this map. How about if we try to put a point on this for New York City? Remember, ggmap works just like ggplot, so we can just add a point geometry onto our map with the + operator. I'm going to add a + and then a…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。
内容
-
-
-
-
-
-
(已锁定)
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 秒
-
(已锁定)
-
-