Skip to content

Instantly share code, notes, and snippets.

View mattykuch's full-sized avatar

Matthew Kuch mattykuch

View GitHub Profile
@mattykuch
mattykuch / Cases.csv
Last active July 17, 2022 05:46
UG COVID-19 Cases - 20th May
Day Date Value
60 19-May 260
59 18-May 248
58 17-May 227
57 16-May 227
56 15-May 203
55 14-May 160
54 13-May 139
53 12-May 129
52 11-May 121
@mattykuch
mattykuch / index.html
Created February 10, 2017 14:15
UCE 2000-2015 Performance Bump Chart made with D3.js
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<title>Top 20: UCE School Performance Bump Chart (2000 - 2015)</title>
</head>
<style>
body {
@mattykuch
mattykuch / area1.js
Created February 8, 2017 12:41
Linked Charts (Line and Bar) with D3.js
//Store width, height and margin in variables
var wLine = 550;
var hLine = 500;
var marginLine = {top: 40, right: 10, bottom: 20, left: 50};
//Set up date formatting and years
var dateFormat = d3.time.format("%Y");
// Scale the width and height
var xScaleLine = d3.time.scale()
@mattykuch
mattykuch / barchart.js
Created February 6, 2017 13:32
[2nd Iteration] Bar Charts, Not Linked
//Store width, height and margin in variables
var w = 500;
var h = 1500;
var margin = {top: 40, right: 10, bottom: 20, left: 50};
// Scale the width and height
var xScale = d3.scale.linear()
.range([0,w - margin.right - margin.left]);
var yScale = d3.scale.ordinal()
@mattykuch
mattykuch / barchart.js
Created January 29, 2017 15:28
[1st Iteration] Bar Chart: Top 100 : Best Performing O'level Schools in Uganda
// Create SVG
var svg = d3.select("#barchart")
.append("svg")
.attr("width", 1000)
.attr("height", 3400);
// Logic to handle Tooltip on Hover of Bar
var hoveron = function(d) {
console.log('d', d, 'event', event);
@mattykuch
mattykuch / coverage16_v3.csv
Last active July 17, 2022 05:51
[COMPLETE] Immunization Coverage in Uganda 2016 (Using D3.js)
id district pop_16 dpt16 bcg16 mea16 polio16 ipv16 pcv16 hpv16 dpt_droprate16 pentapcv_gap16 score16
1 ABIM 121,540 164 91 170 157 81 155 7 -17 9 89
2 ADJUMANI 229,324 111 91 102 106 44 105 4 0 7 100
3 AGAGO 236,066 120 91 105 204 49 120 0 -8 1 89
4 ALEBTONG 240,462 87 78 73 88 43 83 2 8 4 89
5 AMOLATAR 157,953 106 87 87 106 51 98 2 8 8 78
6 AMUDAT 115,059 103 70 96 103 59 101 0 -6 2 78
7 AMURIA 289,664 131 94 102 120 36 111 2 -3 20 78
8 AMURU 196,914 96 82 90 93 36 81 1 5 15 67
9 APAC 393,357 77 67 69 77 32 74 1 4 4 56