Skip to Main Content

Class-Specific Resources

Heatmaps and Change over Time

With data like that from, our maps can quickly become cluttered with overlapping symbols. The great span of time the data covers and the fact that the same ports hosted many voyages make visual representation a challenge. For that reason, we want to look beyond simple point symbols or even graduated point symbols to visualize the data. In this tutorial we’ll examine two complimentary ways of dealing with this challenge: heatmaps and a time animation.


STEP 1: Visualizing Points with a Heatmap

A heatmap uses a color ramp to illustrate the relative number of points in a given area. If the color ramp goes from light to dark, this means that the lighter the visualization becomes the more points are concentrated in that area and the darker the fewer points. We are most used to seeing heatmaps in our weather reporting apps with the color range referring to things like rainfall, storm intensity, or perhaps literally heat. In QGIS, the Symbology controls make generating a heatmap very simple.


For this tutorial, we will use the data you worked with from the previous map. Open QGIS, create a new project, and name it “sv-1750-1808-heatmap.” Add the same basemap we used before, then add the CSV file “sv-1750-1808-disembark.” We’ll use this to generate a heatmap that illustrates the numbers of enslaved individuals that arrived in the Americas through this period. Once you’ve added in your CSV layer and see it on the map, do the following:


  1. Double click your new layer in the Layer pane and select Symbology.
  2. In the top dropdown menu, select Heatmap.

Heatmap tab from drop down menu

  1. At the “Color ramp” selector, click the down arrow at the far right and select the Viridis color ramp. (If you'd like to learn more about the science behind different color ramps, this video is a good place to start.)

Viridis Color Ramp

  1. After you’ve selected the color ramp, click the color bar in the menu (the one that goes from purple to yellow). In this submenu, select the down arrow next to “Color 1” and click the "Transparency" box. This will make the outermost layer of the heatmap (which by default extends over the entire map) invisible so that all you can see all the areas where there is actually data. Click OK and then OK again to exit the Select Color Ramp window.

Color opacity scale

  1. Finally, near the bottom of the menu, open Layer Rendering by clicking on the triangle and adjust the layer’s opacity to 80%. This will make the heatmap area slightly transparent so that the basemap will still be visible underneath. Click Apply and OK.

Layer rendering window

You should see a heatmap of your data now in place of individual points. 


As we’ve already noted, the colors correspond to lower or higher numbers of points, each of which corresponds to a row on our spreadsheet. In this case, since each row corresponds to a particular voyage, higher values mean a greater number of ships stopped at a given port within the given time frame.

  1. Double click the same layer in the Layer pane and once again select Symbology. You should see all of the Heatmap selections you just made.
  2. Go to the field “Weight points by” and select the column “Slaves arrived at 1st port.” Click Apply and OK.

Now the colors reflect both the number of stops and the overall number of enslaved individuals represented in those stops. You should see a difference, though it may be subtle.

Take a screenshot of your map, or export it as an image file to upload to Canvas.

STEP 2: Visualizing Change over Time with QGIS Plugin TimeManager

Another approach to visualizing change over time is a timeline. In terms of GIS, a timeline function filters your data according to a specified segment of time, for instance year by year. You can then drag a slider or simply hit play and see an animation of how your data changes from year to year. You can usually decide to see snapshots of the data as the timer progresses or see that data accumulate on your map.


To do this in QGIS, we'll use the Temporal Controller feature. First we'll need to make some adjustments to the data layer.



  1. Double click your data layer, scroll toward the bottom of the left hand menu, and click “Temporal.”

  2. Check the box at the top left labeled “Temporal.” This tells QGIS that this layer as time-related information.

  3. For Configuration select “Single Field with Date/Time.”

  4. For Field select “Date.”

  5. Click Apply and OK.

Now we can turn on the Temporal Controller feature.



  1. In the top icons menu, find the clock icon and click it. This should open a control menu that will be mostly black initially.

  2. Click the small play button at the top left of this menu. When you hover over it, it will say “Animated temporal navigation.” This will turn on the time animation controls.

  3. For Range, set the start date to “1748-01-01” and the end to “1808-01-01.”

  4. For Step, set it to move ahead 1 year at a time.


Now you can use the controls to play the time animation. You should see the heatmap data emerge and accumulate as the slider moves along. As you examine the animation, consider what changes you see over time. How might we explain them?


Save your map, and be sure to take a screenshot to upload to Canvas.

A Final Note About Filtering Data

One final note about filtering when downloading data from When you navigate to the database section of the site, you'll find a list of categories near the top of the page starting with "Year range," "Ship, nation, owner," and so on. You can set filters on each of these if you wish. We've gone over setting a year range filter in the previous tutorial.

If you want to add an additional filter that targets, for example, the principle place of purchase, you can do that by selecting "Itinerary" and then the "Place of purchase" tab. Then in the field "Principal place of slave purchase" input your search terms (e.g. "West Central Africa"). If there are results, you can check the box next to the categories you wish to include. When you've done that, click Apply at the bottom of the window. The results visible in the database should reflect what you've selected. You can verify what filters you currently have set in the light gray strip above the database results.

When you have what you want, you can download the filtered dataset by clicking Download > CSV [or Excel] > Filtered results with visible columns.