From the course: Creating Maps with R

Unlock the full course today

Join today to access over 24,200 courses taught by industry experts.

Challenge: Interactive choropleth of state coastline length

Challenge: Interactive choropleth of state coastline length

From the course: Creating Maps with R

Challenge: Interactive choropleth of state coastline length

(upbeat music) - [Instructor] For this challenge, I would like you to use leaflet to create a continuous variable choropleth showing the kilometers of coastline for each of the states in a contiguous United States. I'd like you to use the viridis color palette for your choropleth and I would like you to highlight those states with zero coastline in pink and to add an appropriate label in the legend. I'd like you to also add a pop-up to the states that shows the state name and the coastline formatted in kilometers. I would like you to set the background color of the map to white and please use the provided CSS to fix the legend.

Contents