MapTime Melbourne: QGIS Workshop

QGIS (The Q is short for Quantum) is an open-source Geographic Information System (GIS) freely downloadable and usable by anyone, produced and developed by the OSGeo community

Installing and Opening QGIS

  • Install QGIS onto your desktop/laptop (you should have done this before the tutorial)
  • Open QGIS. The interface should look something like this:

[Click to Enlarge]

  • Download the following file: Melbourne Mesh Block Zip File
  • Unzip the downloaded making sure that the five files remain in the same location
  • We will add this file to our session by browsing to it (Layer → Add Layer → Add Vector Layer) as shown in the images below

[Click to Enlarge]

[Click to Enlarge]

  • Once you have added this dataset you should see something like the image below

[Click to Enlarge]

  • Now that the file has been pulled into your session, you can zoom in on an area by selecting the (+) magnifying icon and dragging it over the area you want to look at. You can also use the pan icon (represented by a hand) to move around the map and look at a specific location on the map.

Exploring the Attributes and Colouring by an Attribute

  • In addition to the map that you see on the screen, each vector dataset has an associated file of information, often called the Attribute Table. Each row in an attribute table refers to a feature in our file – in this instance, a meshblock – and each column represents a field of information about that particular feature.
  • Now we want to have a look at the attributes of the shapefile. To do this, right click on the layer (it will be under the layers panel on the left) and click on Open Attribute Table 

[Click to Enlarge]

  • This will bring up an attribute table that looks something like the image below. Each row represents a single meshblock within the Greater Melbourne Capital City Statistical Area. If you scroll along you can see the codes of the SA1s, SA2s, SA3s, SA4s, GCCSA and State that contain that Meshblock

[Click to Enlarge]

  • The Attribute table can be quite a useful means of exploring the information in a shapefile, but for now we we will close out of it.
  • Now we will colour the meshblocks by their specific land use categories. To do this, we will do a Categorical Symbology where each of the colours on the map represents a specific land use category associated with that meshblock
  • Right click again on the layer and select Properties
  • Select the Symbology tab on the left
  • Select the drop down box on the top left and select Categorized 
  • Under the Column drop down, select MB_CAT16
  • Click the Classify Button

[Click to Enlarge]

  • Click Ok
  • Your map should look something like the image below.

[Click to Enlarge]

  • We have just visualised each of the meshblocks within the greater Melbourne area by their land use category (Residential, Commercial etc). However this is quite difficult to see, particularly for the inner parts of the city, so zoom in and pan around an area of inner city Melbourne and have a look at the land use classifications

[Click to Enlarge]

Calculating a New Attribute

  • We will now calculate population density for all of the meshblocks, creating a new field in our attribute table, and doing a calculation to generate our values.
  • To do this we need to first ensure that the dataset is able to be edited and changed. At the moment, we have it open and viewable, but we are not able to modify, edit or delete any records. To turn editing on, click the pencil icon on the top left. You will notice the image turns bright red – if you are zoomed in enough, you will see that these red points are the vertices of every polygon in the dataset
  • Click the abacus icon on the top right (Open Field Calculator)
  • Ensure the Create new field box is checked
  • In Output field name type POPN_DENS
  • For Output field width and Precision ensure 10 and 5 are selected (this means that the
  • We now want to specify an equation for this field. This will be total population divided by area. In the attribute table, total population is held in the column named Person (Total Usual Residential Population 2011). The Area is held in the field named AREASQKM16
  • in the Expression window type in the following equation (or copy and paste):

"Person"/("AREASQKM16"*100)

  • This specifies that the field will be the total usual residential population, divided by the area of the meshblock in hectares (1ha = 10,000m2)

[Click to Enlarge]

  • Click OK
  • This will run and then create a new field called POPN_DENS
  • Close the the attribute table, and click the pencil button again to save your edits
  • Open the layer properties again (right click layer, click Properties and select Symbology)
  • Select the drop down box on the top left and select Graduated
  • Under the Mode  drop down, select Quantile (Equal Count)
  • Click the Symbol – Change option
  • Under Fill click Simple Fill
  • For the Border Style drop down select No Pen
  • Click Ok
  • Click the Classify Button
  • Click Ok

[Click to Enlarge]

Your map should look something like the following

[Click to Enlarge]

  • This is the population density of Melbourne mapped. Zoom in and explore the distribution of density across Melbourne. You can zoom in and pan around to see how density changes across the metro region

[Click to Enlarge]

Accessing AURIN Data via the AURIN Open API

  • In your QGIS session, go to LayerAdd LayerAdd WFS Layer drop-down menu
  • [Click to Enlarge]

  • Click on the New button, and create a new connection naming it something such as AURIN Open API, and entering the following url when prompted

http://45.113.233.121/wfs

[Click to Enlarge]

  • Click Connect
  • Enter your credentials (Apply at the AURIN API Signup page if you don’t have credentials yet) and Click OK. For the purposes of this excercise we will use the Open API credentials:


Username: commercial
key: z3889U*UXM

[Click to Enlarge]

  • This will take a little bit of time before a table of data comes up that you can add to your session. In this table, use “Tram” as a key word and filter out the datasets so that you have a manageable number to add to your session. Highlight the following and add them to your session

[Click to Enlarge]

  • Your Map should now have AURIN data from the API in it

[Click to Enlarge]