Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

State County City Problem Expand / Collapse
Author
Message
Posted Tuesday, July 9, 2013 7:58 AM


SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, June 19, 2014 10:17 AM
Points: 28, Visits: 51
Greetings. I would recommend you investigate how the US Census Bureau handles geography. In fact, they already have a comprehensive coding for State/County/Place for the entire US, including areas not covered by all levels of geography - like Native American land, islands, etc. A good place to start is their Guide to State and Local Geography:

http://www.census.gov/geo/reference/geoguide.html

You can find links to hierarchical diagrams, reference materials and other useful documents. You may find the article on ANSI codes of use:

http://www.census.gov/geo/reference/ansi.html

There is even a download page if you want to import there geographical codes:

http://geonames.usgs.gov/domestic/download_data.htm

Working with a major municipal government which happens to fall within five separate counties, we run into these issues a lot.

I would also caution you about using ZIP codes, as they are not really geographic areas but rather collections of postal carrier routes. In fact, the Census Bureau disclaims this on their page dealing with postal codes. US Postal Service builds their ZIP routes solely on business needs and cross city, county, even state lines with a single ZIP code.

The DBA mantra should always be "know your data, know your data" so understanding these relationships is important before you make business decisions based upon them. ZIP codes were meant to facilitate mail delivery - that is all. For other types of business, particularly Public Safety (which we support) you need something different.

I hope that this is useful to you.

Good luck.

Cheers.
Post #1471635
Posted Tuesday, July 9, 2013 8:02 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 2:31 PM
Points: 13,020, Visits: 11,825
Please note: this thread started in 2008.

_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Post #1471637
Posted Wednesday, July 10, 2013 8:04 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, June 20, 2014 10:09 AM
Points: 2, Visits: 19

The census web site has raw data available for download. The data for each state will have one master "Geo" file for geography info with a primary key called LOGRECNO and related data files with a forign key of the same name. Look for a column called Summary level or Sumlev. The Summary level for Counties is identified as 050, places (cities) is 160 etc. The County and place columns wil give you the County or Place or identifer, sometimes referred to as the FIPS Code. The "Name" column wil give you it's name. You can query the geo file to get your information.

see the document below. Use the summary levels and other Geo identifying fields\columns will filter data accordingly. It is important to understand the table structures they use.
http://www.census.gov/acs/www/Downloads/handbooks/ACSGeneralHandbook.pdf

Maybe this will help.
Post #1472164
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse