Tutorial 1: Making a Map (QGIS3)

Often one needs to create a map that can be printed or published. QGIS has a powerful tool called Print Layout that allows you to take your GIS layers and package them to create maps.

Overview of the task

The tutorial shows how to create a map of Japan with standard map elements like map inset, grids, north arrow, scale bar and labels.

Other skills you will learn

  • How to view and change QGIS Project Variables
  • How to use QGIS expressions

Get the data

We will use the Natural Earth dataset - specifically the Natural Earth Quick Start Kit that comes with beautifully styled global layers that can be loaded directly to QGIS.

Download the Natural Earth Quickstart Kit.

Data Source [NATURALEARTH]

Procedure

  1. Download and extract the Natural Earth Quick Start Kit data. Open QGIS. Locate the Natural Earth quick start folder in the Browser panel. Expand the folder to locate the Natural_Earth_quick_start_for_QGIS_v3 project. This is the project file that contains styled layers in QGIS Document format. Double-click the project to open it.
../../_images/169.png
  1. You may notice that the map has labels in Greek. This project uses variables to set the language. We can change the variables by going to Project ‣ Properties.
../../_images/236.png

Note

Project variables are a great way to store project-specific values for use anywhere you can use an expression in QGIS. The Natural_Earth_quick_start_for_QGIS_v3 project comes with many preset variables that are used for styling within that project.

  1. Switch to the Variables tab in the Project Properties dialog. Locate the project_language variable and click on the Value column to edit it. Change the language to name_en and click OK.
../../_images/326.png
  1. Back in the main QGIS window, click the Refresh button in the Map Navigation Toolbar. You will now see the map rendered with English labels.
../../_images/413.png
  1. Use the pan and zoom controls in the Map Navigation Toolbar and to zoom to Japan.
../../_images/513.png
  1. You can turn off some map layers for data that we do not need for this map. Expand the z5 - 1:18m folder and uncheck the box next to ne_10m_geography_marine_polys and ne_10m_admin_0_disputed_areas layers. Before we make a map suitable for printing, we need to choose an appropriate projection. The default CRS for the project is set to EPSG:3857 Pseudo-Mercator. This is a CRS popularly used for web mapping and is a decent choice for our purpose, so we can leave it to its defalt value. Go to Project ‣ New Print Layout.
../../_images/613.png

Note

For Japan, Japan Plane Rectangular CS is a projected coordinate reference system (CRS) that is designed for minimum distortions. It is divided in 18 zones and if you are working for a smaller region in Japan, using this CRS will be better.

  1. You will be prompted to enter a title for the layout. You can leave it empty and click Ok.
../../_images/712.png

Note

Leaving the layout name empty will assign a default name such as Layout 1.

  1. In the Print Layout window, click on Zoom full button to display the full extent of the Layout.
../../_images/812.png
  1. Now we would have to bring the map view that we see in the QGIS Canvas to the layout. Go to Add Item ‣ Add Map.
../../_images/912.png
  1. Once the Add Map mode is active, hold the left mouse button and drag a rectangle where you want to insert the map.
../../_images/1012.png
  1. You will see that the rectangle window will be rendered with the map from the main QGIS canvas. The rendered map may not be covering the full extent of our interest area. Use Edit ‣ Select/Move item and Edit ‣ Move Content options to pan the map in the window and center it in the composer.
../../_images/1115.png
  1. Let us also adjust the zoom level for the map. Click on the Item Properties tab and enter 10000000 as the Scale value.
../../_images/1213.png
  1. Now we will add a map inset that shows a zoomed in view for the Tokyo area. Before we make any changes to the layers in the main QGIS window, check the Lock layers and Lock styles for layers boxes. This will ensure that if we turn off some layers or change their styles, this view will not change.
../../_images/1313.png
  1. Switch to the main QGIS window. Turn off the layer group z5 - 1:18m and activate the z7 - 1: 4m group. This layer group has styling that is more appropriate for a zoomed-in view. Use the pan and zoom controls in the Map Navigation Toolbar and to zoom around Tokyo.
../../_images/1411.png
  1. We are now ready to add the map inset. Switch the the Print Layout window. Go to Add Item ‣ Add Map.
../../_images/1510.png
  1. Drag a rectangle at the place where you want to add the map inset. You will now notice that we have 2 map objects in the Print Layout. When making changes, make sure you have the correct map selected.
../../_images/1610.png
  1. Select the Map 2 object that we just added from the Items panel. Select the Item properties tab. Scroll down to the Frame panel and check the box next to it. You can change the color and thickness of the frame border so it is easy to distinguish against the map background.
../../_images/1710.png
  1. One neat feature of the Print Layout is that it can automatically highlight the area from the main map which is represented in the inset. Select the Map 1 object from the Items panel. In the Item properties tab, scroll down to the Overviews section. Click the Add a new overview button.
../../_images/189.png
  1. Select Map 2 as the Map Frame. This tells the Print Layout to highlight the current object Map 1 with the extent of the map shown in the Map 2 object.
../../_images/198.png
  1. Now that we have the map inset ready, we will add a grid to the main map. Select the Map 1 object from the Items panel. In the Item properties tab, scroll down to the Grids section. Click the Add a new grid button, followed by Modify grid....
../../_images/207.png
  1. By default, the grid lines use the same units and projections as the currently selected map projections. However, it is more common and useful to display grid lines in degrees. We can select a different CRS for the grid. Click on the Change... button next to CRS.
../../_images/2112.png
  1. In the Coordinate Reference System Selector dialog, enter 4326 in the Filter box. From the results, select the WGS84 EPSG:4326 as the CRS. Click OK.
../../_images/2210.png
  1. Select the Interval values as 5 degrees in both X and Y direction. You can adjust the Offset to change where the grid lines appear.
../../_images/237.png
  1. Scroll down to the Grid frame section and check the Draw coordinates box. The default format is Degrees but it appears as a number. We can customize is to append a ° symbol. Choose Custom and click the Expression button next to it.
../../_images/245.png
  1. Enter the following expression to create a string that takes the grid number and appends ° symbol to it.
concat(to_string(@grid_number), '°    ')
              
../../_images/254.png
  1. Notice that the grids now have a custom label from the expression. Adjust the position settings for Left, Right, Top and Bottom as per your liking.
../../_images/264.png
  1. Now we will add a Rectangluar frame to hold other map elements like north arrow, scale and label. Go to Add Item ‣ Add Shape ‣ Add Rectangle.
../../_images/274.png
  1. You can change the Style of the rectangle to match the map background.
../../_images/284.png
  1. Now we will add a North Arrow to the map. QGIS comes with a nice collection of map-related images - including many types of North Arrows. Click Add Item ‣ Add Picture.
../../_images/293.png
  1. Holding your left mouse button, draw a rectangle. On the right-hand panel, click on the Item Properties tab and expand the Search directories section and select the image of your liking.
../../_images/303.png
  1. Now we will add a scale bar. Click on Add Item ‣ Add Scalebar.
../../_images/3110.png
  1. Click on the layout where you want the scalebar to appear. In the Item Properties tab, make sure you have chosen the correct map element Map 1 for which to display the scalebar. Choose the Style that fit your requirement. In the Segments panel, change the Fixed width to 200 units and adjust the segments to your liking.
../../_images/327.png
  1. It is time to label our map. Click on Add Item ‣ Add Label.
../../_images/331.png
  1. Click on the map and draw a box where the label should be. In the Item Properties tab, expand the Label section and enter a label for the map. Similarly add another labels for data and software credits.
../../_images/341.png
  1. Once you are satisfied with the map, you can export it as an Image, PDF or SVG. For this tutorial, let’s export it as an image. Click Layout ‣ Export as Image.
../../_images/351.png
  1. Save the image in the format of your liking. Below is the exported PNG image.
../../_images/output.png



Tutorial 2: Working with Attributes

GIS data has two parts - features and attributes. Attributes are structured data about each feature. This tutorial shows how to view the attributes of a GIS vector layer and do basic queries on them in QGIS.

Overview of the task

The dataset for this tutorial contains information about populated places of the world. The task is to query and find all the capital cities in the world that have a population greater than 1 million and save the resulting subset as a GeoJSON file.

Other skills you will learn

  • Select features from a layer using expressions.
  • Using the Attributes toolbar.
  • Exporting selected features in a layer

Get the data

Natural Earth provides a Populated Places dataset. Download the simple (less columns) dataset

For convenience, you may directly download a copy of datasets from the link below:

ne_10m_populated_places_simple.zip

Data Source [NATURALEARTH]

Procedure

  1. Locate the ne_10m_populated_places_simple.zip file in the QGIS Browser and expand it. Select the ne_10m_populated_places_simple.shp file and drag it to the canvas.
../../_images/1130.png
  1. A new layer ne_10m_populated_places_simple will now be loaded in QGIS and you will see many points representing the populated places of the world. The default view in the QGIS canvas shows the geometry of the GIS layer. Each point also has associated attributes. Let’s view them. Locate the Attributes Toolbar. This toolbar contains many useful tools to inspect, view, select, and modify attributes of a layer.
../../_images/280.png

Note

If you do not see the toolbar, you can enable it from View ‣ Toolbars ‣ Attributes Toolbar

  1. Click the Identify button on the Attributes Toolbar. Once the tool is selected, click on any point on the canvas. The associated attributes of that point will be displayed in a new Identify Results panel. Once you are done exploring attributes of different points, you can click the Close button.
../../_images/344.png
  1. Rather than viewing the attribute one feature at a time, we can view them all together as a table. Click the Open Attribute Table button on the Attributes Toolbar. You can also right-click the ne_10m_populated_places_simple layer and select Open Attribute Table.
../../_images/428.png
  1. You can scroll horizontally and locate the pop_max column. This field contains the population of the associated place. You can click twice on the field header to sort the column in descending order.
../../_images/528.png
  1. Now we are ready to perform our query on these attributes. QGIS uses SQL-like expressions to perform queries. Click Select features using an expression button.
../../_images/627.png
  1. In the Select By Expression window, expand the Fields and Values section and double-click the pop_max label. You will notice that it is added to the expression section at the bottom. If you aren’t sure about the field values, you can click the All Unique button to see what the attribute values are present in the dataset. For this exercise, we are looking to find all features that have a population greater than 1 million. So complete the expression as below and click Select Features and then Close.
"pop_max" > 1000000
              
../../_images/727.png

Note

In the QGIS Expression engine, text with double-quotes refers to a field and text with single-quotes refer to a string value.

  1. You will notice that some rows in the attribute table are now selected. The label window also changes and shows the count of selected features.
../../_images/826.png
  1. Close the attribute table window and return to the main QGIS window. You will notice that a subset of points is now rendered in yellow. This is the result of our query and the selected points are the ones having pop_max attribute value greater than 1000000.
../../_images/927.png
  1. Let’s update our query to include a condition that the place should also be a capital in addition to having a population greater than 1 million. To quickly get to the expression editor, you can use the Select Features by Expression button in the Attributes Toolbar.
../../_images/1025.png
  1. The field containing data about capitals is adm0cap. The value 1 indicates that the place is a capital. We can add this criteria to our previous expression using the and operator. Enter the expression as below and click Select features and then Close.
"pop_max" > 1000000 and "adm0cap" = 1
              
../../_images/1131.png
  1. Return to the main QGIS window. Now you will see a smaller subset of the points selected. This is the result of the second query and shows all places from the dataset that are country capitals as well as have population greater than 1 million.
../../_images/1227.png
  1. Now we will export the selected features as a new layer. Right-click the ne_10m_populated_places_simple layer and go to Export ‣ Save Selected Features As...
../../_images/1327.png
  1. You may choose any format of your liking as the Format. For this exercise, we will choose GeoJSON. GeoJSON is a text-based format that is used widely in web mapping. Click the ... button next to File name and enter populated_capitals.geojson as the output file.
../../_images/1425.png
  1. The input data has many columns. You are able to choose only a subset of the original columns for export. Expand the Select fields to export and their export options section. Click Deselect All and check the name and pop_max columns. Click OK.
../../_images/1524.png
  1. A new layer populated_capitals will be loaded in QGIS. You can un-check the ne_10m_populated_places_simple layer to hide it and view the points from the newly exported layer.
../../_images/1622.png



Tutorial 3: Basic Vector Styling (QGIS3)

To create a map, one has to style the GIS data and present it in a form that is visually informative. There are a large number of options available in QGIS to apply different types of symbology to the underlying data. In this tutorial, we will take a text file and apply different data visualization techniques to highlight spatial patterns in the data.

Overview of the task

We will take a CSV file containing the location of all power plants in the world and create a visualization showing distribution of renewable and non-renewable fuels used in these power plants.

Other skills you will learn

  • Use expressions to group multiple attribute values into a single category

Get the data

World Resources Institute has compiled a comprehensive, open source database of power plants around the world covering over 30000 plants. Download the The Global Power Plant Database from the WRI Open Data Portal.

Natural Earth has several global vector layers. Download the 10m Physical Vectors - Land containing Land polygons.

For convenience, you may directly download a copy of the above layers from below:

globalpowerplantdatabasev120.zip

ne_10m_land.zip

Data Source [WRI] [NATURALEARTH]

Procedure

  1. Unzip both the datasets to a folder on your computer. In the QGIS Browser Panel, locate the directory where you extracted the data. Expand the ne_10m_land folder and select the ne_10m_land.shp layer. Drag the layer to the canvas.
../../_images/114.png
  1. You will a new layer ne_10m_land added to the Layers panel. The global power plant database comes as a CSV file, so we will need to import it. Click the Open Data Source Manager button on the Data Source Toolbar. You can also use Ctrl + L keyboard shortcut.
../../_images/213.png
  1. In the Data Source Manager window, switch to the Delimited Text tab. Click the ... button next to File name and browse to the directory where you extracted the globalpowerplantdatabasev120.zip file. Select the global_power_plant_database.csv. QGIS will auto detect the delimiter and geometry fields. Leave the Geometry CRS to the default value of EPSG:4326 - WGS84. Click Add followed by Close.
../../_images/312.png
  1. A new layer global_power_plant_database will be added to the Layers panel and you will see the points representing the power plants in the canvas. Now we are ready to style both these layers. Click the Open the Layer Styling panel button at the top of the Layers panel.
../../_images/44.png
  1. The Layer Styling panel will open on the right. Select the ne_10m_land layer first. This will be our base layer so we can keep the styling minimalistic so it is not distracting. Click Simple fill and scroll down. Select a Fill color as per your liking. Click the drop-down next to Stroke color and select Transparent Stroke. This will set the outlines of the land polygons to be transparent. You will see the result of your selection applied immediately to the layer.
../../_images/54.png
  1. Next select the global_power_plant_database layer. Click on Simple marker and scroll down. Pick a triangle marker.
../../_images/64.png
  1. Scroll up and select a Fill color of your liking. A useful cartographic technique is to choose a slightly darker version of the fill-color as the Stroke color. Rather than trying to pick that manually, QGIS provides an expression to control this more precisely. Click the Data defined override button and choose Edit.
../../_images/74.png
  1. Enter the following expression to set the color to be 30% darker shade than the fill color and click OK.
darker(@symbol_color, 130)
              
../../_images/84.png

Note

Note that this expression is independent of the fill color you have chosen. You will see that this is immensely useful in the following steps where it automatically sets the border color based on the fill color provided.

  1. You will notice that the Data defined override button next to Stroke color has turned yellow - indicating than this property is controlled by an override. A single symbol rendering of the power plants layer is not very useful. It doesn’t convey much information except the locations of the power plants. Let’s use a different renderer to make it more useful. Click the Symbology drop-down and select Categorized renderer.
../../_images/94.png
  1. The global_power_plant_database layer contains an attribute indicating the primary fuel used in each power plant. We can create a style where each unique fuel type is shown in a different color. Select primary_fuel as the Column. Click Classify. You will multiple categories appear and the map rendering change accordingly.
../../_images/104.png
  1. While a Categorized view is useful, this layer contains too-many categories for one to meaningfully interpret the map. A better approach would be to group certain type of fuel categories and reduce the number of classes. Let’s try to create 3 categories - Renewable fuel, Non-renewable fuel and Other. Select Rule-based renderer. Select all but one rules by holding the Ctrl key and clicking on each row. Once selected, click the Remove selected rules button to delete them.
../../_images/115.png
  1. Select the remaining rule and click Edit current rule.
../../_images/124.png
  1. Enter Renewable fuel as the Label. Click the Expression button next to Filter.
../../_images/134.png
  1. In the Expression String Builder dialog, enter the following expression and click OK. Here we are grouping multiple renewable energy categories into a single category.
"primary_fuel" IN ('Biomass', 'Geothermal', 'Hydro', 'Solar', 'Wind', 'Storage', 'Wave and Tidal')
              
../../_images/144.png

Note

The types of fuel chosen for renewable vs. non-renewable categories is based on Wikipedia. There are alternate definitions and classifications that may not match what is chosen here.

  1. Scroll down and click Simple marker. Choose an appropriate Fill color. Once done, click the Back button.
../../_images/154.png
  1. You will see a single rule being applied to the layer for the Renewable fuel category. Right-click the row and choose Copy. Right-click again and choose Paste.
../../_images/164.png
  1. A copy of the existing rule will be added. Select the newly added row and click Edit current rule.
../../_images/174.png
  1. Enter Non-renewable fuel as the Label. Click the Expression button next to Filter.
../../_images/183.png
  1. In the Expression String Builder dialog, enter the following expression and click OK.
"primary_fuel" IN ('Coal', 'Gas', 'Nuclear', 'Oil', 'Petcoke')
              
../../_images/193.png
  1. Scroll down and click Simple marker. Choose an appropriate Fill color. Once done, click the Back button.
../../_images/202.png
  1. Repeat the Copy/Paste process to add a third rule. Select it and click Edit current rule.
../../_images/214.png
  1. Enter Other as the Label. Choose Else - Catch all for other features instead of a Filter. This will ensure that any category missed in the previous 2 rules, will be styled by this rule. Scroll down and click Simple marker. Choose an appropriate Fill color. Once done, click the Back button.
../../_images/222.png
  1. The re-categorization is complete now. You will see a much cleaner view that shows the distribution of renewable vs. non-renewable fuel sources used by power plants and their distribution across countries. This however doesn’t give a complete picture. We can add another variable to the styling. Rather than displaying all markers with uniform size, we can show the sizes proportional to the power generation capacity of each plant. This cartography technique is called Multivariate mapping. Right-click the Renewable fuel rule and select Change Size.
../../_images/231.png
  1. Click the Data defined override button next to Size. Select Edit.
../../_images/241.png
  1. As the power generation capacity varies a lot among our dataset, an effective way to get a a small range for size is using the log10 function. You can experiment with different expressions to arrive at what works best for your preferred visualization. Enter the following expression and click OK.
log10("capacity_mw") + 1
              
../../_images/251.png
  1. Repeat the same process for other rules.
../../_images/261.png
  1. Once satisfied, you can close the Layer Styling panel.
../../_images/271.png
  1. Looking at our final visualization, you can immediately see the patterns in the dataset. For example, over Europe there are more power plants that use renewable energy source, but they are lower capacity than the plants that use non-renewable energy source.
../../_images/281.png



Tutorial 4: Performing Spatial Joins (QGIS3)

Spatial Join is a classic GIS problem - transferring attributes from one layer to another based on their spatial relationship. In QGIS, this functionality is available through the Join attributes by location Processing algorithm.

Overview of the task

We will use 2 layers - A shapefile of Borough boundaries of New York city and another shapefile of Street Pavement Rating for all streets in New York city. The first task will be to find the average rating of streets in each of the borough using a spatial join with summary algorithm. The second task will be to add the name of the borough to the street features through a one-to-many spatial join.

Other skills you will learn

  • Creating filters to temporarily exclude certain features from computation.

Get the data

NYC Open Data Portal is an excellent source of free data for New York city.

Download the Borough Boundaries zip file using the Export option on the portal.

../../_images/data11.png

Download the Street Pavement Rating zip file using the Export option on the portal.

../../_images/data2.png

For convenience, you may directly download a copy of the datasets from the links below:

nybb_19a.zip

V_SSS_SEGMENTRATING_1.zip

Data Source [CITYOFNY]

Procedure

  1. Locate the nybb_19a.zip file in the QGIS Browser and expand it. Select the nybb_19a/nybb.shp layer and drag it to the canvas. This is a polygon layer representing the borough boundaries in New York city.
../../_images/1100.png
  1. Next, locate the V_SSS_SEGMENTRATING_1.zip file and expand it. Select the dot_V_SSS_SEGMENTRATING_1_20190129.shp layer and add it to the canvas. This is a line layer of all streets in the city.
../../_images/249.png
  1. Let’s examine the attributes available for each feature of the dot_V_SSS_SEGMENTRATING_1_20190129 layer. Right-click and select Open Attribute Table.
../../_images/332.png
  1. You will notice the attribute called Rating_B which has values in the range 0-10 representing the street segment’s rating. The attribute RatingWord has descriptive rating. We can use the Rating_B field to calculate the average rating.
../../_images/417.png
  1. You may have notice some features have a rating of NR. These are the segments that were not rated. Including them in our analysis will not be correct. Before we do the spatial join, let’s set up a Filter to exclude these records. Right-click the dot_V_SSS_SEGMENTRATING_1_20190129 layer and select Filter.
../../_images/517.png
  1. In the Query Builder, type the following expression to select all records that are not rated NR. You can also build the expression interactively by clicking on Field, Operator and selecting the appropriate Value. Click OK.
"RatingWord" != 'NR'
              
../../_images/617.png
  1. You will notice the dot_V_SSS_SEGMENTRATING_1_20190129 layer now has a filter icon indicating that there is an active filter applied to this layer. Now we can do a spatial join using this layer. Go to Processing ‣ Toolbox.
../../_images/716.png
  1. Search and locate the Vector general ‣ Join attribute by location (summary) algorithm. Double-click to launch it.
../../_images/816.png
  1. In the Join attribute by location (summary) dialog, select nybb as the Input layer. The street layer dot_V_SSS_SEGMENTRATING_1_20190129 will be the Join layer. You can leave the Geometry predicate to the default Intersects. Click the ... button next to Fields to sumarize.
../../_images/916.png

Note

A tip to help you select the correct input and join layers: The input layer is the one that will be modified will new attributes in the spatial join. As we want the average rating field to be added to the borough layer, it will be the input layer.

  1. Select Rating_B and click OK.
../../_images/1016.png
  1. Similarly, click the ... button next to Summaries to calculate.
../../_images/1119.png
  1. Select mean as the summary operator and click OK. Now we are ready to start the processing. Click Run.
../../_images/1217.png
  1. The processing algorithm will work through the features and apply the spatial join. Verify that the processing job was successful and click Close.
../../_images/1317.png
  1. Back in the main QGIS window, you will see a new Joined layer layer added to canvas. Open the attribute table for this layer. You will see a new column Rating_B_mean is added to the input borough layer with the average rating of all streets that are interesecting with that feature.
../../_images/1415.png
  1. Now we can perform a reverse operation. Sometimes your analysis requires getting attributes from another layer based on the spatial relationship but not compute any summary. We can use the Join attribute by location algorithm for such analysis. The task is to add the name of the borough to each feature in the streets layer based on which borough polygon it intersects with. Before we run this algorithm, let’s remove the filter from the dot_V_SSS_SEGMENTRATING_1_20190129 layer. Click the filter icon and press the Clear in the Query Builder. Click OK.
../../_images/1514.png
  1. Turn of the Joined layer in the Layers panel. Find the Vector general ‣ Join attribute by location algorithm in the Processing Toolbox and double-click it to launch.
../../_images/1614.png
  1. Select dot_V_SSS_SEGMENTRATING_1_20190129 as the Input layer and nybb as the Join layer. You can leave the Geometry predicate to the default Intersects. Click the ... button next to Fields to add and select BoroName. Click OK.
../../_images/1714.png
  1. The line segment may cross a borough boundary, so we choose the Join type as Crate separate feature for each located feature (one-to-many). Click Run.
../../_images/1813.png
  1. Once the processing finishes, open the attribute table of the newly added Joined layer. You will see that there is a new BoroName attribute added to each street feature.
../../_images/1912.png



Assignment

The traffic department in the municipality of Norrköping is continuously monitoring accidents in order to make necessary improvements in the traffic environment. Your task is to make a couple of simple aggregations of collected data from 1999 and show the result on a map.

Open the map from this zip-archive in QGIS. You will see a map of Norrköping and a layer with traffic accidents.

The first task is do make a selection of all accidents with type = car (bil) and export it to a new layer. Remove the original layer. The next task is to calculate the number of car accidents in each city district.

Tip

Use join attributes based on spatial location (summary) to generate a new column in the table containing the needed numbers. To reduce the number of added columns you may choose to select only one field to summarise and select only "count" summary to calculate.

Show each car accident and the number of accidents per district with different colors and/or numbers in a map window on a map layout. The map should show the central parts of Norrköping and the scale must be 1:20 000. Other information on the layout shall be a legend, a north arrow, scale text, scale bar and your name. The stream through Norrköping must be shown on the map for orientation. Select the water from the land use layer (try different values of attribute "TYP" until you find the needed one) and export it to a new layer which can be placed above the city districts (use appropriate blue color for this layer).

Tip

Please refer to https://docs.qgis.org/3.4/en/docs/training_manual/map_composer/map_composer.html for an instruction on how to create and modify legend.

Update: Fixing the map scale

The data provided for the assignment has wrong Project Coordinate System selected which causes issues with scale (1:20000 scale is far too close). This can easily be fixed in a matter of seconds. Go to Project ‣ Properties. Select CRS tab. Uncheck No CRS (or unknown/non-Earth projection). Then in the Filter field enter "EPSG:3847", select "SWEREF99/RT90 2.5 gon V emulation" (as shown on the picture below) and click "OK".
Setting the project CRS
After that, in the main window of QGIS select all layers using "Shift" button, right-click, Set CRS ‣ Set Layer CRS.... In the window which appears select again "SWEREF99/RT90 2.5 gon V emulation" and click "OK". Then the scale should be working as intended.
Selecting all layers
Selecting CRS for layers



Tutorials 1, 2, 3 and 4 are a courtesy of QGIS tutorial by Ujaval Gandhi and shared here in accordance with CC-BY 4.0 license under the same license. Thank you, Ujaval Gandhi!