forked from sc3/26thycalifornia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
287 lines (266 loc) · 10.9 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
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
<!doctype html>
<html>
<head>
<!-- Título -->
<title>26th y California</title>
<!-- Meta -->
<link rel="shortcut icon" href="img/favicon.ico" />
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta property="og:url" content="http://26thycalifornia.recoveredfactory.net" />
<meta property="og:title" content="26th y California" />
<meta property="og:type" content="website" />
<meta property="og:image" content="http://26thycalifornia.recoveredfactory.net/img/guard-tower-small.jpg" />
<meta property="og:description" content="Investigando datos raspan del Sheriff del Condado de Cook 'Inmate Locator'." />
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.1.1/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.0.3/css/font-awesome.min.css" />
<link href='http://fonts.googleapis.com/css?family=Radley:400' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body data-spy="scroll" data-target="#pagenav" data-offset="105">
<!-- Navegación -->
<div id="pagenav" class="pagenav affix" role="navigation">
<div class="container text-center">
<ul class="pagenav-nav nav nav-pills">
<li><a href="#inicio">Inicio / Home</a></li>
<li><a href="#poblacion-diaria">Población diaria / Daily Population</a></li>
<li><a href="#entrada-y-salida">Entrada y salida / In and out</a></li>
<li><a href="#sobre">Sobre / About</a></li>
</ul>
</div>
</div>
<!-- Introducción -->
<div id="top"></div>
<div class="container">
<section id="inicio" class="intro">
<h1 class="headline">26th y California</h1>
<p class="es">Visualiza los datos de raspado de preso localizador del Sheriff del Condado de Cook</p>
<p class="en">Visualizing data scraped from the Cook County Sheriff's Inmate Locator</p>
<p>Desarrollado por / developed by <a href="https://github.com/sc3/sc3">Supreme Chi-Town Coding Crew</a></p>
<div class="social-links text-center">
<a target="_blank" href="https://www.facebook.com/sharer.php?u=http%3A%2F%2F26thycalifornia.recoveredfactory.net&t=26th+y+California">
<i class="fa fa-facebook-square"></i>
</a>
<a target="_blank" href="https://twitter.com/share?url=http%3A%2F%2F26thycalifornia.recoveredfactory.net&text=26th+y+California">
<i class="fa fa-twitter-square"></i>
</a>
<a target="_blank" href="https://plus.google.com/share?url=http%3A%2F%2F26thycalifornia.recoveredfactory.net">
<i class="fa fa-google-plus-square"></i>
</a>
<a target="_blank" href="http://pinterest.com/pin/create/button/?url=http%3A%2F%2F26thycalifornia.recoveredfactory.net&media=http%3A%2F%2F26thycalifornia.recoveredfactory.net%2Fimg%2Fguard-tower-large.jpg&description=26th+y+California">
<i class="fa fa-pinterest-square"></i>
</a>
</div>
</section>
</div>
<!-- Contenido -->
<div class="container-fluid">
<section id="poblacion-diaria">
<div class="box">
<h1>Población diaria / Daily population</h1>
<a href="#top" class="back">To top / Arriba <i class="fa fa-arrow-up"></i></a>
<div class="detail">
<div class="row">
<div class="col-sm-5 es">
<p>Estas estadísticas representan el total de población de todo el sistema. Esto incluye prisioneros que no están alojados físicamente en la cárcel.</p>
</div>
<div class="col-sm-5 en">
<p>These statistics represent the total population of the entire system. This includes prisoners who are not physically housed in the jail.</p>
<p>Notice the rough weekly cycle in the jail's population (peaking over the weekend).</p>
</div>
<div class="col-sm-2">
<h2>Estadísticas / Statistics</h2>
<div class="stats"></div>
</div>
</div>
</div>
<div class="row chart-row">
<div class="col-md-12">
<h2>Total population</h2>
<div class="legend poblacion-legend"></div>
<div class="chart poblacion-chart"></div>
</div>
</div>
<div class="row chart-row">
<div class="col-md-12">
<h2>Population by race and gender</h2>
<div class="legend demographic-legend"></div>
<div class="chart demographic-chart"></div>
</div>
</div>
</div>
</section>
<section id="entrada-y-salida">
<div class="box">
<h1>Entrada y salida / In and out</h1>
<a href="#top" class="back">To top / Arriba <i class="fa fa-arrow-up"></i></a>
<div class="detail">
<div class="row">
</div>
</div>
<div class="row">
<div class="col-sm-2">
<h2>Entrada</h2>
<div class="stats entrada-stats"></div>
</div>
<div class="col-md-10">
<div class="legend entrada-legend"></div>
<div class="chart entrada-chart"></div>
</div>
</div>
<div class="row">
<div class="col-sm-2">
<h2>Salida</h2>
<div class="stats salida-stats"></div>
</div>
<div class="col-md-10">
<div class="legend salida-legend"></div>
<div class="chart salida-chart"></div>
</div>
</div>
</div>
</section>
<section id="sobre">
<h1>Sobre / About</h1>
<a href="#top" class="back">To top / Arriba <i class="fa fa-arrow-up"></i></a>
<div class="box footer">
<p>Originally created for Migrahack DF (Mexico City, April 2014).</p>
<p>Tutorial: <a href="https://migrahack.readthedocs.org">https://migrahack.readthedocs.org</a> (Out of date)</p>
<p>Github: <a href="https://github.com/sc3/26thycalifornia">https://github.com/sc3/26thycalifornia</a></p>
<p>API: <a href="https://github.com/sc3/cookcountyjail">https://github.com/sc3/cookcountyjail</a></p>
<p>"Guard Tower" fotografia del autor Eric Allix Rogers con Creative Commons <a href="https://creativecommons.org/licenses/by-nc-sa/2.0/">Attribution-NonCommercial-ShareAlike 2.0</a></p>
</div>
</section>
</div>
<!-- Templates -->
<script type="text/template" id="population-table-template">
<table class="table">
<tbody>
<tr>
<th>Promedio / Average</th>
<td class="value"><%= this.formatCommas(average) %></td>
</tr>
<tr>
<th>Máximo / Maximum</th>
<td class="value">
<%= this.formatCommas(max) %><br />
<small><%= max_date %></small>
</td>
</tr>
<tr>
<th>Mínimo / Minimum</th>
<td class="value">
<%= this.formatCommas(min) %><br />
<small><%= min_date %></small>
</td>
</tr>
</tbody>
</table>
</script>
<script type="text/template" id="legend-template">
<p class="date"><span class="date-value"></span> </p>
<% _.each(fields, function(field, i) { %>
<table class="table">
<tbody>
<tr class="<%= field %>">
<td class="legend-marker-col"><span class="legend-marker"></span></td>
<td class="legend-field">
<%= labels[field] %>
</td>
<td class="legend-value">
</td>
</tr>
</tbody>
</table>
<% }); %>
</script>
<!-- Bibliotecas de código -->
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.1.1/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.6.0/underscore-min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/backbone.js/1.1.2/backbone-min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/d3/3.4.4/d3.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/d3-tip/0.6.3/d3-tip.min.js"></script>
<script src="js/ChartView.js"></script>
<script src="js/Data.js"></script>
<script src="js/Charts.js"></script>
<!-- Aplicación -->
<script>
$(document).ready(function() {
var collection = new DailyPopulationCollection(),
statsTemplate = $('#population-table-template').html(),
labels = {
'males_population_as': 'Asian men',
'males_population_wh': 'White men',
'males_population_bk': 'Black men',
'males_population_lt': 'Latino men',
'females_population_as': 'Asian women',
'females_population_wh': 'White women',
'females_population_bk': 'Black women',
'females_population_lt': 'Latino women',
'population': 'Poblacion',
'booked': 'Entrada',
'left': 'Salida',
};
new StatsTableView({
el: $("#poblacion-diaria .stats"),
collection: collection,
field: 'population',
template: statsTemplate,
});
new DailyChartView({
el: $("#poblacion-diaria .poblacion-chart"),
legend: $("#poblacion-diaria .poblacion-legend"),
collection: collection,
fields: ['population'],
labels: labels,
base_height: 150,
});
new DailyChartView({
el: $("#poblacion-diaria .demographic-chart"),
legend: $("#poblacion-diaria .demographic-legend"),
collection: collection,
fields: ['females_population_as', 'females_population_lt', 'females_population_wh', 'females_population_bk', 'males_population_as', 'males_population_wh', 'males_population_lt', 'males_population_bk'],
labels: labels,
exponent: 0.4,
base_height: 300,
});
new StatsTableView({
el: $("#entrada-y-salida .entrada-stats"),
collection: collection,
field: 'booked',
template: statsTemplate,
});
new StatsTableView({
el: $("#entrada-y-salida .salida-stats"),
collection: collection,
field: 'left',
template: statsTemplate,
});
new DailyChartView({
el: $("#entrada-y-salida .entrada-chart"),
collection: collection,
legend: $("#entrada-y-salida .entrada-legend"),
fields: ['booked'],
labels: labels,
base_height: 190,
});
new DailyChartView({
el: $("#entrada-y-salida .salida-chart"),
collection: collection,
legend: $("#entrada-y-salida .salida-legend"),
fields: ['left'],
labels: labels,
base_height: 190,
});
collection.fetch();
});
</script>
</body>
</html>