From the course: Creating Maps with R
Unlock the full course today
Join today to access over 24,200 courses taught by industry experts.
Solution: Label a geobubble chart of Germany's biggest cities
From the course: Creating Maps with R
Solution: Label a geobubble chart of Germany's biggest cities
(techno music) - Let's start solving this challenge by running the code that I've already given you. So, let's run lines 15 through 1. It's going to load our packages and define our data sets and then line 18 through 21, I'm starting off the visualization. We've just border of Germany. So, let's add our German cities with geom_sf, add a plus, so I don't forget it. Go back inside of brackets, and add data is equal to germany_cities. So that makes us a geo scatter plot but we want this to be a geo bubble chart, so let's add aes, size is going to be equal to the pop column. And so now that's a geo bubble chart. Our next part of the challenge is to label for cities in a map. So we're going to use the "ggrepel" package for that. But remember, ggrepel doesn't know how to work with SF objects, so, we need to turn Germany cities into a data frame. We start that process by taking germany_cities and piping it into…
Contents
-
-
-
-
-
-
Use geom_sf to visualize geo locations5m 53s
-
(Locked)
ggplot2 choropleth and continuous data6m 46s
-
(Locked)
ggplot2 choropleth and discrete data6m 14s
-
(Locked)
Label maps with ggrepel package5m 14s
-
(Locked)
Zoom into regions with coords_sf()3m 37s
-
(Locked)
Transform CRS with coord_sf()2m 25s
-
(Locked)
Challenge: Label a geobubble chart of Germany's biggest cities32s
-
(Locked)
Solution: Label a geobubble chart of Germany's biggest cities4m 45s
-
(Locked)
Challenge: Visualize state coastline length with choropleth33s
-
(Locked)
Solution: Visualize state coastline length with choropleth4m 11s
-
-
-
-