Last active
September 27, 2015 02:02
-
-
Save rphaedrus/fb55e6bf764b29d9e027 to your computer and use it in GitHub Desktop.
D30815 Module 2
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> | |
<head> | |
<title>Module 2 Exercise (D30815: Data Visualization and Infographics with D3; August 17-September 27, 2015)</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js" charset="utf-8"></script> | |
</head> | |
<body> | |
<h1>Module 2</h1> | |
<h2>SVG image:</h2> | |
<!-- svg borrowed from http://www.w3schools.com/svg/tryit.asp?filename=trysvg_text --> | |
<svg height="30" width="200"> | |
<text x="0" y="15" fill="red">I love SVG!</text> | |
Sorry, your browser does not support inline SVG. | |
</svg> | |
<h2>Check console to view the output of an object generated by d3 reading in a CSV</h2> | |
<script type="text/javascript"> | |
d3.csv("married_by_gender.csv", function(error, dataMbG) { | |
if (error) { return console.warn(error); } | |
console.log(dataMbG); | |
}); | |
</script> | |
</body> | |
</html> |
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
YEAR | SEX | MARST | count | |
---|---|---|---|---|
1900 | Female | Divorced | 2 | |
1900 | Female | Married | 256 | |
1900 | Female | Single | 155 | |
1900 | Female | Widowed | 61 | |
1900 | Male | Married | 263 | |
1900 | Male | Single | 320 | |
1900 | Male | Widowed | 32 | |
1910 | Female | Divorced | 3 | |
1910 | Female | Married | 256 | |
1910 | Female | Single | 123 | |
1910 | Female | Widowed | 32 | |
1910 | Male | Divorced | 3 | |
1910 | Male | Married | 318 | |
1910 | Male | Single | 658 | |
1910 | Male | Widowed | 30 | |
1920 | Female | Divorced | 9 | |
1920 | Female | Married | 205 | |
1920 | Female | Single | 57 | |
1920 | Female | Widowed | 29 | |
1920 | Male | Divorced | 16 | |
1920 | Male | Married | 241 | |
1920 | Male | Single | 420 | |
1920 | Male | Widowed | 27 | |
1930 | Female | Divorced | 7 | |
1930 | Female | Married | 148 | |
1930 | Female | Single | 35 | |
1930 | Female | Widowed | 18 | |
1930 | Male | Divorced | 12 | |
1930 | Male | Married | 165 | |
1930 | Male | Single | 372 | |
1930 | Male | Widowed | 36 | |
1940 | Female | Divorced | 10 | |
1940 | Female | Married | 147 | |
1940 | Female | Single | 23 | |
1940 | Female | Widowed | 33 | |
1940 | Male | Divorced | 17 | |
1940 | Male | Married | 160 | |
1940 | Male | Single | 512 | |
1940 | Male | Widowed | 14 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment