-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
265 lines (216 loc) · 6.22 KB
/
index.html
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
<!DOCTYPE html>
<meta charset="utf-8">
<title>Australian 2011 Census Explorer - Yuri Feldman</title>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-40134503-1', 'yuri.io');
ga('send', 'pageview');
</script>
<style>
@import url(http://fonts.googleapis.com/css?family=Amaranth:700);
// govhack: 419dce cb345e
body {
font-family: "Helvetica Neue";
margin: 0 auto;
width: 960px;
}
#body {
position: relative;
}
.text {
margin-bottom: 20px;
}
.description {
color: #666;
font-size: 12px;
}
footer {
padding: 2em 0 1em 0;
font-size: 12px;
}
h1 {
font-size: 96px;
margin-top: .3em;
margin-bottom: 0;
text-align: center;
}
h1 + h2 {
margin-top: 0;
}
h2 {
font-weight: 400;
font-size: 28px;
}
h1, h2 {
font-family: 'Amaranth', sans-serif;
text-rendering: optimizeLegibility;
}
.text > p, .text > h2 {
line-height: 1.5em;
width: 640px;
margin: 0 auto;
text-rendering: optimizeLegibility;
}
.charts {
width: 960px;
margin: 0 auto;
}
.chart {
display: inline-block;
height: 151px;
margin-bottom: 10px;
width: 225px;
padding: 0 4px 10px 4px;
}
.reset {
padding-left: 1em;
color: #cb345e;
}
.background.bar {
fill: #ccc;
}
.foreground.bar {
fill: #419dce;
}
.axis path, .axis line {
fill: none;
stroke: #000;
shape-rendering: crispEdges;
}
.axis text {
font: 10px sans-serif;
}
.brush rect.extent {
fill: #419dce;
fill-opacity: .125;
}
.brush .resize path {
fill: #eee;
stroke: #666;
}
.attribution {
font-size: smaller;
}
#map g {
fill: #fff;
stroke: #222;
stroke-width: 0.2px;
}
#hover {
min-height: 20px;
}
.list {
min-height: 400px;
}
#flight-list .date,
#flight-list .day {
margin-bottom: .4em;
}
#flight-list .flight {
line-height: 1.5em;
background: #eee;
width: 640px;
margin-bottom: 1px;
}
#flight-list .time {
color: #999;
}
#flight-list .flight div {
display: inline-block;
width: 100px;
}
#flight-list div.distance,
#flight-list div.delay {
width: 160px;
padding-right: 10px;
text-align: right;
}
#flight-list .early {
color: green;
}
aside {
display: inline;
float: right;
font-size: smaller;
}
.title:hover {
cursor: pointer;
text-decoration: underline;
}
.chart.selected .title {
font-weight: bold;
}
</style>
<h1>Census Explorer</h1>
<div id="body">
<a name="vis"></a>
<div class="charts">
<div class="chart">
<div class="title">Median Age</div>
<div class="description">Years</div>
</div>
<div class="chart">
<div class="title">Weekly Median Personal Income</div>
<div class="description">AUD</div>
</div>
<div class="chart">
<div class="title">Weekly Median Rent</div>
<div class="description">AUD</div>
</div>
<div class="chart">
<div class="title">Year 12 or Equivalent Complete</div>
<div class="description">Percentage of population</div>
</div>
</div>
<div class="charts">
<div class="chart">
<div class="title">Volunteers</div>
<div class="description">Percentage of population</div>
</div>
<div class="chart">
<div class="title">Born Outside Australia</div>
<div class="description">Percentage of population</div>
</div>
<div class="chart">
<div class="title">Labour Force</div>
<div class="description">Percentage of population</div>
</div>
<div class="chart">
<div class="title">Unemployment</div>
<div class="description">1/1000 of population</div>
</div>
<aside id="totals"><span id="active">-</span> of <span id="total">-</span> areas selected.</aside>
<div id="hover"></div>
<svg id="map" style="border: 1px solid #eee; width: 100%; height: 400px;"></div>
<div class="text attribution">
<p>
By Yuri Feldman (<a href="http://www.twitter.com/arrayjam">@arrayjam</a>) for GovHack 2013. Made with d3.js, crossfilter and topojson.
</p>
<p>
Based on <a href="http://www.abs.gov.au">Australian Bureau of Statistics data</a>.
</p>
</div>
<div class="text">
<h2>Introduction</h2>
<p>For GovHack, I built this visualisation of the Statistical Area 2 data from the Australian 2011 Census. This tool lets you filter the Victorian data along different dimensions. The fields have been hand-picked, but the data is raw, and the application could be generalised to all the census data.</p>
<h2>Instructions</h2>
<p>To use, click and drag the bar charts to filter the data. You can drag multiple charts to refine the query. The map shows which areas have been filtered out, and which ones match the current query. This lets you quickly explore interesting datasets.</p>
<p>You can also click on a chart title to select it. This lets you always see the values of that dimension on the map as a choropleth</p>
<h2>Analysis</h2>
<p>
Using this, we can see that country residents are <a href="javascript:filter([null, null, null, null, null, [0, 2], null, null])">likely to have been born in Australia</a> and <a href="javascript:filter([null, null, [0, 250], null, null, null, null, null])">pay less rent</a>. It can also show us mutivariate statistical data. We can find the <a href="javascript:filter([[43, 80], [700, 1400], null, null, null, null, null, null])">rich older people</a>, <a href="javascript:filter([null, [0, 400], null, null, null, [2, 20], [0, 50], null])">low-income migrants who are not in the labour force</a>, and the <a href="javascript:filter([[0, 28], [0, 500], null, [50, 100], null, null, null, null])">young educated hipsters</a>. By selecting a range from one dimension and dragging it along the graph, we can see that (obviously) <a href="javascript:filter([null, [300, 400], null, null, null, null, null, null])">income</a> correlates to rent, involvement in the labour force, and education.</p>
</div>
</div>
<div id="lists">
<div class="list"></div>
</div>
</div>
<script src="crossfilter.v1.min.js"></script>
<script src="d3.js"></script>
<script src="colorbrewer.js"></script>
<script src="queue.min.js"></script>
<script src="topojson.js"></script>
<script src="census_crossfilter.js"></script>