QGIS 2: Analyzing geographic data

Wesley Stephenson & Callum Thomson BBC News

This tutorial: https://bit.ly/QGIS2-nicar2024

The aim


Build on your existing knowledge of QGIS and learn how to explore, manipulate and analyze geographic datasets to gain new insights.

This session is good for: 

Those who attended the QGIS I workshop or already know the basics of visualising geographic data in QGIS.

These are the full follow-along instructions from the NICAR session with a worked example.
Notes from the QGIS 1 workshop can be found here: https://bit.ly/QGIS1-nicar2024

Setup

We’ll be continuing on the theme of urban heat islands used in QGIS 1. We’re going to explore what factors might influence the size of the temperature differential. By the end of this session we should have tested at least one hypothesis and made the map above.

If you’re not on a NICAR laptop, you will find the data and shapefiles here - please download them before starting.

This includes a QGIS project that’s already been set up with our starting data in. Open QGIS and open the project (called QGIS_2_start_point.qgz)

There are 4 data sets pre loaded
Two visible layers:
  • baltimore_places - these are the locations and labels for places in and around Baltimore.
  • Baltimore_with_UHI - This is the choropleth map of the urban heat island effect we made in session 1
Three hidden layers (we’ll come to these later)
  • gis_osm_water_a_free_1 - this is a shapefile of the water in Baltimore
  • BMD_MULC - this has land use data in it
  • BMD_MULC_clipped - this is a clipped version of the above 

1. Removing the water

What is missing from the map above? That’s right - the harbour.
The census tracts shapefile we have been using doesn’t show the water in Baltimore and of course the harbour is one of the big features of the city. On the map we drew before, a large section of the dark pink area that represents a larger heat island effect is actually water. Let’s remove this. 

Map Layers

First switch off the labels layer baltimore_places using the check box in the Layers window. This just makes our basemap easier to see. 

Then we need to bring in a new layer which shows where the water is. We have already preloaded this into QGIS for you but if you did want to download it for yourself when you get to good wifi - you can find it here. It comes from OSM and you can download the latest data from major cities across the world from this site. You could also get water shapefiles from other sources, government websites , universities etc. Just remember to source you data in your final piece. 

Click on the check box next to the  gis_osm_water_a_free_1 layer in the Layers window. 
You should see something that looks like this:

Select the water we want

We can now see the harbour but also all other water across the city - ponds/reservoirs/wetlands. We want to just show the harbour. So let’s select just the polygons that represent the harbour. 

In the image above I have highlighted the select tools. Click the one furthest to the left, a yellow square with a mouse pointer on top of it. 

Then select the sections of water you want to show on our map. Press command or ctrl when you are clicking to select more than one area.