Bringing data into ArcMap
In this exercise you will:
; Learn how to bring databases into ArcMap
; Learn how to add XY data to a map
Adding data to your map
OK, so now you’re a bit familiar with bringing a map into ArcMap and altering some of its appearances.
It’s time to take this one step further and learn how we can use this to analyze data. We’re going to do something that you should be familiar with from database managers – we’ll join tables.
Keep in mind that most of the time your map file does not come with data like the ones in the first examples did. Most of the time, you’ll have to add your data to your map.
Begin a new document by clicking on this icon:
Let’s add a St. Louis census tract map that does not yet have the demographic data in it. Click the ADD
DATA icon and add the file called tgr29510trt00.shp. This seems like really complicated file name, but census files often have this sort of naming convention to help you keep things organized. The file is a TIGER file (a standard census mapping file) for Missouri (state code 29) for St. Louis (county code 510). It is a tract file (trt) for 2000 (00).
Set your data frame properties – let’s use State Plane Missouri East as our projection. Let’s use feet as our units.
Right click on the item file and
view the attribute table. You’ll
see that it only contains the
geography information, but
contains no data.
We’ll need to add another file
that contains demographic data.
Click ADD DATA and look for
the file called
tgr29000sf1trt.dbf. This is just
the data, with no geography
attached to it. You’ll notice in
your layer window that you
now have a geography and a database:
But right now, they have no association. So we need to dump the data into the geography. I like to think
of this as pouring our data into our JELLO mold map.
To do that, right click on the census tracts file in the layers
window and choose JOINS AND RELATES, then click on
It’s important to remember that to join data to a map, you
need to right click on the geography file, rather than the data
Next, you’ll get this menu:
The first drop-down menu will ask what sort of join you
want to do. In this case, you want to join data or
attributes from a table.
The next box will ask which field you want to join on in
the geography or layer file. This is usually the numeric
code for the census track, block or other geography. In
our case, its called STFID.
The next box will ask you for the table you want to join.
In this case, we have only one table. But as you build
larger maps with more data, you may have several
Next, ArcMap needs to know what the join field will be
in the data. In this case, they happen to have the same
name – STFID – but that won’t always be the case. They
do, however, need to be the same size and format.
ArcMap will ask if you want to index the join fields (This is new to ArcMap 9.0.) Click yes – this will
speed things up. Keep in mind this edits the data, so you won’t be able to do this if you’re working off read-only files.
Click OK and ArcMap will pour your data into your map. To double check, right click on the census tract layer and look at the attribute table.
Now let’s look deeper at our map. Remember how we edited the symbology so we could see the tracts more clearly? Let’s do something that’s more likely to help us with stories. Double-click on the tracts
layer and go to the symbology tab. Click on QUANTITIES in the left window. This is where we can do a map based on some sort of demographic. Let’s start off with population. (POP2000) ArcMap will then
divide St. Louis’ census tracts into five categories, lumping tracts with similar total population into the same category. It will make calculations on how to divide the tracts into five categories (we’ll look closer at that later on). Click apply, then OK, then look at your map.
Once you’ve done that map, let’s get more practice before moving on. Look at the totals for each racial and ethnic category, and look at your map as you go along. This is the foundation for many maps that make it into print and on air.
Before you go on, once again be sure to save your map document just like you did earlier. You may call it anything you like.
You’ve looked at total population, and each racial and ethnic category. Let’s start putting them together. Go back to properties for your census tracts, click on the symbology tab. Pick QUANTITIES and graduated color from the left-hand box. Under your value field pick a race or ethnicity. Let’s say Black. Instead of just running this map again, let’s take one more step. Notice the box below that says NORMALIZATION. So far we’ve been leaving it blank, as we’ve gotten more familiar with ArcMap.
Now let’s pick a category.
Let’s choose POP2000. This
is the same as doing the math,
tract-by- tract, of the blacks
divided by the total population
within each tract. Apply this
map and look at it.
Now let’s do more. You can
do ratios, such as blacks
versus whites. Or you can
divide population by area, to
see the density in tracts. Or
you can see, say the blacks in
each tract as a percentage of
all the blacks in St. Louis.
Use the shape file grunnkrets.shp and add the data in the file grundata.dbf
Join the data to the map and do another map of your choice.
Let’s start a new map. Bring in a map of the United States by opening the file called Counties.shp. Take a look at what’s in this file by viewing the attribute table. Make a map that gives each state a different color.
Be sure to set your map frame properties. Let’s use UTM zone 16 and use miles as our units.
Zoom into Tennessee.
To zoom back to the full map, choose VIEW|ZOOM DATA|FULL EXTENT.
Let’s review how we can categorize information. Double-click on STATES in the table of contents. Go
to the SYMBOLOGY tab. Click QUANTITIES so we can do a color-coded map by a value in our data. Choose Median_val (median home value) Click apply and now we can see the states more clearly. Then click OK.
Experiment with different category breaks and colors. Save this map (call it TENNESSEE.
Adding Maps On Top Of Maps
Now let’s add some maps on top of our counties map.
Click the add themes button and pick rivers. Do it again for lakes. And then for city. Remember, you
need to click the check box in the table of contents to make ArcMap show the map in your view.
Most of the maps you’ve worked with so far contained polygons – or areas. Maps also can contain
points (such as the cities) or lines (such as the rivers).
If you’d like to edit the color of
the rivers so you can see them
better, double-click on the
rivers map. Go to the
SYMBOLOGY tab and double-
click the symbol box.
You’ll get the symbol selector.
You can choose one of
ArcMap’s preset styles for layer type or you can change the
color and width manually in the
Let’s go with ArcMap’s river
symbol by clicking on the
RIVER symbol in the symbol
selector. Now do the same with
the lakes map. Pick a different
color for the lakes. Now pick
city. Things get a little crazy
when you add too many maps. The dots for all those towns obliterate almost all of our map if we are trying to see the whole United States. We could zoom in close to a region so we can make some sense out of all those cities. For now, though, let’s not see that theme. Click
on the city box to remove the check mark.
Mapping Something That Wasn’t A Map
We’ve added maps on top of maps. Sometimes you may want to use a file that was never a map to begin with. On rare occasions, a database will contain geographic information within the database. A good example of such a database is the National Inventory of Dams database. We’re going to use federal dam data for Tennessee. It comes in a dBase file, not in a map.
Click the ADD DATA button then find nid_tn.dbf. You won’t see this data in the table of contents.
Click on the SOURCE button in the lower left-hand corner of the window, and you’ll see the file has
been added. Now we need to tell ArcMap to add it to the map.
We’ve brought in the table. But we can’t join it like we did with the census data. It does not have a
census tract number or anything like that. What it does have, however, is a latitude and longitude field. Once ArcMap knows that this data contains a latitude and longitude, it can display it on the map.
To do that, choose TOOLS|ADD XY DATA:
You’ll get a dialog box that will ask you which table you want to map
and which fields contain the latitude and longitude. For the dams data,
the longitude field is called LONGITUD_X and the latitude field is
Click OK. You’ve just transformed a database into a map layer. Edit the dam symbol to something that’s clear. For this exercise, let’s make the dams red dots at about size 8 points. You might notice that ArcMap has a symbol for a dam, but when you add several of them to a map, they are a little hard to see. Feel free to explore the symbols and find one you like.
Click your city map back on and make those 10-point gray pushpins.
Find Nashville and select it. (Note: It’s called Nashville-Davidson in the city file.) You can do this by
going to SELECTION| SELECT BY ATTRIBUTES. Set up a query to look for
CITY_NAME=’Nashville-Davidson.’ Once you find Nashville, get ready to label it. First, turn off the dams layer, so we can see the cities more clearly and zoom in to Tennessee.
To label points, first check what field ArcMap is using for the label for cities. Do this by right-clicking on CITY in the table of contents and choosing properties. Click on the LABELS tab. Make sure CITY_NAME is the field used as the label.
Next, on the drawing menu, find the labeling tool:
You’ll get another prompt from ArcMap asking how you want to
Choose the default options and click on Nashville.
You should be able to click on the city name with the regular
arrow and move it a bit to where you want it. Your map should
like something like this:
We could edit the symbology to choose GRADUATED SYMBOL and we could make the pushpin different sizes based on the population.
1. Colorcode the dams to show EAP (whether they have an emergency action plan) 2. Code dams to show different categories by age of the dam
Querying A New Map
Now we won’t lose track of Nashville. Now let’s look for problem dams near the city.
Begin by turning on the dam map. Things get a little cluttered, but it will get better.
Let’s say we want to look for all the dams within 50 miles of Nashville. To do that, we’re going to create a buffer (or in this case, a circle) around Nashville.
In ArcMap 9.x, some of the tools are hidden. You need to add them to your toolbar before you can use them. If you do not have BUFFER WIZARD under tools. Go to TOOLS | CUSTOMIZE. Click on the COMMANDS tab. Click on TOOLS in the left window. Drag the BUFFER WIZARD to the TOOLS menu. Close the CUSTOMIZE box.
Now, back to business. Go to TOOLS|BUFFER WIZARD.
This wizard will ask you which layer you want to base your buffer on. If you only want a buffer around Nashville (instead of all cities) make sure to check the USE ONLY SELECTED FEATURES BOX. The click NEXT.
The next box will ask you how big you want your buffer to be. Let’s say 50 miles. You also may have to make sure your buffer distance units are in MILES. Click next.
The next window asks if you want to dissolve your circles together or keep them separate. In this case, it doesn’t matter because we have only one buffer. If we had several cities selected we probably would choose NO, as we would want to address each city separately. Here we’ll create a new layer with our
buffer – be sure to give it a name. Let’s call it nashdams.shp
Click finish and you’ll see that ArcMap has added a circle around Nashville. To see the dams within the circle, double-click the buffer layer in the table of contents and change the symbology. Double-click the symbol. And choose HOLLOW as the type. This will allow us to see the buffer and the dams.
Your map should look something like this: