Your Turn: Build a Spatial Story

 Congrats!  🥳 You've completed the fifth module! You now know how to work with spatial data, create maps with ggplot2, customize them, and build tile grid layouts.

Now, let's put your spatial skills into practice: build a polished map visualization that tells a geographic story! 🗺️

Members only10 minutes read

🎯 The Challenge

You've learned how to work with spatial data structures, create maps with ggplot2, customize their appearance, and build alternative spatial layouts like cartograms and grid maps. Now it's time to bring it all together.

The idea of this project is to create a set of three maps to compare the different approaches directly. We're going to provide you with a GeoJSON dataset, and you will have to pick your favorite variable and build three different maps to represent the  region of the world you currently live in .

  1. Build a choropleth map using traditional polygon fills with a suitable color palette.
  2. Build a grid map using your favorite shape to represent the same variable by color.
  3. Build a spatial grid of small multiples to showcase the same variable but over time.

💾 The Data

As you know by now, Gapminder provides a lot of variables about world countries, and we've transformed it into a GeoJSON format to link it with all the country boundaries.

We've built two special editions of the Gapminder dataset for you.

2022 Gapminder Metrics, But Spatial

To provide you with all you need for a spatial map, we put together a single file called gapminder-2022.geojson that you can load using the following code:

import

Every one of the 197 countries carries both a polygon geometry and its 2022 statistics, so you can map any variable straight away.

Use this dataset to create a choropleth map and a grid map of your region (however you define that) to represent one of the following variables for the year 2022:

variables
  • country, iso_a3, country_name — country identifiers
  • continent, region, region_un, subregion — geographic groupings (handy for picking your region)
  • pop — total population
  • gdp_pcap — GDP per capita
  • life_exp — life expectancy at birth, in years
  • income_daily — average daily income
  • co2_pcap — CO₂ emissions per capita, in tonnes
  • fertility — births per woman
  • geometry — the country polygon (a sticky sf column)

Doors are closed 🚪

Enrollment for the current cohort is closed. Join the waitlist to be notified as soon as the next cohort opens, and become the ggplot2 expert your company needs!


Join the Waitlist

Already enrolled? Login

← Previous

Grid Maps

Next →

Instant Interactivity with plotly