Link Search Menu Expand Document

QGIS Exercise – Building the COVID-19 map


Project Image


1. Load a Project:

  1. Open QGIS from the list of programs on your computer.
  2. Load the workspace Project > Open > Covid.qgz

2. Interface:

Numbers 1-3 illustrate the locations of the following elements:

  1. Workspace
  2. Table of Contents (TOC)
  3. Menu/Tools
    QGIS Interface

3. Explore the workspace :

Try using the pan (hand) and zoom (magnifying glasses) to move around the map.
QGIS navigation tools

4. Explore the Table of Contents

  1. There is a Lakes file listed in the TOC but it is not visible on the map:
    To makes the Lakes file visible, drag it up the list so it is above Countries file.
    QGIS Table of Contents
    Your map should now look something like:
    Map Canvas
  2. Right click on the Countries layer, open the attribute table , if we want to map COVID cases, what information is missing from the Countries file?

5. Adding data from a .csv file:

  1. There are multiple ways to add a .csv file to QGIS. The most efficient is:
    Layer > Add Layer > Add Delimited Text Layer
  2. Click the button to the right of the File name text field and select the covidData.csv file in your data folder.
  3. The wizard auto-fills. Ensure that:
    1. File Format : csv
    2. Record and Field Options: First record has field names + detect field types
    3. Geometry Definition : No Geometry (attribute table only)
    4. Ensure the preview looks accurate
  4. Click Add button
    QGIS add delimited text dialogue

6. Perform a Join to add the data from covidData.csv to the Countries file.

  1. Right click on Countries and select Properties > join icon (Joins) to open the dialogue box.
  2. Click the plus sign at the bottom of the dialogue to create a new Join.
  3. In the wizard, ensure that:
    1. Join Layer: coviddata
    2. Join field: Country Re
    3. Target Field: NAME EN
    4. Check off the option to cache join layer in virtual memory
    5. Click OK
      QGIS create join dialogue
    6. Right click on the Countries layer, open the attribute table ,now the COVID numbers have been appended to the end of the attribute table.

7. Create a Choropleth

  1. Right click on Countries and select Properties > paintbrush icon (paintbrush) to change the symbology
  2. Symbology type : Graduated (from the dropdown)
  3. Column : Confirmed
  4. Colour ramp : Anything light to dark
  5. Mode : Natural Breaks (Jenks)
  6. Classes : 5
  7. Click Classify to classify your data
  8. Values : Adjust the class cut-offs as you see fit by clicking the values
    QGIS Symbology cut-offs
  9. Click Apply + OK

8. The countries with joined data are now symbolized according to number of confirmed cases.

Finished map

9. Export data to a shapefile format so that it can be used in analysis.

  1. Right click on your Countries layer in the TOC
  2. Select Export > Save Features as
    1. Format : ESRI Shapefile
    2. Click the button to the right of the File name text field and select the appropriate directory to save your new file with the rest of your data, name it something descriptive like CountriesCOVIDcounts
    3. CRS: EPSG: 4326 – WGS 84
      Export Dialogue Box

Congratulations! You made it through!

Questions? Concerns?

Data:Natural Earth, JHU CSSE COVID-19 Data Repository