Showing posts with label mapping. Show all posts
Showing posts with label mapping. Show all posts

Sunday, October 23, 2011

On focused dataframes in ArcMap

Q: Why can't I add a north arrow/legend/scale bar to my map?
A: Are you in the layout view (vs. the data view, often the default view)?
Q: Yes, of course. I didn't just install the software this year, you know.
A: OK, I can see I'm dealing with a non-novice here. Let's try something else. Is your layer focused?
Q: Um... it's clear to me, so I guess it's in focus?
A: No, I mean that if you're looking at the data view, is there a diagonal line border around it?
Q: Yes...
A: OK, that means you have that layer focused. It allows you to edit the layer in the layout view. See this thread for more info. To un-focus the layer, hit this button on your toolbar:


For me, it's located a few lines below the word "Selection", but as always the location of the buttons depends on where you have your toolbars anchored.

Thursday, October 20, 2011

Adding coordinate data to a shapefile and lining up your layers

...or, Why is Maryland floating out in the Atlantic Ocean?

If you find that one (or more) of your layers aren't lining up in your mxd file, it's probably a problem with the geographic and/or projection coordinate systems. Your layers need to be projected in the same system. You can check the projections by right clicking the layer in the table of contents, selecting "properties", and looking at the information listed for both Projected Coordinate System and (by scrolling down) Geographic Coordinate System.

If you need to re-project a layer, see this post (steps 1 - 3) on how to. Remember to add your newly projected layer to your mxd file, and remove your "floating in the ocean" layer.

A problem arises if you have a shapefile that lacks coordinate data. You just can't re-project something that hasn't been projected yet.

For example, the 2000 census zip code shapefiles (available here) lack a coordinate system. When you download the zip file, it does not include the projection (.prj) file for the shapefile. Adding this layer will result in the zip code layer floating in the ocean.

To add a coordinate system, open Arc Catalog (not just the shortcut thru ArcMap). Select the shapefile that corresponds to the layer that is missing the coordinate data by double clicking it in the table of contents so you get a popup window. In this window, go to the XY Coordinate System tab, and click "select" to select a pre-defined coordinate system. Chose the appropriate coordinate system, click "add", and then "ok".

Re-add the layer to your mxd file. Check the properties to make sure the coordinate system has been updated. If the layer is still out of line with the other layers on your map, go through the re-projection steps described above.

Thursday, June 9, 2011

Latitude, longitude, X, Y

Q: Is latitude the X coordinate or the Y coordinate?
A: Latitude, the distance from the equator, is the Y coordinate. Since the US is "above" the equator, your geocoded Y values should be positive.

Longitude is the distance from the prime meridian. Since the US lies to the west ("left") of the prime meridian, your geocoded X values should be negative.

Tuesday, June 7, 2011

ArcGIS fields: What's the difference between "address" and "ARC_Street"?

From Getting to Know ArcGIS Desktop, Ormsby et al:

"When you rematch unmatched addresses, you can edit the values in ARC_Street and ARC_Zone to make matches. You would do this, for example, if you found mistakes in the (original data) table. The ADDRESS and ZIP attributes, on the other hand, preserves the original information from the (original data) table."

Thursday, May 19, 2011

Q: How do I rearrange my layers in ArcGIS?

A: In your Table of Contents (left side window), switch your list type by clicking the buttons directly below the words "Table of Contents". You probably have the second button selected, "List by Source" (it looks like a water jug sitting on top of a tablecloth -- who does these graphics???). Change it by clicking the first button, "List by Drawing Order", which kind of looks like a bulleted list, which I guess makes more sense, graphically, kinda.

Friday, May 6, 2011

Joining insanity in ArcGIS 10, Excel 2010

Problem: I haven't been able to join the Excel file that contains demographic data by census tract to the census tract shape file.

My specific issue is that when I open the Join window, the joinable field names are not selectable... if the CT shapefile field name is selected, the corresponding field name in the Excel file is not available to select, and vice versa.

I downloaded both sets of info from the census website... so why the technical trubs???

After renaming, resaving, repopulating, and refilling my beer, I finally thought to check the field properties for my problem fields in both layers (open attribute table, highlight column of interest, right click column heading, select "Properties", check "Type"). Surprise! My field of interest in my shapefile layer is type "string", while the corresponding field of interest in my Excel file layer is type "double".

Solution: I created a same-type field to complete the join.

Since I couldn't seem to add a string type field to the Excel layer in ArcGIS, I ended up adding a double type field to the shapefile layer: Open attribute table, select "Add field...", named it "GeoId10d" and type "double" leaving the default for precision and scale. Then I started Editor (button that looks like a pencil connecting the dots), selected the appropriate layer to edit, opened the attribute table, right clicked on my new GeoID10d column, selected "Field Calculator" and just double clicked the "GeoID10" column (telling ArcGIS that GeoID10d = [GeoId10]... in English, setting the new GeoID10d column to copy the values from the old GeoID10 column and store those values as type double).

Once I had a matching type field, the join worked! Horray!

Wednesday, April 20, 2011

Looking up FIPS county codes

http://www.toolsformonkeys.com/countycodes.html

Monday, April 11, 2011

Why census block groups?

From http://www.census.gov/geo/www/cob/bg_metadata.html:

"A census block group (BG) is a cluster of census blocks having the same first digit of their four-digit identifying numbers within a census tract. For example, block group 3 (BG 3) within a census tract includes all blocks numbered from 3000 to 3999. BGs generally contain between 600 and 3,000 people, with an optimum size of 1,500 people. Most BGs were delineated by local participants as part of the U.S. Census Bureau's Participant Statistical Areas Program.

BGs never cross the boundaries of states, counties, or statistically equivalent entities, except for a BG delineated by American Indian tribal authorities, and then only when tabulated within the American Indian hierarchy... BGs never cross the boundaries of census tracts."

More on mapping Baltimore

Map of Baltimore Community Statistical Areas (CSA's): http://www.bniajfi.org/uploaded_files/0000/0302/communitystatisticalareas.pdf

Map and list of Baltimore CSA's with corresponding census tracts: http://www.bniajfi.org/uploaded_files/0000/0007/csa_tracts.pdf

Stats for Hopkins Hospital CSA (Perkins/Middle East, CSA #44): http://www.bniajfi.org/vs_csa_profile_files/0000/0044/csa44_perkins_middle_east_8.pdf

Baltimore stats and maps

The Baltimore Neighborhood Indicators Alliance offers some great resources online.

Start with the neighborhood profiles at http://www.bniajfi.org/neighborhood_data. Of course, the 'hood you think you live in may not be the official name (i.e. there is no "East Baltimore" Community Statistical Area), so click "Choose your Community Statistical Area" under the map at the upper left of the page then and click a CSA on the resulting map. This will show you a map with the boundaries to that CSA. Repeat until you find your CSA of interest, then return to the neighborhood data page to get the stats.

The neighborhood data page has 3 sections. The first section lists the Community Statistical Area (CSA) Profiles. The individual CSAs link you to PDFs that include vital signs from the 2000 census, housing & community development stats, children and family stats, crime, workforce & economic development, sanitation facts (including the rate of rat incidents... RAT CZAR!), environment & transit data, education stats, and community action info like voting rates. Example here.

The second section on the neighborhood data page is a link to downloadable shapefiles (GIS Shapefiles page at http://www.bniajfi.org/map_gallery/gis_shapefiles). These shapefiles include Community Statistical Areas (CSAs), Neighborhood Statistical Areas (NSAs), Inner Harbor, Baltimore City Public Schools (2010-2011 School Year), Farmers' Markets, Enoch Pratt Libraries, Senior Centers, Recreation Centers, Block Groups, Census Tracts, and Zip Codes. This page also directs you to important links through the "Related Resources" right side bar, including US census maps and cartographic resources, GIS resources at the Maryland State Data Center, maps from the Baltimore City Planning Department, and National Atlas shapefiles.

The last section on the neighborhood data page include the Neighborhood Statistical Area (NSA) Profiles. The data varies for neighborhoods. For example, the Canton link simply returns a map of the Canton CSA (which includes the large section of Patterson Park but not, oddly, the small section... curious), while the link for East Baltimore Midway returns a PDF with stat summary data on demographic, social, economic, and housing characteristics from the 2000 census (check it).