Google Answers Logo
View Question
 
Q: List of all US cities ( Answered 5 out of 5 stars,   1 Comment )
Question  
Subject: List of all US cities
Category: Reference, Education and News > General Reference
Asked by: uc1bear-ga
List Price: $10.00
Posted: 20 Jan 2003 12:52 PST
Expires: 19 Feb 2003 12:52 PST
Question ID: 146071
I need a list of ALL (or almost all.. very, very small ones less
important) US cities in a format I can easily import into Excel or
other database.  Don't need the state or zip (although they are OK, if
you find them), just the names of the cities.

Again, the answer should not be spread among multiple webpages; it
should be a single 'list' of the cities.

Thanks!
Answer  
Subject: Re: List of all US cities
Answered By: secret901-ga on 20 Jan 2003 15:09 PST
Rated:5 out of 5 stars
 
Hello uc1bear,
Thank you for asking such an interesting question.  I had previously
searched for the same thing for my personal use, so locating such a
source was not difficult.  After some research, I found this file
online:
http://www.census.gov/ftp/pub/tiger/tms/gazetteer/places2k.txt
Since the file contains some extraneous information, I wrote a Java
program to cut them off, leaving only the city names as you wanted. 
You can download this file here:
http://www.lucidmatrix.com/uploads/places2kedited.txt
Please note that the city names are in the order that they appear in
the original file.  If you'd like to put them in alphabetical order or
format them in another way, please let me know.

If you need clarification, please ask for it before rating this
answer.
secret901-ga

Search strategy:
"US Cities" site:.gov
inurl:places2k.txt
Thanks scriptor :-)

Clarification of Answer by secret901-ga on 20 Jan 2003 15:33 PST
Here is another file which removes the ending in the city names (city,
town, village, etc) and leaves only the name of the city themselves.
http://www.lucidmatrix.com/uploads/places2kedited.txt 

secret901-ga

Clarification of Answer by secret901-ga on 20 Jan 2003 15:35 PST
Oops, sorry.  The previous link should be:
http://www.lucidmatrix.com/uploads/places2kedited2.txt 
Sorry for the confusion.
secret901-ga

Request for Answer Clarification by uc1bear-ga on 20 Jan 2003 16:56 PST
Hi Secret901,

That text file was 97% what I was looking for.  The minor problem was
that it required a bit of cleanup, as many of the locations had words
like 'town', 'city', 'urbana' (there were some Mexican cities), and
such after them.

If you can find one more small bit of daya, I'll be happy to give you
a perfect rating... A list of either all 50 states (shouldn't be
tough!) and/or all/most  countries.  Thanks again.  Looking forward to
it!

uc

Clarification of Answer by secret901-ga on 20 Jan 2003 17:17 PST
The cleanup was done in the previous clarification.  Click on the link
to see the cleaned up version :-)
The list of counties is found here:
http://www.census.gov/tiger/tms/gazetteer/county2k.txt
I've cleaned it up with my handy program:
http://www.lucidmatrix.com/uploads/county2kedited.txt 
Edited even more to remove the trailing "County", "Municipality", or
"Census Area":
http://www.lucidmatrix.com/uploads/county2kedited2.txt
List of states:
http://www.lucidmatrix.com/uploads/states.txt

I hope that this is what you're looking for!
If you need more clarification, please let me know.
secret901-ga

Clarification of Answer by secret901-ga on 20 Jan 2003 17:23 PST
Just a note of clarification: The cities and towns with Spanish names
are in Puerto Rico.  If you'd like me to exclude them, please let me
know and I'll remove them from the list.

Clarification of Answer by secret901-ga on 20 Jan 2003 17:42 PST
How silly of me! You said countries, not counties! 
Here are the countries of the world, adapted from the CIA website:
http://www.lucidmatrix.com/uploads/Countries.txt

secret901-ga

Request for Answer Clarification by uc1bear-ga on 06 Feb 2003 19:35 PST
Hi Secret901,

Just posted a new question that you may know the answer to.  Thanks, M

Clarification of Answer by secret901-ga on 06 Feb 2003 21:21 PST
Hi M,
Unfortunately, I am unable to locate your question.  Please post a link to it.

Request for Answer Clarification by uc1bear-ga on 26 Apr 2003 14:43 PDT
Hi Secret,

Any chance you can re-work the cleaning script to leave on the
two-letter state abbreviation, along with the cleaned city name
(already there)?  It's woth a $5 tip to me, and should be pretty
quick!  Thanks, uc

Clarification of Answer by secret901-ga on 26 Apr 2003 20:58 PDT
Hi uc1bear,
I apologize if this is response is late.  I haven't been on Google all
day.
Here is the link to the new file:
http://www.geocities.com/secret901/places2kkedited3.txt
I added the two-letter state abbreviation in the normal manner (e.g.
Los Angeles, CA).  If you'd like them to be in a different format, let
me know.

Unfortunately, it's not possible to tip once you have rated an answer.
 If you wish, you can open a new question directed to me, although
this is a totally voluntary.

secret901-ga

Clarification of Answer by secret901-ga on 26 Apr 2003 21:02 PDT
Oops, the last line should read "although this is totally voluntary."

secret901-ga

Request for Answer Clarification by uc1bear-ga on 30 Apr 2003 18:32 PDT
THANKS, Secret901.

Please see question 197730 for your tip!

Clarification of Answer by secret901-ga on 01 May 2003 00:14 PDT
Hi uc1bear,
Thank you for the nice rating and the tip.  Please use our service
again if you need anything done.

secret901-ga
uc1bear-ga rated this answer:5 out of 5 stars
Great answer!  Exactly what I needed, presented in a very helpful format.  Thanks!

Comments  
Subject: Re: List of all US cities
From: russjam-ga on 03 May 2003 00:59 PDT
 
Could you refer to question 198758 and the list price directed to you.

Thanx

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy