Created
June 26, 2012 18:37
-
-
Save dandye/2997828 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
state_abbrev2fips = { | |
'WA': '53', 'DE': '10', 'DC': '11', 'WI': '55', 'WV': '54', 'HI': '15', | |
'FL': '12', 'WY': '56', 'PR': '72', 'NJ': '34', 'NM': '35', 'TX': '48', | |
'LA': '22', 'NC': '37', 'ND': '38', 'NE': '31', 'TN': '47', 'NY': '36', | |
'PA': '42', 'AK': '02', 'NV': '32', 'NH': '33', 'VA': '51', 'CO': '08', | |
'CA': '06', 'AL': '01', 'AR': '05', 'VT': '50', 'IL': '17', 'GA': '13', | |
'IN': '18', 'IA': '19', 'MA': '25', 'AZ': '04', 'ID': '16', 'CT': '09', | |
'ME': '23', 'MD': '24', 'OK': '40', 'OH': '39', 'UT': '49', 'MO': '29', | |
'MN': '27', 'MI': '26', 'RI': '44', 'KS': '20', 'MT': '30', 'MS': '28', | |
'SC': '45', 'KY': '21', 'OR': '41', 'SD': '46' | |
} | |
fips2state_abbrev = dict((v,k) for k, v in state_abbrev2fips .iteritems()) | |
state_abbrev2state = dict( | |
AK='Alaska', AL='Alabama', AR='Arkansas', AS='American Samoa', AZ='Arizona', CA='California', | |
CO='Colorado', CT='Connecticut', DC='District of Columbia', DE='Delaware', FL='Florida', GA='Georgia', | |
GU='Guam', HI='Hawaii', IA='Iowa', ID='Idaho', IL='Illinois', IN='Indiana', KS='Kansas', KY='Kentucky', | |
LA='Louisiana', MA='Massachusetts', MD='Maryland', ME='Maine', MI='Michigan', MN='Minnesota', | |
MO='Missouri', MP='Northern Mariana Islands', MS='Mississippi', MT='Montana', NA='National', | |
NC='North Carolina', ND='North Dakota', NE='Nebraska', NH='New Hampshire', NJ='New Jersey', | |
NM='New Mexico', NV='Nevada', NY='New York', OH='Ohio', OK='Oklahoma', OR='Oregon', PA='Pennsylvania', | |
PR='Puerto Rico', RI='Rhode Island', SC='South Carolina', SD='South Dakota', TN='Tennessee', TX='Texas', | |
UT='Utah', VA='Virginia', VI='Virgin Islands', VT='Vermont', WA='Washington', WI='Wisconsin', | |
WV='West Virginia', WY='Wyoming') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment