How to Create a List of Counties

Watchers
Share


1. Go here

http://www.itl.nist.gov/fipspubs/co-codes/states.htm

2. Pick a state, for example, Alabama

3. Go there.

4. Do a copy all (Command Apple) on a macIntosh

5. Open Word, and paste using "Paste Special" with the "unformatted option" (otherwise you'll get embedded HTML stuff which at this point gets in the way).

6. At this point you'll have a page in word that looks something like this

ALABAMA (AL) (01)
CODE NAME CODE NAME CODE NAME
---- ---- ---- ---- ---- ----
001 Autauga 051 Elmore 101 Montgomery
003 Baldwin 053 Escambia 103 Morgan
005 Barbour 055 Etowah 105 Perry
007 Bibb 057 Fayette 107 Pickens
009 Blount 059 Franklin 109 Pike
011 Bullock 061 Geneva 111 Randolph
013 Butler 063 Greene 113 Russell
015 Calhoun 065 Hale 115 St. Clair
017 Chambers 067 Henry 117 Shelby
019 Cherokee 069 Houston 119 Sumter
021 Chilton 071 Jackson 121 Talladega
023 Choctaw 073 Jefferson 123 Tallapoosa
025 Clarke 075 Lamar 125 Tuscaloosa
027 Clay 077 Lauderdale 127 Walker
029 Cleburne 079 Lawrence 129 Washington


031 Coffee 081 Lee 131 Wilcox
033 Colbert 083 Limestone 133 Winston
035 Conecuh 085 Lowndes
037 Coosa 087 Macon
039 Covington 089 Madison
041 Crenshaw 091 Marengo
043 Cullman 093 Marion
045 Dale 095 Marshall
047 Dallas 097 Mobile
049 DeKalb* 099 Monroe

Messy, huh? Have no fear, this can be quickly transformed into something useful. (Those numbers, by the way, are actually useful, but we don't really have to worry about that at this point.)

7. Still in Word, do the following:

A. Get rid of the completely unnecessary window dressing---leave just the county names and the associated numbers.
B. Search for and replace every "white space" and replace it with the character "\t" (no quotes). That puts in a bunch of tabs where there were whitespaces.
C. Search and replace "multiple tabs" "\t\t", with single tabs "\t". You'll have to do this several times until you get every series of tabs that were created in Step B, so that there is only a single tab separating each "data element"

8. Copy All and open up Excell.

9. Paste your material into an Excell Spreadsheet (magic time). All of the numbers should now be lined up in their own columns, and all the county names in their own columns. Be careful---look at the county "St. Clair". The full name is separated into two parts by a white space. This placs "St" in one column, and Clair in another. You'll have to merge those two elements into a single column. (hint: its easier to just retype the name, especially if there are only a few of these. There's a way to do this relatively easily without retyping per se, but I'll leave that to you to figure out. Its an Excell skill that most folks won't use.)

10. Delete the numbers columns. (Hint, Highlight the column, and click delete.)

11. You should now have a three column list of Alabama counties, without numbers.

12. You can either paste this into a WeRelate page, and insert the needed HTML to create a table, or you can add the HTML before hand in the Excell sheet. Here's how to do it before hand: :A. Insert <table border=1> as the only elemet in the top row. (Insert a blank row to make room for it if need be) :B. There will probably be some noticeable blank rows (part of the source's original formating design). Delete them :C. Insert a blank column infront of each column of names :D. Insert <tr><td> in the first cell of the first blank column, and paste it to the bottom of the list :E. Insert <td> in the first cell of the remaining blank columns, and paste it to the bottom of the list :F. Insert </table> at the bottom.

You should now have an HTML table completely formated for display on relate. It should look like this:

Autauga Elmore Montgomery
Baldwin Escambia Morgan
Barbour Etowah Perry
Bibb Fayette Pickens
Blount Franklin Pike
Bullock Geneva Randolph
Butler Greene Russell
Calhoun Hale St. Clair
Chambers Henry Shelby
Cherokee Houston Sumter
Chilton Jackson Talladega
Choctaw Jefferson Tallapoosa
Clarke Lamar Tuscaloosa
Clay Lauderdale Walker
Cleburne Lawrence Washington
Coffee Lee Wilcox
Colbert Limestone Winston
Conecuh Lowndes
Coosa Macon
Covington Madison
Crenshaw Marengo
Cullman Marion
Dale Marshall
Dallas Mobile
DeKalb Monroe