Map design Exercise 1: Creating a Map of Ghana#

Aim of the exercise#

The aim of this exercise will be to create an overview map of Ghana with its subdistricts, main roads, settlements, as well as hospitals. Such information can always be of use in humanitarian work. The first part of the exercise will cover the symbolization of the data layers. The second part will focus on the design of the print layout.

Estimated time for completion: 3 hours

Data#

Download the data for the exercise here.
It is always important to make yourself familiar with the data at your disposal. For this exercise, we will use the following layers:

All data has been downloaded from the humanitarian data exchange. Download the Data from the Nexus, unzip the folder, and load the data into a new QGIS project.

Wiki articles#

Tasks#

Preparation of the data#

  1. Load the .shp-files into a new QGIS-project.

  2. Look into the attribute table of the different layers and look what information is available and how the attributes are named.

  3. We want to make a comprehensible map, think about which data we need and what data we can leave out.

    • For example, the layer hotosm_gha_roads_lines contains too many roads for a map on a national scale. Let’s open the attribute table and look at how the roads are classified. The data is using the conventional OpenStreetMap classification: The type of road is described under the attribute highway. In our case, it might be useful to only display the primary and secondary roads, so all the features where highway=primary OR highway=secondary.

Part 1: Symbolization#

Now that we are familiar with the data at our disposal, let us start choosing the symbology for the different layers. Which information should be displayed on the map?

Let’s start with the administrative boundaries. We want to show the names and outlines for the adm_1-layer, as well as the outlines for the adm_2-layer.

  1. Put the layers for the administrative boundaries in an ascending order with adm_0 at the bottom, followed by adm_1 and adm_2

  2. Open the Symbology Tab for the adm_2-layer. Set the Fill color to transparent and the Stroke width to 0.16 Millimeters and the Stroke style to a dashed line.

  3. Open the Symbology Tab for the adm_1-layer and set the colour as transparent. Leave the stroke width at 0,26 Millimeters and the stroke style as a solid line.

  4. Open the Symboloy Tab for the adm_0-layer and set it to a neutral colour (such as a light gray).

  5. We want to display the names of the regions (adm_1). Open the Labels Tab for the adm_1-layer. Select “Single Labels” and choose the attribute ADM1_EN for the values that are to be displayed.


Let’s move on to the settlements.

The layer for the settlements has been cleaned up and only the towns, regional capitals, district capitals, and country capitals are available.

  1. Open the Symbology Tab for the gha_ppl_1m_NGA-layer and select a categorized symbology.

  2. Under “Value”, select popPlace1

  3. Click on “Classify”

  4. A list of all the unique values will appear. Assign each a dark grey point marker.

  5. We want to be able to differentiate between country, regional, or district capital. The most important capital is the country capital, followed by regional capitals and finally the district capitals. Give each point marker a different size corresponding to its importance.

  6. Let us add a label for the country capital and regional capitals next.

  7. Navigate to the “Label Tab” and select “Rule-based Labelling”

  8. Add a new rule and enter the following expression in the Filter: (  "popPlace1"  =   'Country capital'  ) OR ( "popPlace1" = 'Regional capital' )

  9. Set the “Value” to Name.

  10. Make the font italic and draw a text buffer in order to differentiate the settlement labels from the labels of the regions.


Let’s move on to the road network.

  1. The layer for the road network should sit on top of the administrative boundaries so the course and connections of roads is always visible.

  2. Open the Symbology Tab for hotosm_gha_roads_lines. Select “Rule-based” and add a new filter by double clicking on (no filter).

  3. Open the expression builder by clicking on the icon to the right of the filter option.

  4. First, open a parenthesis by double-clicking on (.

  5. In the middle tab of the expression builder, expand the “Fields and Values” list. Double click on highway to add it to the expression on your left. Next, on the right, click on All Unique to list all the possible values of that attribute.

  6. Under the left window, click on the =-sign to add it to your expression.

  7. In the list with all the unique values. Select primary and add it to your expression.

  8. Close the parenthesis by clicking on ) under the expression field on the left.

  9. Add the Operator OR and repeat the same expression with the parenthesis but select the unique value secondary

  10. The finished expression should be (  "highway"  =  'primary' )  OR  ( "highway"  =  'secondary'  )

  11. Select a color and thickness for the line so it is distinguishable from the administrative boundaries (e.g. yellow; keep in mind that some colors have conventional associations; blue for water for example).


Now as a final touch, let’s select a symbol for the health facilities:

  1. Navigate to the hospital_GHA layer

  2. Open the Symbology Tab and select the Simple Marker.

  3. Under “Symbol Layer type”, select SVG-Symbol.

  4. Scroll down until you see the SVG-Symbol browser.

  5. In the search bar, enter ‘hospital’

  6. Select one of the SVG-Symbols at your disposal

  7. Adjust the color to red.

  8. Click Apply and Ok.

Now we have assigned a symbol for each layer at our disposal. Look at the map you created and decide if you want to adjust any symbology to make the map easier to read. Do you need to change some colours? Are the layers ordered in a way that the information is available? Is the font size appropriate or do they cover up too much information?

Bonus Step: Adding a basemap can help potential readers orienting themselves.

Now the Map should be ready for a print layout.

Part 2: Creating the print layout#

Once you are happy with the symbolization and colours of your data, the next step is to create a print layout. By adding additional information such as a title, datasources, projection, description, etc. you provide your audience with the means to contextualise and evaluate the map and it’s content by themselves.

  1. Open a new print layout abd give it a name (e.g. Ghana Map with hospitals). A new window will open with a blank canvas and a different set of tools. This is the print layout designer.

    • On the left, you will find a toolbar with tools to add and move items on the print layout canvas.

    • On the right you will find a list of items you added to the print layout (it is still empty). Beneath this, you will find a tab called “item properties”. This is where you modify the items on your print layout (e.g. enter the text for a text box or change the font).

  2. Insert a new map by clicking on the New Map Icon (Add Map) on the left toolbar, and drawing a rectangle on the print canvas. Video

  3. Move and position the map so that the entire country is visible at a reasonable scale.

  4. Let’s add a title:

    • Click on the Add text icon (Add text)

    • Drag a rectangle on the canvas

    • In the items properties window on the right, you will find a text box with the text “Lorem ipsum”. Here you can enter your map title (e.g.: Map of Ghana with roads and hospitals).

    • Adjust the font size: Click on the Font dropdown menu and adjust the font size for a title (25p or more). Adjust the text box if necessary.

  5. Let’s add a legend:

    • Click on the Add legend icon (Add legend).

    • Navigate to the Item Properties panel on the right.

    • Scroll down a bit and check turn off Auto Update by unchecking the check box. Now you can freely edit every item on the legend

    • Adjust the legend by removing unecessary layers (which are not seen on the map) and rename the layer in the legend by clicking on Edit Icon (Edit selected item properties) below the legend entries.

  6. Now, let’s add a scale bar:

    • Click on the Add Scale bar icon (Add Scale bar)

    • Draw a rectangle on the map and position the scale bar on the edge of the map. You can adjust the scale bar units (meters, kilometers, …), the fixed segment width (50 km, 75 km, 100 km, …) and the number of segments (to the right).

  7. Let’s add North arrow:

    • Click on the Add North Arrow Icon (Add North Arrow).

    • Drag a rectangle on the print layout. Adjust the size and location of the north arrow. You can also change the icon in the item properties.

  8. Add a text box with additional information, sources, the author (you), and date of creation.

  9. When you are happy with your print layout. You can export it as a PDF. You can save it in the project folder under “results”.

  10. Once you have exported the map. Look at the PDF and make sure it looks how you intended. Some things might look different in the PDF. If it does not look correct you may need to make some adjustments in the symbology.

The finished map could look something like this:

../../_images/en_map_design_exercise_1_results.png

Fig. 106 Some space has been left in the bottom-right corner for an overview map#

What can we learn from this map? We can clearly identify areas that are harder to reach and where the travel time to a hospital is much longer than in the populated regions in the south of Ghana.

Bonus Exercise!#

If you are finished with the main map, click on the map and navigate to the item properties. In the layer section, check the box Lock Layers and Lock styles for layers. This means that if you change the map in the main QGIS-window, the map you have added to the Now you can start working on an overview map. We will be using a shapefile with the countries of Africa.

  1. Return to the main QGIS window and load the layers from the Bonus Exercise-folder.

  2. In the Layer panel, make the layers for the main map invisible by clicking on the Eye Icon next to the layer name.

  3. Style the countries in an neutral, unobtrusive color. For example, you can use the “Gray 3 Fill” from the styling templates.

  4. Once you are happy with the styling of your overview map, navigate back to the Print Layout window.

  5. Add a second map and position it in a corner.

  6. In the Item properties panel for the second Map (”Map 2”), scroll down and open the Overview-options.

  7. Click on the +-button to add a new overview.

  8. In the “Map Frame”-option, select “Map 1”. This will show the frame of the main map on your overview map.

Congratulations! You have finished your first map!