From the course: Creating Maps with R
Unlock the full course today
Join today to access over 24,200 courses taught by industry experts.
ggplot2 choropleth and continuous data
From the course: Creating Maps with R
ggplot2 choropleth and continuous data
- [Instructor] We're going to build this continuous variable choropleth using ggplot2. To do so, I need you to load the script in your 0 4 0 2 B project, and let's start running our code. Lines one through six, we're going to load our packages, and read in our data set and then lines eight through 11, we're going to join those two data sets together into one SF object. Let's print it to the console so we can see what it looks like. So, what we have is, we have the name of each of the boroughs of London. We've got the geometry column, and we've got the value column here which is telling us how many residents left school at the age of 16 or under. So, let's start building our ggplot2 chart with the function ggplot. We used a plus operator to add a geom SF layer, and we'll specify that data is equal to London school leavers SF. And what I want to do is I want to fill each of these boroughs dependent on the value…
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
-
-
-
-