[ Launch: Tributary inlet ] 5009223 by poezn
-
-
Save poezn/5009223 to your computer and use it in GitHub Desktop.
Tributary inlet
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
{"description":"Tributary inlet","endpoint":"","display":"svg","public":true,"require":[{"name":"topojson","url":"http://d3js.org/topojson.v0.min.js"}],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"us-topo.json":{"default":true,"vim":false,"emacs":false,"fontSize":12},"_.md":{"default":true,"vim":false,"emacs":false,"fontSize":12},"config.json":{"default":true,"vim":false,"emacs":false,"fontSize":12},"data.csv":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"fullscreen":false,"play":false,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"period","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01} |
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
code | name | place | category | |
---|---|---|---|---|
AL | Alabama | Walmart | Super Market | |
AK | Alaska | Super Store | Super Market | |
AZ | Arizona | LA Fitness | Fitness | |
AR | Arkansas | Walmart | Super Market | |
CA | California | 24 Hour Fitness | Fitness | |
CO | Colorado | Gas Station | Gas Station | |
CT | Connecticut | Stop&Shop | Super Market | |
DE | Delaware | Convenience Store | Super Market | |
DC | District of Columbia | - | - | |
FL | Florida | Walmart | Super Market | |
GA | Georgia | The Car | Car | |
HI | Hawaii | Beach | Outdoor | |
ID | Idaho | Walmart | Super Market | |
IL | Illinois | Train | Public Transportation | |
IN | Indiana | At Home | Home | |
IA | Iowa | Super Market | Super Market | |
KS | Kansas | Mc Donalds | Fast Food | |
KY | Kentucky | Super Market | Super Market | |
LA | Louisiana | Walmart | Super Market | |
ME | Maine | Super Market | Super Market | |
MD | Maryland | Park | Outdoor | |
MA | Massachusetts | Subway | Public Transportation | |
MI | Michigan | Super Store | Supermarket | |
MN | Minnesota | Super Market | Super Market | |
MS | Mississippi | Walmart | Super Market | |
MO | Missouri | Walmart | Super Market | |
MT | Montana | Walmart | Super Market | |
NE | Nebraska | Super Market | Super Market | |
NV | Nevada | Casino | Casino | |
NH | New Hampshire | Subway | Public Transportation | |
NJ | New Jersey | Train | Public Transportation | |
NM | New Mexico | Walmart | Super Market | |
NY | New York | Subway | Public Transportation | |
NC | North Carolina | Walmart | Super Market | |
ND | North Dakota | Bar | Bar | |
OH | Ohio | Walmart | Super Market | |
OK | Oklahoma | State Fair | State Fair | |
OR | Oregon | Bus | Public Transportation | |
PA | Pennsylvania | Convenience Store | Super Market | |
RI | Rhode Island | Parking Lots | Car | |
SC | South Carolina | Football Game | Sports Event | |
SD | South Dakota | Walmart | Super Market | |
TN | Tennessee | Walmart | Super Market | |
TX | Texas | Walmart | Super Market | |
UT | Utah | College Campus | College | |
VT | Vermont | Bar | Bar | |
VA | Virginia | Gym | Fitness | |
WA | Washington | Bus | Public Transportation | |
WV | West Virginia | Walmart | Super Market | |
WI | Wisconsin | - | - | |
WY | Wyoming | - | - | |
AS | America Samoa | - | - | |
FM | Federated States of Micronesia | - | - | |
GU | Guam | - | - | |
MH | Marshall Islands | - | - | |
MP | Northern Mariana Islands | - | - | |
PW | Palau | - | - | |
PR | Puerto Rico | - | - | |
UM | U.S. Minor Outlying Islands | - | - | |
VI | Virgin Islands of the United States | - | - |
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
//color coding http://callisto.ggsrv.com/imgsrv/FastFetch/UBER1/ZI-1175-2013-J-F00-IDSI-76-1 | |
var topology = tb['us-topo']; | |
var projection = d3.geo.albersUsa() | |
.scale(700) | |
.translate([374, 250]); | |
var path = d3.geo.path() | |
.projection(projection); | |
var geodata = topojson.object(topology, topology.objects["1959080"]).geometries; | |
var data = tb['data']; | |
var stateData = {}; | |
_.each(data, function(d, i) { stateData[d.code] = d}); | |
var colorScale = d3.scale.category20(); | |
g.selectAll("path") | |
.data(geodata) | |
.enter().append("path") | |
.attr("d", path) | |
.style({ | |
"fill": function(d, i) { | |
var state = stateData[d.id]; | |
console.log(state); | |
var category = state.category; | |
var place = state.place; | |
if (category == '-') { | |
return '#FFFFFF'; | |
} | |
return colorScale(category); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment