16
Getting Started with ArcGIS Module 3 - Thematic mapping and attribute data

ArcGIS Getting Started with - University of Torontomaps.library.utoronto.ca/workshops/ArcGISintro/03...1 1 - Start a new map (see Module 2 page 2 step 1) 2 - Make sure you have the

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: ArcGIS Getting Started with - University of Torontomaps.library.utoronto.ca/workshops/ArcGISintro/03...1 1 - Start a new map (see Module 2 page 2 step 1) 2 - Make sure you have the

Getting Started with ArcGIS

Module 3 - Thematic mapping and attribute data

Page 2: ArcGIS Getting Started with - University of Torontomaps.library.utoronto.ca/workshops/ArcGISintro/03...1 1 - Start a new map (see Module 2 page 2 step 1) 2 - Make sure you have the

In this module you will learn how to:

● Manipulate and add data fields● Create attribute joins● Symbolize data using statistics● Calculate population density in Toronto by

Ward

Page 3: ArcGIS Getting Started with - University of Torontomaps.library.utoronto.ca/workshops/ArcGISintro/03...1 1 - Start a new map (see Module 2 page 2 step 1) 2 - Make sure you have the

11 - Start a new map (see Module 2 page 2 step 1)

2 - Make sure you have the Toronto Wards layer, icitw_wgs84.shp shapefile, loaded in your Data View.

3 - Right-click on the layer in the Table of Contents and select Open Attribute Table.

4 - You should notice that each ward is represented in the table, but that there is little information on each ward.*

5 - We must then join information to each of the wards.

6 - On the city of Toronto’s Open Data Catalogue site you will find ward profiles spreadsheets which contain demographic information for each ward. You can find the spreadsheet here: http://tinyurl.com/ld3qy82 Download this 2011 census spreadsheet http://tinyurl.com/n7zmfd8 and open it in Microsoft Excel.

7 - Unfortunately, this spreadsheet is not formatted properly to be read in ArcGIS. ArcGIS requires very structured data in order to be able to take advantage of the mapping capabilities of the software.

Page 4: ArcGIS Getting Started with - University of Torontomaps.library.utoronto.ca/workshops/ArcGISintro/03...1 1 - Start a new map (see Module 2 page 2 step 1) 2 - Make sure you have the

21 - Close the excel spreadsheet and open the file called Ward_Profiles_formated.csv in the main gis_workshop folder by right-clicking and opening it in Microsoft Excel.

2 - You will notice that the ward numbers are all in one column and all attributes are in separate columns.

3 - Take note that there is a column called Total Population.

4 - We will now open this formatted file inside ArcMap and join it to our wards shapefile.

Page 5: ArcGIS Getting Started with - University of Torontomaps.library.utoronto.ca/workshops/ArcGISintro/03...1 1 - Start a new map (see Module 2 page 2 step 1) 2 - Make sure you have the

31 - Close the Excel spreadsheet software. *Note* that ArcMap will not open a file if it is already open in another application.

2 - In ArcMap, open the Ward_Profiles_formated.csv as you would any other GIS file with the add data icon.

3 - Right-click on the Ward_Profiles_formatted.csv file in the Table of Contents and select Open.

4 - Examine closely the Ward column (field) and examine the SCODE_NAME field in the icitw_wgs84.shp shapefile. Notice that they represent wards in numeric format, but notice that the field in the ward profile file is using numeric notation for the fields and the shapefile is using a text field (01, 02, etc.). This represents a bit of a problem as both fields must be exactly the same

Page 6: ArcGIS Getting Started with - University of Torontomaps.library.utoronto.ca/workshops/ArcGISintro/03...1 1 - Start a new map (see Module 2 page 2 step 1) 2 - Make sure you have the

41 - To verify that the two fields are not the same, right-click on the icitw_wgs84.shp shapefile and select properties. Select the Fields tab, then click on SCODE_NAME. You will notice that this field is a text data type field.

2 - Repeat the same steps for the Ward_Profiles_formatted.csv file and the Ward field. You will notice that the field is a numeric Long data type field, which is a numeric field.

3 - Here is a list of field types used in ArcMap TEXT —Names or other textual qualities.FLOAT —Numeric values with fractional values within a specific range.DOUBLE —Numeric values with fractional values within a specific range.SHORT —Numeric values without fractional values within a specific range; coded values.LONG —Numeric values without fractional values within a specific range.DATE —Date and/or Time.BLOB —Images or other multimedia.RASTER —Raster images.GUID —GUID values

Page 7: ArcGIS Getting Started with - University of Torontomaps.library.utoronto.ca/workshops/ArcGISintro/03...1 1 - Start a new map (see Module 2 page 2 step 1) 2 - Make sure you have the

51 - In order for our join between the shapefile and the text file (csv) to work, both fields must be of the same type. Since we cannot change the field types and we cannot edit a text file in ArcMap, we must instead create a new numeric field in our shapefile and populate with the data found in the text field.

2 - To do this, start by opening the attribute table of the shapefile by right-clicking on it in the table of contents and selecting Open Attribute Table.

3 - Using the table options icon , select Add Field...

4 - In the Add Field popup box, name your field Wards and select the Type to be Long Integer.

5 - Click on OK.6 - Your new field shouldnow appear at the end ofthe attribute table.

Page 8: ArcGIS Getting Started with - University of Torontomaps.library.utoronto.ca/workshops/ArcGISintro/03...1 1 - Start a new map (see Module 2 page 2 step 1) 2 - Make sure you have the

61 - Right-click on the Wards field in the attribute table and select Field Calculator...

2 - Read the warning and click on Yes in the popup box.

3 - In the fields list, double-click on the [SCODE_NAME] field. This will populate the script box in order for us to obtain the equation ‘Wards’ = ‘SCODE_NAME’.

4 - Click on OK5 - You will notice thatyour new field is now populated with the numeric equivalent ofyour SCODE_NAME field.

Page 9: ArcGIS Getting Started with - University of Torontomaps.library.utoronto.ca/workshops/ArcGISintro/03...1 1 - Start a new map (see Module 2 page 2 step 1) 2 - Make sure you have the

71 - Now we are ready to join our shapefile to our CSV text file.

2 - Right-click on icitw_wgs84.shp and select Joins and Relates→ Join...

3 - Select the field, Wards, from the shapefile as the field upon which to base the join.

4 - Select the data file, Ward_Profiles_formatted.csv to join to our shapefile.

5 - Choose the field, Ward, in this text file on which to complete our join from one file to the other.6 - In the Join Options,select Keep All Records7 - Click OK

Page 10: ArcGIS Getting Started with - University of Torontomaps.library.utoronto.ca/workshops/ArcGISintro/03...1 1 - Start a new map (see Module 2 page 2 step 1) 2 - Make sure you have the

81 - Right-click on the icitw_wgs84.shp layer and select, Open Attribute Table.

2 - Scroll through the columns. You will now notice that the columns from the CSV file are now attached through the data join via each ward number.

3 - Notice the Total population column. We are now going to create a thematic map of Toronto’s population using this column.

4 - Close the attribute table and double click on the icitw_wgs84.shp layer.

5 - Click on the Symbology tab in the Layer Properties window.

6 - Select Quantities in the Show: options, and select the Fields Value: Total population by age group

7 - Click on OK

Page 11: ArcGIS Getting Started with - University of Torontomaps.library.utoronto.ca/workshops/ArcGISintro/03...1 1 - Start a new map (see Module 2 page 2 step 1) 2 - Make sure you have the

91 - The map produced is not be terribly meaningful as is. Nothing really stands out from the numbers.

2 - There are a few things we can do to make this map more interesting. We can change the data classification method of our population to our colours, or we can normalize our data with another variable. Let’s start with changing the classification..

3 - Return to the layer properties window by double-clicking on the icitw_wgs84 shapefile.

4 - Click on the Classify... button

5 - The default classification method used by ArcMap is Natural Breaks (Jenks). Examine the blue lines in the graphic. These represent the “breaks”. Click on the Show Mean option. A dotted line will appear.

Page 12: ArcGIS Getting Started with - University of Torontomaps.library.utoronto.ca/workshops/ArcGISintro/03...1 1 - Start a new map (see Module 2 page 2 step 1) 2 - Make sure you have the

101 - The Jenks method uses natural groupings within the data and maximizes differences between classes. Colours are divided where boundaries can show relatively significant differences in values. While oftentimes useful, this method does not always produce favourable results.

2 - Change the method of classification to Quantile.

3 - You will notice that the blue lines have now changed position. The breaks have now changed. Quantile breaks are based on an equal number of features. The quantile method assigns the same number of data values to each class.

4 - Click on OK

5 - In the Layer Properties window, now select 3 classes and then click on Apply

6 - While more meaningful than before, we still don’t get a good sense for where most people live in Toronto.

7 - Let’s now try and normalize our data instead.

Page 13: ArcGIS Getting Started with - University of Torontomaps.library.utoronto.ca/workshops/ArcGISintro/03...1 1 - Start a new map (see Module 2 page 2 step 1) 2 - Make sure you have the

111 - In the Layer Properties window, change the number of classes to 5.

2 - In the Normalization option, select Shape_area. This would be the equivalent of Dividing the Total Population by the amount of space of which each ward is made. This is the simple formula for calculating population density. Unfortunately, the column is empty and you will therefore not immediately see any results.

3 - Click on OK. Your map should now be blank.

4 - Right-click on the icitw_wgs84 shapefile and select Open Attribute Table. We will now proceed to create the land area for each of the wards using the SHAPE_AREA column.

5 - Right-click on the the Shape_Area column and select Calculate Geometry

6 - Click on Yes in thewarning pop up box

7 - You will notice that our Area option is disabled. This is due to the type of projection we are using. In this case, our projection uses coordinates instead of units of land measurement such as metres or kilometres.

8 - Click on Cancel

Page 14: ArcGIS Getting Started with - University of Torontomaps.library.utoronto.ca/workshops/ArcGISintro/03...1 1 - Start a new map (see Module 2 page 2 step 1) 2 - Make sure you have the

121 - Using the View menu, select Data Frame Properties…

2 - Click on theCoordinate System tab3 - In the filter box, typeNAD_1983_UTM_Zone_17Nand click on the search icon

5 - You should receive a Warning telling you that the datasets in your map are not built using this new coordinate system. Select Yes to use this transformation.

6 - Return to your Attribute table (if you do not still have the table open, right-click on the icitw_wgs84 shapefile and select Open Attribute Table)

NOTE: At issue here is how the earth’s surface is being calculated and using what types of units. UTM uses metres as a coordinate unit and the method it uses for covering the earth allows for areal calculations. For more information on projections and GIS, see the following link http://resources.arcgis.com/en/help/main/10.2/index.html#//003r00000001000000

4 - Select this projection and click on OK

Page 15: ArcGIS Getting Started with - University of Torontomaps.library.utoronto.ca/workshops/ArcGISintro/03...1 1 - Start a new map (see Module 2 page 2 step 1) 2 - Make sure you have the

131 - Right-click on the SHAPE_AREA column and select Calculate Geometry...

2 - Click on Yes in the Warning box

3 - In the Calculate Geometry window, you will notice that the Area property is now accessible. Select Area

4 - In the Units: option,select Square Kilometers [sq km]

5 - Make sure you have selected the NAD 1983 UTM Zone 17 projection

6 - Click on OK

7 - Select Yes to the warning pop up

8 - Your SHAPE_AREA column should now be populated with the square KM calculations for each polygon.

Page 16: ArcGIS Getting Started with - University of Torontomaps.library.utoronto.ca/workshops/ArcGISintro/03...1 1 - Start a new map (see Module 2 page 2 step 1) 2 - Make sure you have the

141 - Double-click on the icitw_wgs84 layer in the Table of Contents.

2 - Click on the Symbology tab

3 - In the Fields area, select again the Value to be our Total population by age group field, and select the Normalization field (select again), to be SHAPE_AREA.

4 - Your Symbols should now have been recreated and now represent our population density.

5 - Click on OK

6 - You will now find a much more meaningful map than before.

7 - Change your Color Ramp option colours and select one with high reds.

9 - Your map should now clearly demonstrate that the most densely populated areas of the city are in the smaller downtown wards.

10 - Reclassify your symbols using Quantiles and other classification methods to experiment.