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
// setup x | |
var xValue = function(d) { return d.Calories;}, // data -> value | |
xScale = d3.scale.linear().range([0, width]), // value -> display | |
xMap = function(d) { return xScale(xValue(d));}, // data -> display | |
xAxis = d3.svg.axis().scale(xScale).orient("bottom"); | |
// setup y | |
var yValue = function(d) { return d["Protein (g)"];}, // data -> value | |
yScale = d3.scale.linear().range([height, 0]), // value -> display | |
yMap = function(d) { return yScale(yValue(d));}, // data -> display |
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
var margin = {top: 20, right: 20, bottom: 30, left: 40}, | |
width = 960 - margin.left - margin.right, | |
height = 500 - margin.top - margin.bottom; |
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
<!DOCTYPE html> | |
<html> | |
<meta charset="utf-8"> | |
<!-- Example based on http://bl.ocks.org/mbostock/3887118 --> | |
<!-- Tooltip example from http://www.d3noob.org/2013/01/adding-tooltips-to-d3js-graph.html --> | |
<style> | |
/* Here's CSS code that will style our visualization */ |
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
Cereal Name | Manufacturer | Type | Calories | Protein (g) | Fat | Sodium | Dietary Fiber | Carbs | Sugars | Display Shelf | Potassium | Vitamins and Minerals | Serving Size Weight | Cups per Serving | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
100%_Bran | Nabisco | C | 70 | 4 | 1 | 130 | 10 | 5 | 6 | 3 | 280 | 25 | 1 | 0.33 | |
100%_Natural_Bran | Quaker Oats | C | 120 | 3 | 5 | 15 | 2 | 8 | 8 | 3 | 135 | 0 | 1 | -1 | |
All-Bran | Kelloggs | C | 70 | 4 | 1 | 260 | 9 | 7 | 5 | 3 | 320 | 25 | 1 | 0.33 | |
All-Bran_with_Extra_Fiber | Kelloggs | C | 50 | 4 | 0 | 140 | 14 | 8 | 0 | 3 | 330 | 25 | 1 | 0.5 | |
Almond_Delight | Ralston Purina | C | 110 | 2 | 2 | 200 | 1 | 14 | 8 | 3 | -1 | 25 | 1 | 0.75 | |
Apple_Cinnamon_Cheerios | General Mills | C | 110 | 2 | 2 | 180 | 1.5 | 10.5 | 10 | 1 | 70 | 25 | 1 | 0.75 | |
Apple_Jacks | Kelloggs | C | 110 | 2 | 0 | 125 | 1 | 11 | 14 | 2 | 30 | 25 | 1 | 1 | |
Basic_4 | General Mills | C | 130 | 3 | 2 | 210 | 2 | 18 | 8 | 3 | 100 | 25 | 1.33 | 0.75 | |
Bran_Chex | Ralston Purina | C | 90 | 2 | 1 | 200 | 4 | 15 | 6 | 1 | 125 | 25 | 1 | 0.67 |
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
100%_Bran | Nabisco | C | 70 | 4 | 1 | 130 | 10 | 5 | 6 | 3 | 280 | 25 | 1 | 0.33 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
100%_Natural_Bran | Quaker Oats | C | 120 | 3 | 5 | 15 | 2 | 8 | 8 | 3 | 135 | 0 | 1 | -1 | |
All-Bran | Kelloggs | C | 70 | 4 | 1 | 260 | 9 | 7 | 5 | 3 | 320 | 25 | 1 | 0.33 | |
All-Bran_with_Extra_Fiber | Kelloggs | C | 50 | 4 | 0 | 140 | 14 | 8 | 0 | 3 | 330 | 25 | 1 | 0.5 | |
Almond_Delight | Ralston Purina | C | 110 | 2 | 2 | 200 | 1 | 14 | 8 | 3 | -1 | 25 | 1 | 0.75 | |
Apple_Cinnamon_Cheerios | General Mills | C | 110 | 2 | 2 | 180 | 1.5 | 10.5 | 10 | 1 | 70 | 25 | 1 | 0.75 | |
Apple_Jacks | Kelloggs | C | 110 | 2 | 0 | 125 | 1 | 11 | 14 | 2 | 30 | 25 | 1 | 1 | |
Basic_4 | General Mills | C | 130 | 3 | 2 | 210 | 2 | 18 | 8 | 3 | 100 | 25 | 1.33 | 0.75 | |
Bran_Chex | Ralston Purina | C | 90 | 2 | 1 | 200 | 4 | 15 | 6 | 1 | 125 | 25 | 1 | 0.67 |
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
City/Town | State | Latitude | Longitude | Kids under 3 in Early Intervention | Median Household Income | Population | Per 100 residents | |
---|---|---|---|---|---|---|---|---|
Woonsocket | RI | 42.002876 | -71.514784 | 283 | $30,819 | 41,186 | 0.69 | |
Central Falls | RI | 41.890655 | -71.392278 | 110 | $22,628 | 19,376 | 0.57 | |
West Warwick | RI | 41.703671 | -71.521502 | 148 | $39,505 | 29,191 | 0.51 | |
Providence | RI | 41.823989 | -71.412834 | 876 | $26,867 | 178,042 | 0.49 | |
New Shoreham | RI | 41.172137 | -71.557607 | 5 | $44,779 | 1,051 | 0.48 | |
Pawtucket | RI | 41.878711 | -71.382556 | 337 | $31,775 | 71,148 | 0.47 | |
Newport | RI | 41.490102 | -71.312829 | 96 | $40,669 | 24,672 | 0.39 | |
East Greenwich | RI | 41.634262 | -71.513044 | 49 | $70,063 | 13,146 | 0.37 | |
Middletown | RI | 41.521824 | -71.283454 | 59 | $51,075 | 16,150 | 0.37 |
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
City/Town | State | Latitude | Longitude | Kids under 3 in Early Intervention | Median Household Income | Population | Per 100 residents | |
---|---|---|---|---|---|---|---|---|
Woonsocket | RI | 42.002876 | -71.514784 | 283 | $30,819 | 41,186 | 0.69 | |
Central Falls | RI | 41.890655 | -71.392278 | 110 | $22,628 | 19,376 | 0.57 | |
West Warwick | RI | 41.703671 | -71.521502 | 148 | $39,505 | 29,191 | 0.51 | |
Providence | RI | 41.823989 | -71.412834 | 876 | $26,867 | 178,042 | 0.49 | |
New Shoreham | RI | 41.172137 | -71.557607 | 5 | $44,779 | 1,051 | 0.48 | |
Pawtucket | RI | 41.878711 | -71.382556 | 337 | $31,775 | 71,148 | 0.47 | |
Newport | RI | 41.490102 | -71.312829 | 96 | $40,669 | 24,672 | 0.39 | |
East Greenwich | RI | 41.634262 | -71.513044 | 49 | $70,063 | 13,146 | 0.37 | |
Middletown | RI | 41.521824 | -71.283454 | 59 | $51,075 | 16,150 | 0.37 |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"/> | |
<title>sStory</title> | |
<script src="lib/js/3rdparty.min.js" type="text/javascript" charset="utf-8"></script> | |
<script src="http://maps.stamen.com/js/tile.stamen.js?v1.2.4" type="text/javascript"></script> | |
<script src="lib/js/sstory.js" type="text/javascript" charset="utf-8"></script> |
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
HTTP/1.1 200 OK | |
content-type:application/json;charset=utf-8 | |
x-frame-options:SAMEORIGIN | |
x-rate-limit-remaining:176 | |
last-modified:Tue, 18 Jun 2013 14:12:40 GMT | |
status:200 OK | |
date:Tue, 18 Jun 2013 14:12:40 GMT | |
x-transaction:c0b19d71d17fda79 | |
pragma:no-cache | |
cache-control:no-cache, no-store, must-revalidate, pre-check=0, post-check=0 |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>Untitled Document</title> | |
<style type="text/css"> | |
table.myTable { border-collapse:collapse; } | |
table.myTable td, table.myTable th { border:1px solid black;padding:0px; } |