-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
144 lines (141 loc) · 4.37 KB
/
index.html
File metadata and controls
144 lines (141 loc) · 4.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/pure-min.css">
</head>
<body>
<!-- Navigation Bar -->
<div class="pure-menu pure-menu-horizontal" style="max-height: 40px; ">
<ul class="pure-menu-list">
<li class="pure-menu-item"><a href="index.html" class="pure-menu-link">Home</a></li>
<li class="pure-menu-item"><a href="about.html" class="pure-menu-link">About</a></li>
<li class="pure-menu-item"><a href="contact.html" class="pure-menu-link">Contact</a></li>
</ul>
</div>
<!-- Chart -->
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
<script>
$(function () {
$('#container').highcharts({
title: {
text: 'Open Data Link Reliability',
x: -20 //center
},
subtitle: {
text: 'Proof of concept (not real data)',
x: -20
},
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul']
},
yAxis: {
title: {
text: 'Reliable Links (%)'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
tooltip: {
valueSuffix: '°C'
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'middle',
borderWidth: 0
},
series: [{
name: 'Agriculture',
data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2]
}, {
name: 'Commerce',
data: [0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8]
}, {
name: 'Defense',
data: [0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6]
}, {
name: 'Education',
data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0]
}, {
name: 'Energy',
data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2]
}, {
name: 'Health and Human Services',
data: [0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8]
}, {
name: 'Homeland Security',
data: [0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6]
}, {
name: 'Housing and Urban Development',
data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0]
}, {
name: 'Justice',
data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2]
}, {
name: 'Labor',
data: [0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8]
}, {
name: 'State',
data: [0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6]
}, {
name: 'Interior',
data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0]
}, {
name: 'Treasury',
data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2]
}, {
name: 'Transportation',
data: [0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8]
}, {
name: 'Veteran Affairs',
data: [0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6]
}, {
name: 'EPA',
data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0]
}, {
name: 'GSA',
data: [0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6]
}, {
name: 'NASA',
data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0]
}, {
name: 'NSF',
data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2]
}, {
name: 'NRC',
data: [0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8]
}, {
name: 'OPM',
data: [0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6]
}, {
name: 'SBA',
data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0]
}, {
name: 'SSA',
data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2]
}, {
name: 'U.S. AID',
data: [0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8]
}]
});
});
$(document).ready(function() {
$.ajax({
type: "GET",
url: "/data/broken.csv",
dataType: "text",
success: function(data) {processData(data);}
});
});
function processData(allText) {
var allTextLines = allText.split(/\r\n|\n/);
console.log(allTextLines);
}
</script>
</body>
</html>