The previous post was using the 1990 cencus data. I got the new data from
http://www.census.gov/geo/www/gazetteer/places2k.html
and updated the script.
Download: counties_in_states2.zip
The previous post was using the 1990 cencus data. I got the new data from
http://www.census.gov/geo/www/gazetteer/places2k.html
and updated the script.
Download: counties_in_states2.zip
For a project I was trying to figure out all the Counties in each state in the United States.
First I got a list at http://www.census.gov/datamap/fipslist/AllSt.txt.
The data is not very well formatted so I wrote a ruby script to import the data. According to this site http://www.usgs.gov/faq/list_faq_by_category/get_answer.asp?id=785 There are "3,141 counties and county equivalents in the 50 States and the District of Columbia". Well the list above is not very accurate if this is the case. I was able to get find parse out only 2954 counties. The Census site says the data was collected in January 1, 1990. Hmm, that's really out of date information. However, I am posting the code that I wrote to parse the file. You will need a mysql database and activerecord to run the script.
Download: counties_in_states.zip.