Geography 387 Lab Home | Geography 387 Home | Geography Home

Lab 4: Cartography and Classification


Outline

  1. Purpose
  2. Import existing GIS data into a geodatabase
  3. Download water use statistics from National Atlas
  4. Relate water use statistics to the county feature class
  5. Symbolize the counties with total water use
  6. Create a map with different classification schemes
  7. Create a map of annual ground water use per hectare
  8. Conclusion
  9. To turn in

1.0 Purpose

This lab will introduce you to two main concepts: 1) how to join an attribute table to the attribute table of an existing feature class, and 2) how to make choropleth maps using a variety of classification methods. We will continue with our counties shapefile from Lab 3 . We will then download year 2000 water use data from the National Atlas site and make a variety of maps for the conterminous United States. In the process, you will also learn how to create and populate a Personal Geodatabase.

2.0 Import existing GIS data into a geodatabase

Make a Lab 4 work folder in your workspace. In this exercise, we are going to create a new Personal Geodatabase and import your Shapefile of counties from the 48 conterminous states. Start by opening ArcCatalog. Click on your Lab 4 folder to make it active, and then from File in the main toolbar select New and then Personal Geodatabase. Rename your geodatabase to have your last name, followed by "_Geodatabase.mdb" (e.g., Clark_Geodatabase.mdb).

Creating a new geodatabase in ArcCatalog

Now we are going to import your shapefile from Lab4 into your Geodatabase. Right-click on the Geodatabase in the Contents tab and select Import, and then Feature Class (single). Note: if you wanted to import multiple shapefiles all at once, you could select Feature Class (multiple).

Import a shapefile feature class in ArcCatalog

The Feature Class to Feature Class window opens. In the Input Features window, put your shapefile of counties of the 48 conterminous states from Lab 3 . Use the version that you projected with the Albers projection. For output location, chose your Geodatabase, and for Output Feature Class Name, use the same name as the input shapefile, but do not put the ".shp" at the end. After all, the output will be a Geodatabase feature class, not a shapefile!

Import feature class parameter window in ArcCatalog

Click the Show Help button to open the help if it is not already open. Click anywhere in the "Field Map (optional)" section of the "Feature Class to Feature Class" window to display the help information field import. Use the help to answer the following question:

Question 1:

a. How could we change the field names that will be displayed in the output feature class? Hint: To answer this thoroughly, it would probably help to also right-click on the various attribute names (e.g., State) and select "Properties...". FYI: you can remove field from the final imported feature class by selecting the field and then clicking the Import feature remove button button.

b. What does the "Expression (optional)" parameter do?

 

We are going to import all of the fields with the same names as found in the input shapefile. Click OK. If everything works properly, you should see your feature class appear in your Geodatabase. You have translated the feature class in shapefile data format to a copy of the feature class in a Geodatabase format. Click the Preview tab to view the Geodatabase feature class and verify that it has the same geometry as your shapefile feature class. Compare the attribute tables between the shapefile and the imported Geodatabase version. You should notice that the shapefile attribute table has an AREA and PERIMETER fields with values in decimal degrees (squared-dd for area). This is because we never recalculated the area for the counties after we projected the shapefile from GCS to Albers (we recalculated area on the dissolved shapefile... remember?).

Question 2:


a. Which attribute fields have been added to the Geodatabase feature class?

b. Which fields have been removed?

c. For the new fields, what do their values represent?

By answering the last question, you should realize that he original AREA and PERIMETER fields are now redundant and miscalculated. To avoid confusion later on, we can delete these fields from the Geodatabase feature class. Right-click on the AREA field and select Delete Field. Do the same for PERIMETER.

Delete field from table in ArcCatalog

Go to the Metadata tab for the feature class. You should notice that ArcCatalog also imported the metadata from your original counties shapefile (the GCS version).

3.0 Download water use statistics from National Atlas

We are now going to download an attribute table of water statistics from the National Atlas. Go to the the web page at http://www.nationalatlas.gov. From the front page, navigate to Mapping Professionals, and then to Raw Data Download. From the Water category, download Water Use 2000. Uncompress the data files into your Lab 4 folder. You should notice that the Water Use 2000 archive comes with a DBF table and an associated metadata ASCII text file. Important, press the F5 key to refresh ArcCatalog so that your table .dbf and .txt files appear in the catalog tree.

Using ArcCatalog, we will now import the table into your Geodatabase. Right-click on the Geodatabase and select Import, then Table (single). Chose the wu2000t.dbf file as your table to import. Name the output table wu2000t. Note: the .dbf extension is not required, since this will be a table within the Geodatabase, not a separate DBase file. Leave the "Field Map" box with the default values and click OK. The imported table should appear in your Geodatabase.

Import Table from ArcCatalog

Use your skills from Lab 3 to import the metadata for the table from the w2000t.txt text file. Look at the table's attribute descriptions in the ArcCatalog metadata tab and compare the attributes to the original text file.

Question 3:


a. Is there a detailed description of the meaning of each table attribute (field) in the ArcCatalog metadata?

b. Is there a detailed description of the meaning of each table attribute (field) in the original text file metadata?

c. What is the attribute (field) containing the estimated total ground water withdrawal of fresh water and saline water for all categories, in millions of gallons per day?

d. What is the attribute (field) containing the estimated total surface water withdrawal of fresh water and saline water for all categories, in millions of gallons per day?

e. What is the attribute (field) containing the estimated total withdrawal of fresh water and saline water for all categories, in millions of gallons per day? (Note: this is both ground and surface water, combined).

 

Look at the Description tab in the ArcCatalog metadata and follow the link to the full USGS report for these data, then answer these questions by reading the the report's abstract.

Question 4:


a. Which sector (e.g., public supply, irrigation, industrial) accounted for the greatest freshwater water use in the United States for 2000?

b. Which states account for one-forth of all water withdrawals for 2000?

 

4.0 Relate water use statistics to the county feature class

We are now going to relate the water use attribute data to the county geographic data in ArcMap. The counties and water-use tables can be joined together based on a common attribute, or "key". Review the attributes lecture or Ch 8 for more information on relating tables. The key is a 5-digit State and county Federal Information Processing Standard code, called "FIPS". Open ArcMap and add the counties feature class and the water-use table from your geodatabase.

Shapefile and table loaded in ArcMap

Right-click on the counties feature class and select Joins and Relates.

Selecting join from ArcMap

Select the FIPS field for the feature class attribute key (parameter 1). Select your geodatabase water use table for the table to join (parameter 2). Select the FIPS field for the table's attribute key. Click OK.

Join parameters in ArcMap

 

Question 5:

Using your notes from lecture and Ch 8, answer the following questions:

a. In which table (counties or water use) is FIPS considered the primary key?


b. In which table (counties or water use) is FIPS considered the foreign key?

Examine the table for the counties feature class. You should see the original county fields preceded with the name of the feature class, followed by the field name (e.g., countyp020_48_Project.COUNTY). The water use table's fields are joined to the right of the table with names preceded with the table's name (e.g., wu2000t.TO_WFRTO).

5.0 Symbolize the counties with total water use

Now that the water use attribute table is joined to the counties feature class, we can make a choropleth map of total daily water use by county using graduated colors (see Cartographic Design and Map Types lecture). Right-click on the county feature class (or double left-click) to get the layer properties. Then go to the Symbology tab. Select Quantities, Graduated colors. In Fields, Value, select the field name that represents estimated total withdrawal of fresh water and saline water for all categories, in millions of gallons per day (see Question 3e above). Notice that the field has continuous values (real numbers).

Question 6:

Is the COUNTY field (county names) from either table available for symbolization with graduated colors? If not, why?

 

Graduated color symbology in ArcMap

Chose the light blue to dark blue color ramp. We will leave the classification scheme as 5 classes with Natural Breaks. Right-click on any one of the symbol color patches or labels and select "Properties for all symbols...". Click on the Outline color box and select "No Color". Click OK. Right-click again and select "Format Labels...". Select Number in the Category window and set the number of decimal places to zero in the Rounding window. Click OK.

Click OK again to leave the Symbology window. In the Data Frame, left-click once on the counties feature class name to rename how the layer's name appears in your ArcMap document. Change the name to "Total Water Use (Million gal./day)". Note: renaming the feature class in ArcMap does not physically rename the feature class in the geodatabase; the ArcMap name change is only for display purposes in ArcMap (for example, the name change will show up in the layout's legend). In the screen shot below, the field name has been blurred. I don't want to give away the answer to the field name!

water use in ArcMap

6.0 Create a map with different classification schemes

Use your skills from Lab 2 to create a series of four maps in one layout. This time you will not change the projection for the map frames. All the maps will be in the Albers projection (why does the map display Albers?). Start by using the ruler and guides to set up four map quadrants, like you did in Lab 2 . Rename your data frame from "Layers" to "Natural Breaks". Resize the data frame and snap it into position in the upper-left quadrant.

Click on the Natural Breaks data frame and insert a legend with default size parameters. Do not include the title "Legend" in legend. Resize and position the legend in the bottom-left of the data frame, but not snapped to the left edge (see screen shot below). Select the legend and right-click to get the Legend Properties window. Select "Total Water Use (Millions gal./day)" in the Legend Items window, then click the Style button. This open yet another window with more lengend properties (Legend Item Selector). Select the legend type called "Horizontal Single Symbol Layer Name and Label". See the screen shot below to help you pick the right style. Click OK, and OK again to apply your legend style. This step removed the "heading" from legend (the heading had the classified field's name, e.g., wu2000t. ...).

Legend properties

Insert a title in the upper-center of the data frame, and call it "Natural Breaks". Make the font size 20 by selecting the text text, then selecting 20 in the pop-up menu next to the font "Arial" in the Draw toolbar. Note: if this toolbar is not available, you can enable it by going under View, Toolbars, then select Draw.

Hold down the shift key and then click the Natural Breaks data frame, the title and the legend. Right-click then select copy, then select paste. Move the copied data frame (and associated title and legend) into position in the upper-right quadrant. Repeat these steps to insert a copy of the Natural Breaks data frame in the remaining two quadrants.

Copied data frames

Complete the follow steps:

  1. Rename the upper-right data frame "Equal Interval Breaks". Rename the title in the layout with the same name.
  2. Rename the bottom-left data frame "Quantile Breaks". Rename the title in the layout with the same name.
  3. Rename the bottom-right data fram "Manual Breaks". Rename the title in the layout with the same name.

 

Create a neatline around all four quandrants with the New Rectangle tool in the drawing toolbar. Draw a box with this tool that snaps to the outter edge of all four quadrants. The box will have a fill color. Double-click on the box to get to the properties window. Change the fill color to "No Color" and make the outline black with an outline width of 5.

 

Your map should look like the following image:

Map layout with four maps and titles

Now right-click on the feature class in the Equal Interval data frame, then select properties. Go to the symbology tab. In the classification panel of the symbology tab, click on Classify. The classification window will appear. Select the Equal Interval method in the Method panel. Keep the number of classes at 5. Click OK, then OK again. You should see your Equal Interval map symbology change in your layout. Repeat these steps to change the Quantile data frame to have a quantile classification method. For the Manual Breaks data frame, select the Manual method and in the Break Values window, enter in breaks at 250, 500, 750, 1000 and 5365 (the maximum value). Notice how the blue bars in the histogram are positioned on the x-axis at the corresponding break values. You can manually slide these bars to your desired break values as well. Experiment with both ways of setting manual breaks.

Manual classification

Click OK, then OK again.

Four different classified maps in layout view

Be sure to save your map document.

Map 1
Make a map of total daily water use for the counties in the 48 conterminous states. The map should have four panels, each with a different classification method: Natural Breaks, Equal Interval, Quantile, and Manual. Export the map to a PDF file with 150 dpi.

 

7.0 Create a map of annual ground water use per hectare

One problem with our maps is that there is a positive relationship between the size of the county and the water usage. We do not know if greater gallons/day for a county is just because the county is bigger or if there really is more water use at every location in the area. One method to minimize the effect of polygon size is to normalize the data by polygon area. That is, we can divide the total daily water use by the area of the polygon, creating a density of water usage by area. The units in our classification would then be Million gallons per day per unit area (e.g., Million gal/day/m2 for a Albers projection). In this part of the lab, we will create a map of groundwater use per hectare for the whole of year 2000.

One helpful way to learn about map design is to start with the built-in ESRI map templates. We will start out by opening a template for the conterminous United States. Start by creating a new map document and under the USA tab, select the ConterminousUSA.mxt map document template. Click OK.

Conterminous USA template

Add your counties feature class and water use table from your geodatabase. Move the county feature class down in draw order, below the State Boundaries layer. You will have to move from the Source tab to the Display tab to do move the layer order. When you add a table, ArcMap automatically switches to the Source tab, which shows both spatial and non-spatial data that are loaded. Turn off the United States layer. Do not worry about fixing the legend, title, etc. until after we symbolize our county data with water use.

Template with counties added

One problem that we will run into with the counties layer is that some counties have multiple polygons, each with a different area. Let's investigate this a bit. Open the attribute table on the county feature class and make a Select By Attribute query for "Miami-Dade County". (Be sure your select layer is your county feature class). You can zoom into the selected set by going to Selection in the top menu, then "Zoom To Selected Set". It may also help to make the lines less thick. You can do this by going to the county feature class properties, Display tab and unchecking "Scale symbols when a reference scale is set". You can get to the extent of the entire counties layer again by right-clicking the county feature class and selecting "Zoom To Layer".

Question 7:

a. How many polygons are there in the entire county feature class? (Hint: the answer is not 2000. To answer this question, you may want to click the end of table button button at the botton-left of the county attribute table to skip to the end rows in the table).

b. How many polygons make up Miami-Dade county? Why does this county need separate polygons?

These multiple polygons per county will affect our normalization of ground water by area. This is because the ground water data is for the whole county, while our area for the county can be divided among many polygons. We need the total area for the entire county. We can remedy this problem by grouping all polygons from the same county into one "multi-polygon". The county's polygons will remain separated, but all will share one row in the attribute table, including a total area. We do this with the dissolve tool in ArcTools.

Start by clearing your selected features. You do this by going to Selection in the top menu bar, then "Clear Selected Features". Open the dissolve tool (Remember this tool from Lab 4? Last time we dissolved by state name). Select the FIPS field for the dissolve. Each county has one FIPS number, so this is the same as dissolving by County name. However, we will need the FIPS number for a join later on, so use FIPS dor the dissolve field. Save your output in your Geodatabase and give it a logical name (e.g., county020_48_dissolveFIP). You don't need ".shp" at the end of your layer name because it isn't going to be a shapefile...right? Run the dissolve. This time the dissolve process takes a bit longer than with states. This is because our output is not as aggregated as states... there's a lot of county geometry to analyze and export.

Dissolve by county

Move your new dissolve feature class below the State Boundaries layer and remove your original counties feature class. Here is a hint for the next question: the Miami-Dade County FIPS number is '12086', and FIPS is a string data type! Be sure to clear your selected features after answering the question.

Question 8:

In your new dissolved feature class:

a. How many polygons are there in the entire dissolved feature class?

b. How many polygons make up Miami-Dade county? What is the county's total area?

 

Use your new skills from Section 4 to join the water use table to the dissolved feature class. Open the dissolved feature class attribute table and add a new double type field called "Ground_Water". Calculate the total annual ground water use by multiplying the field you identified in Question 3c by the total number of days in the year (there are 366 days, because year 2000 was a leap year!). If you get an error about a row with a bad Object ID=223, just click Yes. This error was caused by a county in Colorado that did not have a matching FIP number in the water use table... missing data, argh! Since we multiplied Million gallons/day by number of days for one year, our units are now total million gallons for year 2000. Right-click on the Ground_Water column and select Sort Descending. You should have ground water values that look like the following:

Ground water calculation

Notice that we have an area column with units in square meters. We need hectares calculated once again! Add a double field type to the table and call it Hectares. Calculate hectares either using the Shape_Area in Field Calculator or use Calculate Geometry with the hectares option for units. Hopefully you can do this step without going back to the previous labs. For your reference, the above table has values for calculated hectares matching the sorted ground water values.

We are now ready to make a new choropleth map with the total ground water use for year 2000, normalized by area in hectares. First of all, we are done with the joined table and those extra prefixes in the field names can be a bit annoying. Let's remove the joined table. Right-click on the dissolved feature class, select Joins and Relates, then Remove Join(s), and then Remove All Joins. We have now removed the joined water use table. Verify this for yourself in the dissolved attribute table. The prefixes are gone from the field names, but your calculated Ground_Water and Hectares fields are still there!

Go to the dissolved feature class symbology window (in the layer properties). Change the symbology to graduated colors and use Ground_Water for the value field. We will normalize the total ground water by polygon area by choosing Hectares in the Normalization field. Change the labels to have two decimal places in the Format Labels window (Remember, right-click over one of the symbol patches or data values. You may have to select the decimal place radio button first). Go ahead and leave the classification method with Natural Breaks and 5 classes. The normalized units for the classes are now Million Gallons/Hectare. Review the Cartographic Design lecture and then modify the template to follow the general cartographic guidelines. Think about removing some of the default layers from the map if they do not add anything to your map's "message". Be sure to delete the ESRI logo...you are making the map after all!

Ground water graduated symbology

You may want to stretch your legend out horizontally. You can have your dissolved feature class fill a second column in the legend by selecting it in the Legend Properties window, then checking the "Place in new column" option. See the screen shot below.

Map 2
Using the map template, make a map of the year 2000 ground water use for the counties in the 48 conterminous states. Use natural breaks based on the ground water normalized by hectares. Chose a color scheme that clearly shows the difference among the different classes. Be sure to include a meaningful title, legend, scale bar, north arrow, your name, etc. Export the map to a PDF file with 150 dpi.

 

Question 9 :

You should see an interesting pattern of total ground water use in the Great Plains area region. Where is all that ground water coming from and which states are affected? (BIG hint: type in "high plains aquifer" in Google).

 

(Optional) Extra Credit Map
Download the aquifer shapefile from the National Atlas, Water raw data download area. Select out the "High Plains Aquifer" and export the polygon to a new layer in your Geodatabse. Add the aquifer to your map. You should see an interesting pattern... Export the map to a PDF file with 150 dpi.

 

8.0 Conclusions

You have now learned how to join an attribute table of water-use statistics to a geographic data layer based on a common attribute. You will find that the ability of the GIS to function as a relational database management system (RDBMS) is a powerful way to connect non-spatial data to spatial features for visualization and analysis. Imagine working with just the water-use data in a database or spreadsheet. You could make a graph or summary table, but you wouldn't see spatial patterns. With the GIS we were able to see how water use is distributed across the United States. We could then see that certain areas had more water use than others in a non-random way. It was apparent that one large area in the Great Plains had water-use linked to an underground feature, not a major aboveground river.

9.0 To turn in

  • The question sheet, with typed answers (Word document)
  • Map 1
  • Map 2

Submit electronic files via email to klacefie@sonoma-county.org, with the subject "G387, Lab 4, [your last name]".


This lab was designed by Matthew Clark, Geography and Global Studies Department, Sonoma State University.

This page was last modified on Sep. 3, 2008 by Matthew Clark