[ Launch: basic_json ] af9798cdd82d8f7fc4df by jshumakerpruitt
[ Launch: test ] 4653053 by enjalot
[ Launch: test ] 4652017 by enjalot
[ Launch: test ] 4582399 by enjalot
-
-
Save jshumakerpruitt/af9798cdd82d8f7fc4df to your computer and use it in GitHub Desktop.
basic_json
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
{"description":"basic_json","endpoint":"","display":"svg","public":true,"require":[],"fileconfigs":{"inlet.js":{"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},"plaza_traffic.json":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"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,"tab":"edit","display_percent":0.7,"thumbnail":"http://i.imgur.com/Wf1AK4W.gif","fullscreen":false,"ajax-caching":true} |
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
var svg = d3.select("svg") | |
var d = tributary.plaza_traffic.cash | |
var colors = d3.scale.linear().range(["#0f27ff","#ff170f"]); | |
//alert(colors(3) | |
svg.selectAll("circle") | |
.data(d) | |
.enter() | |
.append("circle") | |
.attr({ | |
r: function(d){return d.count/467}, | |
cx: function(d){return d.count/56}, | |
cy: 100, //function(d){return d.id * 58*Math.random()}, | |
fill: function(d){return colors(d.count/32840)} | |
}); | |
svg.selectAll("rect") | |
.data(d) | |
.enter() | |
.append("rect") | |
.attr({ | |
width:function(d){return d.count/300}, | |
height:function(d){return d.count/300}, | |
x:function(d){return d.count/60 + 10}, | |
y:200, | |
fill:function(d){return colors(d.count/30000)}}); | |
svg.selectAll("text") | |
.data(d) | |
.enter() | |
.append("text") | |
.attr({ | |
x:function(d){return d.count/68}, | |
y:function(d){return d.count/71+d.id*5}}) | |
.text(function(d){return d.name}) |
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
{ | |
"cash": [ | |
{ | |
"count": 26774.09756097561, | |
"id": 1, | |
"name": "Robert F. Kennedy Bridge Bronx Plaza" | |
}, | |
{ | |
"count": 18612.77618364419, | |
"id": 2, | |
"name": "Robert F. Kennedy Bridge Manhattan Plaza" | |
}, | |
{ | |
"count": 31343.0631276901, | |
"id": 3, | |
"name": "Bronx-Whitestone Bridge" | |
}, | |
{ | |
"count": 9863.7658045977, | |
"id": 4, | |
"name": "Henry Hudson Bridge" | |
}, | |
{ | |
"count": 3805.8350071736013, | |
"id": 5, | |
"name": "Marine Parkway-Gil Hodges Memorial Bridge" | |
}, | |
{ | |
"count": 4577.186513629842, | |
"id": 6, | |
"name": "Cross Bay Veterans Memorial Bridge" | |
}, | |
{ | |
"count": 13830.994261119082, | |
"id": 7, | |
"name": "Queens Midtown Tunnel" | |
}, | |
{ | |
"count": 6900.047345767575, | |
"id": 8, | |
"name": "Brooklyn-Battery Tunnel" | |
}, | |
{ | |
"count": 25262.48493543759, | |
"id": 9, | |
"name": "Throgs Neck Bridge" | |
}, | |
{ | |
"count": 18275.3543758967, | |
"id": 11, | |
"name": "Verrazano-Narrows Bridge" | |
} | |
], | |
"electronic": [ | |
{ | |
"count": 51316.53802008608, | |
"id": 1, | |
"name": "Robert F. Kennedy Bridge Bronx Plaza" | |
}, | |
{ | |
"count": 67502.12482065997, | |
"id": 2, | |
"name": "Robert F. Kennedy Bridge Manhattan Plaza" | |
}, | |
{ | |
"count": 76906.89383070302, | |
"id": 3, | |
"name": "Bronx-Whitestone Bridge" | |
}, | |
{ | |
"count": 51861.5933908046, | |
"id": 4, | |
"name": "Henry Hudson Bridge" | |
}, | |
{ | |
"count": 17488.73888091822, | |
"id": 5, | |
"name": "Marine Parkway-Gil Hodges Memorial Bridge" | |
}, | |
{ | |
"count": 16056.855093256814, | |
"id": 6, | |
"name": "Cross Bay Veterans Memorial Bridge" | |
}, | |
{ | |
"count": 65148.13916786227, | |
"id": 7, | |
"name": "Queens Midtown Tunnel" | |
}, | |
{ | |
"count": 38908.203730272595, | |
"id": 8, | |
"name": "Brooklyn-Battery Tunnel" | |
}, | |
{ | |
"count": 84575.18794835007, | |
"id": 9, | |
"name": "Throgs Neck Bridge" | |
}, | |
{ | |
"count": 74291.31420373028, | |
"id": 11, | |
"name": "Verrazano-Narrows Bridge" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment