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
| makeCountyMap = (error, us, openpaths) -> | |
| console.log "HELLO!" | |
| console.log error, us, openpaths | |
| svg = d3.select("#county-map") | |
| .attr({ | |
| height: 500 | |
| width: 900 | |
| }) | |
| .style({ |
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":"Leap + Tributary","endpoint":"","display":"svg","public":true,"require":[],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"config.json":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"tab":"edit","display_percent":0.7,"play":true,"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,"hidepanel":false} |
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
| { | |
| "comments_url": "https://api.github.com/gists/4136856/comments", | |
| "created_at": "2012-11-23T19:02:56Z", | |
| "git_push_url": "git@gist.github.com:4136856.git", | |
| "description": "", | |
| "html_url": "https://gist.github.com/4136856", | |
| "url": "https://api.github.com/gists/4136856", | |
| "updated_at": "2012-11-23T19:18:00Z", | |
| "public": true, | |
| "forks": [ |
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
| { | |
| "snippet.js": { | |
| "type": "application/javascript", | |
| "filename": "snippet.js", | |
| "language": "JavaScript", | |
| "content": "vis = tributary.g\n \nvar width = 500,\n height = 300,\n padding = 80;\n\n// define the y scale (vertical)\nvar yScale = d3.scale.linear()\n .domain([0, 100]) // values between 0 and 100\n .range([height - padding, padding]); // map these to the chart height, less padding.\n\n// define the x scale (horizontal)\nvar mindate = new Date(2012,0,1),\n maxdate = new Date(2012,0,31);\n \nvar xScale = d3.time.scale()\n .domain([mindate, maxdate]) // values between for month of january\n\t.range([padding, width - padding * 2]); // map these the the chart width = total width minus padding at both sides\n \n\n// define the y axis\nvar yAxis = d3.svg.axis()\n .orient(\"left\")\n .ticks(5)\n .scale(yScale);\n\n\n// define the x axis\nvar xAxis = d3.svg.axis()\n .orient(\"bottom\")\n \t.ticks(4)\n .scale(xScale);\n\n// draw y axis with labels and move in from the size by th |
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
| metricHistory = (json) -> | |
| historydiv = d3.select("#history") | |
| width = 700 | |
| height = 100 | |
| console.log "JSAWN", json | |
| # Create a new SVG for each metric there is | |
| # "amMood", "optimism", "etc" |
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
| <!doctype html> | |
| <html> | |
| <head> | |
| <title></title> | |
| <meta charset=utf-8> | |
| <script type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script> | |
| <script type="text/javascript" src="https://raw.github.com/square/crossfilter/master/crossfilter.min.js"></script> | |
| <style> | |
| .menu1-container, .menu2-container, .menu3-container{ | |
| position: relative; |
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
| <!doctype html> | |
| <html> | |
| <head> | |
| <title></title> | |
| <meta charset=utf-8> | |
| <script type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script> | |
| <script type="text/javascript" src="https://raw.github.com/square/crossfilter/master/crossfilter.min.js"></script> | |
| <style> | |
| body { | |
| font-size: 100%; |
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":"Another Inlet","endpoint":"","display":"svg","public":true,"require":[{"name":"Underscore","url":"http://underscorejs.org/underscore-min.js"},{"name":"TopoJSON","url":"http://raw.github.com/mbostock/topojson/master/topojson.js"},{"name":"Queue","url":"http://d3js.org/queue.v1.min.js"}],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"config.json":{"default":true,"vim":false,"emacs":false,"fontSize":12},"us.json":{"default":true,"vim":false,"emacs":false,"fontSize":12},"openpaths.json":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"tab":"edit","display_percent":0.2738095238095243,"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,"hidepanel":false} |