Where can I get a comma or space-separated list of major U.S. cities?
June 28, 2008 8:06 PM Subscribe
Where can I get a comma or space-separated list of major U.S. cities?
I'm trying to add a "city" filter to a social-y site I'm building. I need to load a list of cities into the DB to populate the filter dropdown. Google's pointed me to a lot of ugly tables, I just need a space or comma separated list to feed into the beast. I'm thinking the top 100 cities or so would do the trick. No need to be exhaustive. Suggestions?
I'm trying to add a "city" filter to a social-y site I'm building. I need to load a list of cities into the DB to populate the filter dropdown. Google's pointed me to a lot of ugly tables, I just need a space or comma separated list to feed into the beast. I'm thinking the top 100 cities or so would do the trick. No need to be exhaustive. Suggestions?
Allow me to suggest a space-delimited list might not work very well, since that list would wind up with cities like
New
York
San
Francisco
I also suggest that if you find the information you need in tabular form, search and replace are your friends for getting the information into a form you can use.
posted by adamrice at 8:47 PM on June 28, 2008
New
York
San
Francisco
I also suggest that if you find the information you need in tabular form, search and replace are your friends for getting the information into a form you can use.
posted by adamrice at 8:47 PM on June 28, 2008
Best answer: http://www.census.gov/popest/cities/tables/SUB-EST2006-01.csv (from here)
Top 100 (by population) pre-parsed (newline separated, but you should be able to take it from here):
New York
Los Angeles
Chicago
Houston
Phoenix
Philadelphia
San Antonio
San Diego
Dallas
San Jose
Detroit
Jacksonville
Indianapolis
San Francisco
Columbus
Austin
Memphis
Fort Worth
Baltimore
Charlotte
El Paso
Boston
Seattle
Washington
Milwaukee
Denver
Louisville/Jefferson County
Las Vegas
Nashville-Davidson
Oklahoma City
Portland
Tucson
Albuquerque
Atlanta
Long Beach
Fresno
Sacramento
Mesa
Kansas City
Cleveland
Virginia Beach
Omaha
Miami
Oakland
Tulsa
Honolulu
Minneapolis
Colorado Springs
Arlington
Wichita
Raleigh
St. Louis
Santa Ana
Anaheim
Tampa
Cincinnati
Pittsburgh
Bakersfield
Aurora
Toledo
Riverside
Stockton
Corpus Christi
Newark
Anchorage
Buffalo
St. Paul
Lexington-Fayette
Plano
Fort Wayne
St. Petersburg
Glendale
Jersey City
Lincoln
Henderson
Chandler
Greensboro
Scottsdale
Baton Rouge
Birmingham
Norfolk
Madison
New Orleans
Chesapeake
Orlando
Garland
Hialeah
Laredo
Chula Vista
Lubbock
Reno
Akron
Durham
Rochester
Modesto
Montgomery
Fremont
Shreveport
Arlington
Glendale
posted by aparrish at 8:50 PM on June 28, 2008
Top 100 (by population) pre-parsed (newline separated, but you should be able to take it from here):
New York
Los Angeles
Chicago
Houston
Phoenix
Philadelphia
San Antonio
San Diego
Dallas
San Jose
Detroit
Jacksonville
Indianapolis
San Francisco
Columbus
Austin
Memphis
Fort Worth
Baltimore
Charlotte
El Paso
Boston
Seattle
Washington
Milwaukee
Denver
Louisville/Jefferson County
Las Vegas
Nashville-Davidson
Oklahoma City
Portland
Tucson
Albuquerque
Atlanta
Long Beach
Fresno
Sacramento
Mesa
Kansas City
Cleveland
Virginia Beach
Omaha
Miami
Oakland
Tulsa
Honolulu
Minneapolis
Colorado Springs
Arlington
Wichita
Raleigh
St. Louis
Santa Ana
Anaheim
Tampa
Cincinnati
Pittsburgh
Bakersfield
Aurora
Toledo
Riverside
Stockton
Corpus Christi
Newark
Anchorage
Buffalo
St. Paul
Lexington-Fayette
Plano
Fort Wayne
St. Petersburg
Glendale
Jersey City
Lincoln
Henderson
Chandler
Greensboro
Scottsdale
Baton Rouge
Birmingham
Norfolk
Madison
New Orleans
Chesapeake
Orlando
Garland
Hialeah
Laredo
Chula Vista
Lubbock
Reno
Akron
Durham
Rochester
Modesto
Montgomery
Fremont
Shreveport
Arlington
Glendale
posted by aparrish at 8:50 PM on June 28, 2008
Do you want a list of cities, where LA != Anaheim != Burbank, or do you want a list of metro areas such that Washington = Arlington = Fairfax?
There's a list of MSAs by population here, presumably taken from census information. The only thing you'd need to do is replace the not-very-useful names with "Greater NYC area," "Greater LA area," and so on.
On second glance, they even have nicknames, so hey. Free dummy.
posted by ROU_Xenophobe at 9:11 PM on June 28, 2008
There's a list of MSAs by population here, presumably taken from census information. The only thing you'd need to do is replace the not-very-useful names with "Greater NYC area," "Greater LA area," and so on.
On second glance, they even have nicknames, so hey. Free dummy.
posted by ROU_Xenophobe at 9:11 PM on June 28, 2008
Response by poster: Thanks, I think I'm all squared away. I'm sucking these into Drupal, which can mass import a list with line breaks after each item. Thanks!
posted by bflora at 10:11 PM on June 28, 2008
posted by bflora at 10:11 PM on June 28, 2008
This thread is closed to new comments.
or
http://www.maxmind.com/download/worldcities/
posted by blue_wardrobe at 8:22 PM on June 28, 2008