Home

 

 

 

   
 

GeoDesign

Tutorial 6 - Data Summaries


Objectives:

  • Get experience with data summaries in the GIS
  • Learn to create graphs from summary tables
  • Learn how to incorporate results into maps
  • Get more experience with overlay operations in the GIS

Background:

One of the main purposes of GIS is to use analytical techniques to produce quantitative measures of the physical environment. For example, you may want to know how many residential units are in each neighborhood. This type of questions can be answered by using map overlay analysis and data summaries. In this exercise we will be calculating similar measures for schools and population distributions in Austin, and then creating graphical outputs, maps and graphs, displaying the results of these analyses


Load data into an ArcMap document

Data can be found within the zip file ex6 by clicking HERE. Create a new folder on the Desktop. Name the folder ex6, extract the following files here in the folder.

Files: 

  • schools_austin : public schools (K-12) data for Austin (points, shapefile)
  • zipcodes_austin : zipcode areas for Austin (polygons, shapefile)
  • popu_zipcode_travis.xls: an Excel table contains population data from Census 2000 for Travis County

Open ArcMap. Create a new blank ArcMap document. Add the two shapefiles and the Excel table into your map. For the Excel table, double-click the file name and then choose the table Sheet0$

Open the tables for both layers (schools_austin and zipcodes_austin). Note in the table for schools_austin there are fields for the school districts at which the schools are located. Also there are fields for the campus names and the grade levels for all the schools. There are 216 schools in the database.

Note the field in the zipcodes_austin table for all the zip codes (ZIPCODE). There are 44 zipcode areas in the Austin data.

How would you go about determining the count of schools in each zipcode area? Print the map out and start counting? With GIS, it is fairly easy to tally the counts, distance, or area overlaps between layers.


Perform overlay analyses

Notice in the attribute table for schools_austin layer, there is no information showing zipcode for any of the schools. We can however use Identify tool to get this information from zipcodes_austin layer.

In ArcToolbox, open the tool Analysis Tools > Overlay > Identity

For the Input Features, select schools_austin, For the Identity Features, select zipcodes_austin, name your output feature class schools_austin_id. Save it in the ex9 folder.

After this completes, you will see that a new schools_austin_id layer has been added to the table of contents. Open the attribute table for this layer. Scroll to the right to see the field that has all the zip codes

This means that every school now has a value indicating the zip code in which it is located. How would you count the number of schools per zipcode area in this table? You can use data summaries to do this process easily.


Create data summaries

The next step will be to tally the number of schools in each zipcode area. Right-click the ZIPCODE field name in the new table for schools_austin_id layer and select Summarize.

For the output table, name it schools_id_sum, make sure the output data type is dBASE Table. Do not click any summary statistics, just click OK. Add the table to the map when prompted.

Open the table schools_id_sum. Now you see the count of schools per zipcode area (Count_ZIPCODE). Please notice that not all the zipcode areas have schools. Only 40 out of 44 zipcode areas has at least one public school in it.


Make graphs from summary tables

Although the table contains quantitative information about the distribution of public schools in Austin, the table is not very effective for visualization of these quantities. In order to visualize the differences among zipcode areas in terms of schools we will create a graph.

For graphing and mapping purposes, we need to join the summary table schools_id_sum back onto the zipcodes_austin layer.

Right-click zipcodes_austin and select Joins and Relates > Join. Join the summary table onto the attributes as shown:

Open the attribute table for zipcodes_austin layer. Scoll all the way to the right and find the field Count_ZIPCODE. You can see that there are four records with value <Null>. This is because that four zipcode areas do not contain any public school. However, for graphing purpose, we need to convert these <Null> to value 0.

In the table, click Table Options, then in the dropdown menu, click Add Field...

Add the field as Short Integer type also set Precision to 2. Name the field schools. Click OK.

Calculate the new schools field, right-click on zipcodes_austin.schools field and select Field Calculator.. The value for this new field will be taken from the schools_id_sum.Cnt_ZIPCOD field.

Double-click schools_id_sum.Cnt_ZIPCOD from the list. So the query reads as:

zipcodes_austin.schools = [schools_id_sum.Cnt_ZIPCOD]

You may see two warning messages after you click OK. Just click Yes to process the field calculation.

You will then see the new field contains all identical values as schools_id_sum.Cnt_ZIPCOD field does, except value <Null> has been converted to 0.

Close the table, then select View > Graphs > Create...

In the Create Graph Wizard, choose Vertical Bar as the graph type, zipcodes_austin as the layer, and zipcodes_austin.schools as the value field.

Since we're graphing the number of schools by zipcode areas, we want to set the X label field to ZIPCODE. To make the graph more readable, you need to adjust the color palette; choose the color scheme according to your liking. (for the in-class demo, choose Palette and Default) When you're satisfied with the colors and overall appearance of the graph, click Next.

Add a graph title, Schools by Zip Code, City of Austin. Make sure the checkbox for the graph legend is checked - we'll keep the legend position on the right side of the graph. Under Axis properties, add an axis title for the left side of the graph, name it number of schools.


Click on the axis properties tab for the bottom axis, re-name the title for this axis to Zip Code. Click Finish. (Note that you can later change any of these graph properties you've just set by double-clicking on the graph and adjusting the values as desired.)

We'll want to change some of the graph's display characteristics to make it a bit more readable. First re-size the graph window so that you can clearly see both the graph and legend clearly (you can do this by clicking and dragging on the border of the graph window -- same as you would with any other display window). Then right-click on the graph and select Advanced Properties.

Let's first change the left axis. Click on Axis > Left Axis under the editing options on the left, then click on the Scales tab. We'll want to change the numbering interval so that the scale isn't so crowded: click on the Increment tab then click Change.. button and change the desired increment to 1.



We then want to change the bottom axis. Click on Axis > Bottom Axis under the editing options on the left, then click on the Scales tab. We'll want to show all the labels: click on the Increment tab then make sure the checkbox next to Show all lables is checked.

Then click tab Labels, change Angle to 90. Then click Close. Now you can see all the zip codes along the bottom axis.

Then we'll change the legend font. Click on the Legend editing option, then click on the Text tab, then the Font button. The font size is initially set to 8 pt., but it would be nice to have it a bit smaller, lower it to 7 in the Size box. These are all the changes we'll make for now, so click Close in the Editing window.

The final graph will look something like this below.

It may be interesting to see how the number of population in all zipcode areas is related to the distribution of public schools. First we need to get population information into the attribute table of the zipcodes_austin layer.

Close the graph, you can later open it again.

First right-click the Excel table that contains population data. Try to identify which field tells us all the zip codes, which one has the population data.

Close the table, now right-click zipcodes_austin and select Joins and Relates > Join. Join the Excel population table onto the attributes as shown:

Now zipcodes_austin layer has the population data.

To retrieve the graph we created before, go to View > Graphs and click the title of the graph.

We are going to create an overlay that can be added to the graph. Double-click on the graph, this will bring up Graph Properties dialog. in the dialog, select Add > New Series.

For the new series, select the following options:

  • Graph type : Vertical Line
  • Layer/Table : zipcodes_austin
  • Y field : P001001
  • X label field : ZIPCODE
  • Vertical axis : Right
  • remove checkmark from Add to legend
  • Click OK.

The graph will require a few more adjustments. Again, right-click on the graph and select Advanced Properties. The first adjustments will be to the right axis. Click on Axis > Right Axis under the editing options on the left, then click on the Scales tab, click on the Increment tab then click Change.. button and change the desired increment to 2.

Then on the Maximum tab change the upper end of the scale to 60,000.

Next, click on the Title tab for the right axis, and set the title to population.

As a final adjustment for the Right Axis, click on the Grid tab, click on the Grid button, then uncheck the Visible box and click OK in the Border Editor window.

The last adjustments we'll make to the graph will be to fix the Legend. Click on the Legend editing option in the left panel of the Editing window. On the Style tab, set Legend Style > Series Values and Text Style > Left Value. Click Close.

Your graph now looks like this:

Export the graph (right-click the title bar and select Export). You'll note that the Export Dialog gives many different options for creating images from your graphs. PNG (portable network graphic) is a good choice because Acrobat can insert these as graphics. WMF (Windows Metafile) is also a good export format because it is a vector-based image which reproduces well and can be imported to Microsoft Office applications such as Word.

Let's try to save the graph as a PNG image this time. Keep Compression level at 9. Click Save...

Name your image zipcode_schools.png, click Save

You then can use this image in other documents created by other programs, such as Microsoft Word, or Adobe Acrobat Pro.

Save your ArcMap document, then close ArcMap.

 


The deliverable:

No assignment.


prepared by Ming-Chun Lee, 10/02/2014