Adjacency List of States of the United States (US)
Posted: March 20, 2009 Filed under: Python | Tags: data, free 4 Comments »Some simple data is surprisingly hard to find. Case in point: for some mapping projects, I wanted an adjacency list of the US states. I couldn’t find one easily, so I made one. Spread it far and wide! This should be a pretty easy to digest form. Figure out what states are next to each other (neighbors) with ease!
Potential gotchas:
- I say the four corners (UT,CO,NM,AZ) all touch. If you don’t like it, take them out.
- DC is a state here, but Guam, USVI and others aren’t.
- It’ll be a cold day in hell before I recognize Missouri.
# Author Gregg Lind # License: Public Domain. I would love to hear about any projects you use if it for though! AK AL,MS,TN,GA,FL AR,MO,TN,MS,LA,TX,OK AZ,CA,NV,UT,CO,NM CA,OR,NV,AZ CO,WY,NE,KS,OK,NM,AZ,UT CT,NY,MA,RI DC,MD,VA DE,MD,PA,NJ FL,AL,GA GA,FL,AL,TN,NC,SC HI IA,MN,WI,IL,MO,NE,SD ID,MT,WY,UT,NV,OR,WA IL,IN,KY,MO,IA,WI IN,MI,OH,KY,IL KS,NE,MO,OK,CO KY,IN,OH,WV,VA,TN,MO,IL LA,TX,AR,MS MA,RI,CT,NY,NH,VT MD,VA,WV,PA,DC,DE ME,NH MI,WI,IN,OH MN,WI,IA,SD,ND MO,IA,IL,KY,TN,AR,OK,KS,NE MS,LA,AR,TN,AL MT,ND,SD,WY,ID NC,VA,TN,GA,SC ND,MN,SD,MT NE,SD,IA,MO,KS,CO,WY NH,VT,ME,MA NJ,DE,PA,NY NM,AZ,UT,CO,OK,TX NV,ID,UT,AZ,CA,OR NY,NJ,PA,VT,MA,CT OH,PA,WV,KY,IN,MI OK,KS,MO,AR,TX,NM,CO OR,CA,NV,ID,WA PA,NY,NJ,DE,MD,WV,OH RI,CT,MA SC,GA,NC SD,ND,MN,IA,NE,WY,MT TN,KY,VA,NC,GA,AL,MS,AR,MO TX,NM,OK,AR,LA UT,ID,WY,CO,NM,AZ,NV VA,NC,TN,KY,WV,MD,DC VT,NY,NH,MA WA,ID,OR WI,MI,MN,IA,IL WV,OH,PA,MD,VA,KY WY,MT,SD,NE,CO,UT,ID
Potential additions :
Canada : ME, NH, VT, NY, PA, OH, MI, MN, ND, MT, ID, WA, AK (OH and PA are adjacent by water only)
Mexico : CA, AZ, NM, TX
MANY thanks. You don’t know how much I appreciate that. Saved me a lot of time.
I made a json version here: https://gist.github.com/3906059
Just what I was looking for! Used in a logic programming example
https://github.com/logpy/logpy/blob/master/examples/states.py