Skip to content

Instantly share code, notes, and snippets.

@jamazel
Created March 26, 2015 17:28
Show Gist options
  • Select an option

  • Save jamazel/feaf6fa6adeb887b028c to your computer and use it in GitHub Desktop.

Select an option

Save jamazel/feaf6fa6adeb887b028c to your computer and use it in GitHub Desktop.
Module 2 coursework
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Loading CSV Data with D3</title>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
</head>
<style>
.svg {
background: #fff1e0;
}
</style>
<body>
<svg class="svg" width="960" height="500">
<line x1="20" y1="460" x2="920" y2="460" stroke="#C1B8B8" stroke-width="3" />
<rect x="20" y="20" width="200" height="200" fill="#95BFC4" />
<circle cx="720" cy="420" r="30" fill="#B36C80" />
<circle cx="780" cy="420" r="30" fill="#E8A7A6" />
<circle cx="840" cy="420" r="30" fill="#D2716D" />
<circle cx="900" cy="420" r="30" fill="#D09D93" />
<text x="240" y="50" fill="#C1B8B8" font-size="32" font-weight="plain" font-family="Helvetica">Just messing with some basic svg elements</text>
</svg>
<script type="text/javascript">
//Load in contents of CSV file
d3.csv("RHI_data.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>
</body>
</html>
Nov 2011 Dec 2011 Jan 2012 Feb 2012 Mar 2012 Apr 2012 May 2012 Jun 2012 Jul 2012 Aug 2012 Sep 2012 Oct 2012 Nov 2012 Dec 2012 Jan 2013 Feb 2013 Mar 2013 Apr 2013 May 2013 Jun 2013 Jul 2013 Aug 2013 Sep 2013 Oct 2013 Nov 2013 Dec 2013 Jan 2014 Feb 2014 Mar 2014 Apr 2014 May 2014 Jun 2014 Jul 2014 Aug 2014 Sep 2014 Oct 2014 Nov 2014 Dec 2014
Number of full applications (by date of first submission) 7 42 65 92 94 79 74 77 99 117 87 114 151 129 197 178 172 185 185 206 197 206 448 219 260 287 317 333 445 363 338 1,118 168 227 1,638 115 242 2,201
Cumulative number of full applications 7 49 114 206 300 379 453 530 629 746 833 947 1,098 1,227 1,424 1,602 1,774 1,959 2,144 2,350 2,547 2,753 3,201 3,420 3,680 3,967 4,284 4,617 5,062 5,425 5,763 6,881 7,049 7,276 8,914 9,029 9,271 11,472
Number of full accreditations (by date first approval) 0 2 3 2 11 16 49 29 48 58 105 118 141 134 146 145 183 163 168 205 181 224 228 261 148 111 207 284 360 363 347 367 409 444 386 373 461 369
Cumulative number of full accreditations 0 2 5 7 18 34 83 112 160 218 323 441 582 716 862 1,007 1,190 1,353 1,521 1,726 1,907 2,131 2,359 2,620 2,768 2,879 3,086 3,370 3,730 4,093 4,440 4,807 5,216 5,660 6,046 6,419 6,880 7,249
Total installed capacity (MW) (by date of first approval) 0.0 0.0 0.4 0.1 1.8 3.9 26.6 4.8 14.6 7.5 17.8 22.3 24.2 20.3 27.8 37.6 34.5 29.2 27.2 52.6 42.9 48.8 39.5 43.5 30.7 16.7 25.9 32.9 53.6 47.4 54.9 59.8 57.1 69.9 59.2 61.5 64.8 51.7
Cumulative installed capacity 0.0 0.0 0.5 0.6 2.4 6.3 32.9 37.8 52.4 59.9 77.6 100.0 124.2 144.5 172.3 209.9 244.4 273.6 300.8 353.3 396.2 445.0 484.5 528.0 558.7 575.3 601.2 634.2 687.8 735.1 790.0 849.8 907.0 976.9 1,036.1 1,097.6 1,162.4 1,214.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment