-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstatecode.py
More file actions
61 lines (60 loc) · 1.42 KB
/
statecode.py
File metadata and controls
61 lines (60 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
statecodes = {
'Alabama': 'US-AL',
'Alaska' : 'US-AK',
'Arizona': 'US-AZ',
'Arkansas': 'US-AR',
'California': 'US-CA',
'Colorado' : 'US-CO',
'Connecticut': 'US-CT',
'Delaware': 'US-DE',
'Florida': 'US-FL',
'Georgia': 'US-GA',
'Hawaii': 'US-HI',
'Idaho' : 'US-ID',
'Illinois': 'US-IL',
'Indiana': 'US-IN',
'Iowa': 'US-IA',
'Kansas': 'US-KS',
'Kentucky': 'US-KY',
'Louisiana': 'US-LA',
'Maine': 'US-ME',
'Maryland': 'US-MD',
'Massachusetts': 'US-MA',
'Michigan': 'US-MI',
'Minnesota': 'US-MS',
'Missouri': 'US-MO',
'Montana': 'US-MT',
'Nebraska': 'US-NE',
'Nevada': 'US-NV',
'New Hampshire': 'US-NH',
'New Jersey': 'US-NJ',
'New Mexico': 'US-NM',
'New York': 'US-NY',
'North Carolina': 'US-NC',
'North Dakota': 'US-ND',
'Ohio': 'US-OH',
'Oklahoma': 'US-OK',
'Oregon': 'US-OR',
'Pennsylvania': 'US-PA',
'Rhode Island': 'US-RI',
'South Carolina': 'US-SC',
'South Dakota': 'US-SD',
'Tennessee': 'US-TN',
'Texas': 'US-TX',
'Utah': 'US-UT',
'Vermont': 'US-VT',
'Virginia': 'US-VA',
'Washington': 'US-WA',
'West Virginia': 'US-WV',
'Wisconsin': 'US-WI',
'Wyoming': 'US-WY',
'District of Columbia': 'US-DC',
'American Samoa': 'US-AS',
'Guam': 'US-MP',
'Northern Mariana Islands': 'US-MP',
'Purto Rico': 'US-PR',
'United states Minor Outlying Islands': 'US-UM',
'U.S. Virgin Islands': 'US-VI'
}
def getstatecode(state):
return statecodes[state]