Skip to content

Instantly share code, notes, and snippets.

@keboice
Created March 29, 2015 01:09
Show Gist options
  • Save keboice/2f41d366cb4b8fbc929e to your computer and use it in GitHub Desktop.
Save keboice/2f41d366cb4b8fbc929e to your computer and use it in GitHub Desktop.
Module 2: Data Load, SVG
Year Higher Education System Asian/Pac Is Black Filipino Latino Nat Amer Other White NonRes Alien No Response Total
2000 University of California 8487 1149 1320 4120 301 718 13264 819 2563 32741
2000 California State University 7524 2835 2174 10168 566 1701 24001 2010 4624 55603
2000 WASC-Accredited Non-public 4-Year Institutions (AICCU Member) 3699 1352 0 3258 219 0 14565 1456 1364 25913
2001 University of California 9394 1048 1412 4045 256 677 13490 868 1877 33067
2001 California State University 7660 2717 2356 10344 579 1908 24213 2211 4995 56983
2001 WASC-Accredited Non-public 4-Year Institutions (AICCU Member) 3677 1358 0 3403 248 0 14563 1248 1829 26326
2002 University of California 9708 1028 1442 4154 241 737 13778 946 2682 34716
2002 California State University 8080 3081 2514 11661 537 2134 25369 2438 5649 61463
2002 WASC-Accredited Non-public 4-Year Institutions (AICCU Member) 3751 1558 0 3570 215 0 15473 1225 1626 27418
2003 University of California 10709 1027 1564 4286 266 791 14543 1004 2935 37125
2003 California State University 7840 2950 2574 11939 481 2271 24677 2719 6261 61712
2003 WASC-Accredited Non-public 4-Year Institutions (AICCU Member) 3822 1582 0 3889 266 0 16183 1320 1774 28836
2004 University of California 11270 1063 1684 4663 234 868 14793 1104 2900 38579
2004 California State University 8277 3055 2753 12425 469 2113 26359 2826 7464 65741
2004 WASC-Accredited Non-public 4-Year Institutions (AICCU Member) 3865 1573 0 3872 236 0 16147 1262 2085 29040
2005 University of California 12350 1098 1687 5056 231 878 15289 1322 2951 40862
2005 California State University 8499 3054 2916 13153 524 2057 26279 2701 7585 66768
2005 WASC-Accredited Non-public 4-Year Institutions (AICCU Member) 4096 1694 0 4346 276 0 16817 1458 2389 31076
2006 University of California 12690 1169 1868 5323 265 902 15260 1314 2849 41640
2006 California State University 9096 3317 2837 13877 509 2054 27387 2845 7428 69350
2006 WASC-Accredited Non-public 4-Year Institutions (AICCU Member) 4206 1711 0 4763 283 0 17025 1347 2298 31633
2007 University of California 12861 1177 1824 5331 237 939 15308 1170 2740 41587
2007 California State University 9340 3440 2745 14483 490 1833 28039 2946 7571 70887
2007 WASC-Accredited Non-public 4-Year Institutions (AICCU Member) 4402 1757 0 4723 299 0 17319 1374 2261 32135
2008 University of California 13348 1134 1898 5668 222 890 15324 1195 2737 42416
2008 California State University 10064 3597 2958 15500 518 1678 29074 2588 7155 73132
2008 WASC-Accredited Non-public 4-Year Institutions (AICCU Member) 4476 1794 0 5037 259 0 17432 1323 2440 32761
2009 University of California 13709 1197 1845 5740 227 899 15450 1229 2370 42666
2009 California State University 9826 3708 3146 15389 629 1562 29891 2521 7971 74643
2009 WASC-Accredited Non-public 4-Year Institutions (AICCU Member) 4113 1652 0 4725 247 0 16213 1275 2414 30639
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Loading CSV Data with D3</title>
<script type="text/javascript" src="http://d3js.org/d3.v3.js"></script>
</head>
<body>
<script type="text/javascript">
//Load in contents of CSV file
d3.csv("degrees.csv", function(data) {
//Now CSV contents have been transformed into
//an array of JSON objects.
//Log 'data' to the console, for verification.
console.log(data);
});
</script>
<svg width="300" height="300">
<g>
<path fill="#00AEEF" d="M151.2,70.5c31.2,0,56.4,25.3,56.4,56.5c0,31.2-25.3,56.4-56.4,56.4c-31.2,0-56.4-25.3-56.4-56.4
C94.8,95.8,120.1,70.5,151.2,70.5"/>
<path d="M197.3,178.5c-12.2,11-28.4,17.7-46.1,17.7c-17.7,0-33.8-6.7-46.1-17.7c-32.9,17.5-55.4,53-55.7,94.1H253
C252.8,231.5,230.2,195.9,197.3,178.5z"/>
</g>
<g>
<line stroke="#000000" stroke-width="2" x1="212.3" y1="91.8" x2="212.3" y2="180"/>
<polygon stroke="#E6E6E5" stroke-width="1" points="65.3,75.5 152.3,25.6 239.2,77.8 154.9,130 "/>
</g>
<text x="16" y="273" fill="orange" font-size="42" font-weight="bold" font-family="Helvetica">Class of 2015</text>
</svg>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment