Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping...
Transcript of Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping...
![Page 1: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/1.jpg)
Instructions for mapping census data in Qgis
1) Open Qgis
2) Select the “Add Vector Layer” icon to import boundary file that contains tracts called
dissemination areas
3) Select the icon in the “Layers Panel” to the left, and from the short-cut menu select the
“attribute table” that contains the data behind the map.
![Page 2: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/2.jpg)
![Page 3: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/3.jpg)
4) Select the “Add Delimited Text Layer” icon to pull in the csv file.
5) Browse for the csv file (DwellingCounts_2016_csv), which also contains an accompanying csvt
file that we created in the previous exercise.
![Page 4: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/4.jpg)
6) Open the attribute table, which will take a few seconds because of its size.
7) Now, before we go any further, let’s compare the table to the attribute table for the boundary
layer that we saw in step three. You’ll notice that the first column in each table have identical
census codes. And, because the numbers are left-justified, Qgis has formatted them as text,
![Page 5: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/5.jpg)
which is crucial when completing our join. That is, in order to perform a physical join in Qgis ( as
is the case in a database manager program like MySQL ), the values must match; in this case,
they are the same census values formatted as text.
8) Close the attribute table, and select the boundary layer.
9) Right-click to obtain the short-cut menu, and choose the “Properties” option.
![Page 6: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/6.jpg)
10) Select “Joins”.
![Page 7: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/7.jpg)
11) Select the green plus sign.
12) We’ll use the “Add vector join” dialog box to join the two columns mentioned in step seven.
Click on the downward arrow to the right of the rectangular box to the right of the “Join Field”
![Page 8: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/8.jpg)
option, and select the first column, “Geographic code”.
13) The boundary layer that we highlighted at the beginning of this join exercise is the layer that
contains the “Target field”. So repeat the same process to obtain the field or column that we’ll
![Page 9: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/9.jpg)
be using in the join, which in this case is also the first one.
![Page 10: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/10.jpg)
14) Select the OK tab.
15) Becaue Qgis has competed the join, as you can see in the highlighted section, you can select the
OK.
![Page 11: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/11.jpg)
16) To confirm that Qgis has performed the join, right click on the boundary layer to obtain the
attribute table, which will take a few seconds to appear due to the size of the file.
17) Once the table appears, use the horizontal scroll bar at the bottom to navigate to the right,
where you should see the additional columns from your dwelling counts file.
18) Now we might not be interested in the entire country. Instead, we may only be concerned about
the country’s hottest markets, Vancouver and Toronto.
![Page 12: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/12.jpg)
19) Select the icon above the “CMATYPE” column, called the “Select features using an expression”
icon.
![Page 13: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/13.jpg)
20) Select “Fields and Values”, which produces a drop-down menu with the fields in the attribute
table.
![Page 14: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/14.jpg)
21) Double-click on “CSDNAME”.
22) In the space to the left, you’ll notice the beginnings of a query that will make more sense once
you learn a bit about MySQL.
23) Click the equal sign icon “=”.
![Page 15: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/15.jpg)
24) Type “Toronto”, make sure it’s surrounded by single quotation marks.
25) Place your cursor on the “Select” tab at the bottom right-hand corner of the “Select by
expression” dialog box, click the arrow.
26) Chose the highlighted option, and then the “Close” tab.
![Page 16: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/16.jpg)
27) Use the vertical scroll bar to the far right of the attribute table to scroll down, where you’ll
notice that the Toronto locations are highlighted in blue.
28) Close the attribute table.
![Page 17: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/17.jpg)
29) Right-click on the boundary layer in the “Layer’s Panel” to obtain the short-cut menu.
![Page 18: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/18.jpg)
30) Select the “Save As” option.
![Page 19: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/19.jpg)
31) Browse to the location that contains the files for this map, save the new layer and give it a
name.
![Page 20: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/20.jpg)
32) Saving the file, returns us to t he “Save vector layer as” dialog box.
![Page 21: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/21.jpg)
33) Under the “Encoding” section, check the box to the left of the “Save only selected features”
option.
![Page 22: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/22.jpg)
34) Select the OK tab.
35) De-select the original boundary file layer.
36) I the new layer only appears as a small dot, right-click on the new layer, and from the short-cut
menu, select the “Zoom to Layer” option.
![Page 23: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/23.jpg)
![Page 24: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/24.jpg)
37) Right-click on the new layer to option the “Properties” option.
![Page 25: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/25.jpg)
38) Select “Style”
39) Select the “Graduated” option from the drop-down menu
![Page 26: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/26.jpg)
40) Select the “Dwelling_3” option from the drop-down menu to the right of the “Count” box.
41) Select the “Classify” tab.
42) Qgis has divvied up the values into five “classes” or categories, which is its default position.
![Page 27: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/27.jpg)
43) We can change the number of categories, by clicking on one of the arrows to the right of the
“Classes” box to the far right of the “Classify” tab.
44) Qgis also classifies the values in equal intervals. To select your own intervals, you can click on
the “arrow” to the right of the “Mode” tab just above the “Classify” tab to select a different
option. For now, let’s just stick with what we have.
45) Select “Apply”, and then “OK”.
![Page 28: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/28.jpg)
46) The darker areas are the locations that have the greatest number of unoccupied dwellings. You
can zoom into those locations by selecting the icon containing a plus sign in a magnifying glass.
![Page 29: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/29.jpg)
47) Once you’ve selected the icon, draw a square around the area you want to zoom.
48) To see what’s in the area, select the “Identify Features” icon to the right of the zoom icon we
just used.
![Page 30: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/30.jpg)
49) Click on the darker of the two areas to see the results in the left.
50) “Dwelling_3” 1,436, the number of unoccupied dwellings in that census tract.
51) We can also change the names to labels that make more sense using alias.
![Page 31: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/31.jpg)
52) To do this, right click on our new layer, select the “Properties”, and then “Fields”.
![Page 32: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/32.jpg)
![Page 33: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/33.jpg)
53) Find the “Dwelling_3” field, double-click inside the “Alias” column, and type a new name.
54) We can also do this for any of the other fields, but let’s just stick with this one for now. Select
“Apply”, and then “OK”.
![Page 34: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/34.jpg)
55) Re-select the same census tract.
56) Great work.
57) We can also import a basemap to give our visualization a sense of place. To import a basemap,
go to the “Web” portion of your menu to the “OpenLayersPlugin” option and select “Google
Streets” in “Google Maps”
58) Now it’s time to export this creation and display for the world to see.
59) Right-click on the new layer, and save it as a “KML” file, (which stands for Keyhole Markup
Language) file, the format Google uses.
![Page 35: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/35.jpg)
60) Save the new layer as a KML file and upload it to Google Fusion Table.
![Page 36: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/36.jpg)
61) Go to the Fusion Table icon on your Google Drive.
62) If you don’t have Fusion Tables, you’ll have to download it, by clicking on “Connect more apps”.
![Page 37: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/37.jpg)
63) Click the Fusion Table app.
![Page 38: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/38.jpg)
64) Browse for your KML file, select it and go to the next step.
![Page 39: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/39.jpg)
![Page 40: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/40.jpg)
65) Select “Finish”.
![Page 41: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/41.jpg)
66) Select the “Map of geometry” tab at the top right to see the map.
![Page 42: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/42.jpg)
67) As was the case in Qgis, it is all one, uniform colour. To obtain a similar colour ramp, select the
“Change feature styles” tab to the left.
![Page 43: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/43.jpg)
68) Under the “Polygons” section, select the “Gradient” option.
![Page 44: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/44.jpg)
69) The column we’ll use for the gradient is the same one we used in Qgis, Dwelling_3. You’ll note
that Fusion Tables does not retain the alias. However, we can change the name of this column,
by clicking on the “Change info window” tab to the left.
![Page 45: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/45.jpg)
70) Select the “Automatic legend”, and save the result.
71) Click on the “Change info window” tab.
![Page 46: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/46.jpg)
72) We can de-select the columns that we don’t want to see in the pop-up box, or we create new,
and more meaningful labels by selecting the “Custom” option.
![Page 47: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/47.jpg)
73) Highlight “Dwelling_3” and rename it, “Unoccupied dwellings”, save the result, return to the
map and click on one of the census tracts.
74) Using the same steps as above, we can further clean up this pop-up box by giving it a title,
renaming “Dwelling_4” to something like “Percent of unoccupied dwellings”, etc.
![Page 48: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/48.jpg)
75) If you’re happy with the result, you can share it by selecting the “Share” tab to the top right.
![Page 49: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/49.jpg)
76) Change the “Private” access to “Anyone with the link”.
![Page 50: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/50.jpg)
77) Save, go to “Tools” and select the “Publish” option.
78) You can change the width and height, but let’s stick with these dimensions.
79) Select and copy, the HTML embed, which can pasted into your blog. Or you can simply share
the link.
![Page 51: Instructions for mapping census data in Qgis Census Tracts Tutorial.pdf · Instructions for mapping census data in Qgis 1) Open Qgis 2) ... “attribute table” that contains the](https://reader035.fdocuments.in/reader035/viewer/2022063011/5fc5a2c1d9487d6a362e4841/html5/thumbnails/51.jpg)
80) Well done!!