I was writing some python for my little Simple Voice Assistant project. I started just wanting the current temperature for Austin. It’s available lots of places but I wanted if from an official source and didn’t want to scrape web pages. I found what I was looking for at the weather.gov pages. Some XML keying off of latitude and longitude that gives all sorts of weather data.
I got it working for Austin pretty quickly but then I decided to do some other cities. I looked up their latitude and longitude and entered them by hand in a small table. Figuring there was a better way, I found some JSON with the locations of the 1000 biggest cities in the US.
I didn’t really need all 1,000 (1,002 actually) but why not? But when I loaded them into a dict there was only 925 cities. What happened to the other 77? Didn’t take long to figure there were some duplicate names out there. I would have to index by city name + state name.
Out of curiosity I pulled out the duplicates. Sort of interesting list.
Albany: New York, Georgia, Oregon
Alexandria: Virginia, Louisiana
Apple Valley: California, Minnesota
Auburn: Washington, Alabama
Aurora: Colorado, Illinois
Bartlett: Tennessee, Illinois
Beaumont: Texas, California
Bellevue: Washington, Nebraska
Bloomington: Minnesota, Indiana, Illinois
Brentwood: California, Tennessee
Burlington: North Carolina, Vermont
Charleston: South Carolina, West Virginia
Cleveland: Ohio, Tennessee
Clovis: California, New Mexico
Columbia: South Carolina, Missouri
Columbus: Ohio, Georgia, Indiana
Concord: California, North Carolina, New Hampshire
Danville: California, Virginia
Decatur: Illinois, Alabama
Dublin: California, Ohio
Everett: Washington, Massachusetts
Fairfield: California, Ohio
Fayetteville: North Carolina, Arkansas
Florence: Alabama, South Carolina
Glendale: Arizona, California
Greenville: North Carolina, South Carolina
Huntsville: Alabama, Texas
Jackson: Mississippi, Tennessee
Jacksonville: Florida, North Carolina
Kansas City: Missouri, Kansas
Lafayette: Louisiana, Indiana
Lakewood: Colorado, California, Washington, Ohio
Lancaster: California, Pennsylvania, Ohio, Texas
Lawrence: Kansas, Massachusetts, Indiana
Lincoln: Nebraska, California
Madison: Wisconsin, Alabama
Mansfield: Texas, Ohio
Medford: Oregon, Massachusetts
Meridian: Idaho, Mississippi
Middletown: Ohio, Connecticut
Midland: Texas, Michigan
Newark: New Jersey, Ohio, California
Norwalk: California, Connecticut
Pasadena: Texas, California
Peoria: Arizona, Illinois
Plainfield: New Jersey, Illinois
Portland: Oregon, Maine
Quincy: Massachusetts, Illinois
Richmond: Virginia, California
Rochester: New York, Minnesota
Roseville: California, Michigan
Roswell: Georgia, New Mexico
Salem: Oregon, Massachusetts
San Marcos: California, Texas
Smyrna: Georgia, Tennessee
Springfield: Missouri, Massachusetts, Illinois, Oregon, Ohio
St. Cloud: Minnesota, Florida
Troy: Michigan, New York
Union City: California, New Jersey
Warren: Michigan, Ohio
Westminster: Colorado, California
Wilmington: North Carolina, Delaware
My recollection, working one summer stuffing catalogs into dirty rotten U.S. mailbags on the night-shift during a college summer “vacation”, was there were a whole lot of towns named Lebanon in America. D.N.
LikeLike
At first I typed a few cities in by hand. I figured I’d do the top 25 or so. Then I found the JSON file with the top 1000. Figured I would just use them all. I was a bit worried about two Austin’s, Texas and Minnesota (home of spam!) but I guess Austin, MN isnt in the top 1000. A bunch of Springfield’s, but I’m less to believe there are 50, one in every state. Most must be very small towns.
LikeLike