This repository has been archived by the owner on Dec 23, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #707 from jmcarp/feature/update-maps
Feature/update maps
- Loading branch information
Showing
11 changed files
with
78 additions
and
97 deletions.
There are no files selected for viewing
File renamed without changes.
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,7 @@ | ||
# Data Sources | ||
|
||
* US states | ||
* Build from Census data using https://github.com/mbostock/us-atlas | ||
|
||
* FIPS state codes | ||
* http://www2.census.gov/geo/docs/reference/state.txt |
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 @@ | ||
[{"STATE": "01", "STUSAB": "AL", "STATE_NAME": "Alabama", "STATENS": "01779775"}, {"STATE": "02", "STUSAB": "AK", "STATE_NAME": "Alaska", "STATENS": "01785533"}, {"STATE": "04", "STUSAB": "AZ", "STATE_NAME": "Arizona", "STATENS": "01779777"}, {"STATE": "05", "STUSAB": "AR", "STATE_NAME": "Arkansas", "STATENS": "00068085"}, {"STATE": "06", "STUSAB": "CA", "STATE_NAME": "California", "STATENS": "01779778"}, {"STATE": "08", "STUSAB": "CO", "STATE_NAME": "Colorado", "STATENS": "01779779"}, {"STATE": "09", "STUSAB": "CT", "STATE_NAME": "Connecticut", "STATENS": "01779780"}, {"STATE": "10", "STUSAB": "DE", "STATE_NAME": "Delaware", "STATENS": "01779781"}, {"STATE": "11", "STUSAB": "DC", "STATE_NAME": "District of Columbia", "STATENS": "01702382"}, {"STATE": "12", "STUSAB": "FL", "STATE_NAME": "Florida", "STATENS": "00294478"}, {"STATE": "13", "STUSAB": "GA", "STATE_NAME": "Georgia", "STATENS": "01705317"}, {"STATE": "15", "STUSAB": "HI", "STATE_NAME": "Hawaii", "STATENS": "01779782"}, {"STATE": "16", "STUSAB": "ID", "STATE_NAME": "Idaho", "STATENS": "01779783"}, {"STATE": "17", "STUSAB": "IL", "STATE_NAME": "Illinois", "STATENS": "01779784"}, {"STATE": "18", "STUSAB": "IN", "STATE_NAME": "Indiana", "STATENS": "00448508"}, {"STATE": "19", "STUSAB": "IA", "STATE_NAME": "Iowa", "STATENS": "01779785"}, {"STATE": "20", "STUSAB": "KS", "STATE_NAME": "Kansas", "STATENS": "00481813"}, {"STATE": "21", "STUSAB": "KY", "STATE_NAME": "Kentucky", "STATENS": "01779786"}, {"STATE": "22", "STUSAB": "LA", "STATE_NAME": "Louisiana", "STATENS": "01629543"}, {"STATE": "23", "STUSAB": "ME", "STATE_NAME": "Maine", "STATENS": "01779787"}, {"STATE": "24", "STUSAB": "MD", "STATE_NAME": "Maryland", "STATENS": "01714934"}, {"STATE": "25", "STUSAB": "MA", "STATE_NAME": "Massachusetts", "STATENS": "00606926"}, {"STATE": "26", "STUSAB": "MI", "STATE_NAME": "Michigan", "STATENS": "01779789"}, {"STATE": "27", "STUSAB": "MN", "STATE_NAME": "Minnesota", "STATENS": "00662849"}, {"STATE": "28", "STUSAB": "MS", "STATE_NAME": "Mississippi", "STATENS": "01779790"}, {"STATE": "29", "STUSAB": "MO", "STATE_NAME": "Missouri", "STATENS": "01779791"}, {"STATE": "30", "STUSAB": "MT", "STATE_NAME": "Montana", "STATENS": "00767982"}, {"STATE": "31", "STUSAB": "NE", "STATE_NAME": "Nebraska", "STATENS": "01779792"}, {"STATE": "32", "STUSAB": "NV", "STATE_NAME": "Nevada", "STATENS": "01779793"}, {"STATE": "33", "STUSAB": "NH", "STATE_NAME": "New Hampshire", "STATENS": "01779794"}, {"STATE": "34", "STUSAB": "NJ", "STATE_NAME": "New Jersey", "STATENS": "01779795"}, {"STATE": "35", "STUSAB": "NM", "STATE_NAME": "New Mexico", "STATENS": "00897535"}, {"STATE": "36", "STUSAB": "NY", "STATE_NAME": "New York", "STATENS": "01779796"}, {"STATE": "37", "STUSAB": "NC", "STATE_NAME": "North Carolina", "STATENS": "01027616"}, {"STATE": "38", "STUSAB": "ND", "STATE_NAME": "North Dakota", "STATENS": "01779797"}, {"STATE": "39", "STUSAB": "OH", "STATE_NAME": "Ohio", "STATENS": "01085497"}, {"STATE": "40", "STUSAB": "OK", "STATE_NAME": "Oklahoma", "STATENS": "01102857"}, {"STATE": "41", "STUSAB": "OR", "STATE_NAME": "Oregon", "STATENS": "01155107"}, {"STATE": "42", "STUSAB": "PA", "STATE_NAME": "Pennsylvania", "STATENS": "01779798"}, {"STATE": "44", "STUSAB": "RI", "STATE_NAME": "Rhode Island", "STATENS": "01219835"}, {"STATE": "45", "STUSAB": "SC", "STATE_NAME": "South Carolina", "STATENS": "01779799"}, {"STATE": "46", "STUSAB": "SD", "STATE_NAME": "South Dakota", "STATENS": "01785534"}, {"STATE": "47", "STUSAB": "TN", "STATE_NAME": "Tennessee", "STATENS": "01325873"}, {"STATE": "48", "STUSAB": "TX", "STATE_NAME": "Texas", "STATENS": "01779801"}, {"STATE": "49", "STUSAB": "UT", "STATE_NAME": "Utah", "STATENS": "01455989"}, {"STATE": "50", "STUSAB": "VT", "STATE_NAME": "Vermont", "STATENS": "01779802"}, {"STATE": "51", "STUSAB": "VA", "STATE_NAME": "Virginia", "STATENS": "01779803"}, {"STATE": "53", "STUSAB": "WA", "STATE_NAME": "Washington", "STATENS": "01779804"}, {"STATE": "54", "STUSAB": "WV", "STATE_NAME": "West Virginia", "STATENS": "01779805"}, {"STATE": "55", "STUSAB": "WI", "STATE_NAME": "Wisconsin", "STATENS": "01779806"}, {"STATE": "56", "STUSAB": "WY", "STATE_NAME": "Wyoming", "STATENS": "01779807"}, {"STATE": "60", "STUSAB": "AS", "STATE_NAME": "American Samoa", "STATENS": "01802701"}, {"STATE": "66", "STUSAB": "GU", "STATE_NAME": "Guam", "STATENS": "01802705"}, {"STATE": "69", "STUSAB": "MP", "STATE_NAME": "Northern Mariana Islands", "STATENS": "01779809"}, {"STATE": "72", "STUSAB": "PR", "STATE_NAME": "Puerto Rico", "STATENS": "01779808"}, {"STATE": "74", "STUSAB": "UM", "STATE_NAME": "U.S. Minor Outlying Islands", "STATENS": "01878752"}, {"STATE": "78", "STUSAB": "VI", "STATE_NAME": "U.S. Virgin Islands", "STATENS": "01802710"}] |
File renamed without changes.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
'use strict'; | ||
|
||
/* global require, module */ | ||
|
||
var _ = require('underscore'); | ||
|
||
function byField(values, key) { | ||
var getter = typeof key === 'function' ? | ||
key : | ||
function(val) { | ||
return val[key]; | ||
}; | ||
return _.reduce(values, function(acc, val) { | ||
acc[getter(val)] = val; | ||
return acc; | ||
}, {}); | ||
} | ||
|
||
var fips = _.each(require('../data/state.json'), function(row) { | ||
row.STATE = parseInt(row.STATE); | ||
}); | ||
var fipsByCode = byField(fips, 'STATE'); | ||
var fipsByState = byField(fips, 'STUSAB'); | ||
|
||
module.exports = { | ||
fips: fips, | ||
fipsByCode: fipsByCode, | ||
fipsByState: fipsByState | ||
}; |
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 was deleted.
Oops, something went wrong.