-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Plot by zip code - Plot by state - Capture more errors better - Do some data sanitizing to get better data
- Loading branch information
1 parent
d32021b
commit 06eaf7c
Showing
6 changed files
with
153 additions
and
39 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -131,3 +131,10 @@ dmypy.json | |
ips | ||
*.html | ||
*.pkl | ||
*.cpg | ||
*.dbf | ||
*.prj | ||
*.shp | ||
*.shp.ea.iso.xml | ||
*.shp.iso.xml | ||
*.shx |
This file contains 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
This file contains 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
This file contains 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
Empty file.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Credits to https://gist.github.com/rogerallen/1583593 | ||
|
||
us_state_to_abbrev = { | ||
"Alabama": "AL", | ||
"Alaska": "AK", | ||
"Arizona": "AZ", | ||
"Arkansas": "AR", | ||
"California": "CA", | ||
"Colorado": "CO", | ||
"Connecticut": "CT", | ||
"Delaware": "DE", | ||
"Florida": "FL", | ||
"Georgia": "GA", | ||
"Hawaii": "HI", | ||
"Idaho": "ID", | ||
"Illinois": "IL", | ||
"Indiana": "IN", | ||
"Iowa": "IA", | ||
"Kansas": "KS", | ||
"Kentucky": "KY", | ||
"Louisiana": "LA", | ||
"Maine": "ME", | ||
"Maryland": "MD", | ||
"Massachusetts": "MA", | ||
"Michigan": "MI", | ||
"Minnesota": "MN", | ||
"Mississippi": "MS", | ||
"Missouri": "MO", | ||
"Montana": "MT", | ||
"Nebraska": "NE", | ||
"Nevada": "NV", | ||
"New Hampshire": "NH", | ||
"New Jersey": "NJ", | ||
"New Mexico": "NM", | ||
"New York": "NY", | ||
"North Carolina": "NC", | ||
"North Dakota": "ND", | ||
"Ohio": "OH", | ||
"Oklahoma": "OK", | ||
"Oregon": "OR", | ||
"Pennsylvania": "PA", | ||
"Rhode Island": "RI", | ||
"South Carolina": "SC", | ||
"South Dakota": "SD", | ||
"Tennessee": "TN", | ||
"Texas": "TX", | ||
"Utah": "UT", | ||
"Vermont": "VT", | ||
"Virginia": "VA", | ||
"Washington": "WA", | ||
"West Virginia": "WV", | ||
"Wisconsin": "WI", | ||
"Wyoming": "WY", | ||
"District of Columbia": "DC", | ||
"American Samoa": "AS", | ||
"Guam": "GU", | ||
"Northern Mariana Islands": "MP", | ||
"Puerto Rico": "PR", | ||
"United States Minor Outlying Islands": "UM", | ||
"U.S. Virgin Islands": "VI", | ||
} | ||
|
||
# invert the dictionary | ||
abbrev_to_us_state = dict(map(reversed, us_state_to_abbrev.items())) | ||
|
||
if __name__ == "__main__": | ||
print(abbrev_to_us_state['NY']) |