-
Notifications
You must be signed in to change notification settings - Fork 1
/
week10a.html
342 lines (302 loc) · 17.5 KB
/
week10a.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
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>10a: Chart Types - Network / Geospatial data</title>
<meta name="description" content="02.526 Chart Types - network / geospatial data">
<meta name="author" content="Chan Chi-Loong, V/R">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="css/reveal.min.css">
<link rel="stylesheet" href="css/theme/night.css" id="theme">
<link rel="stylesheet" href="css/style.css">
<style>
tr:nth-child(odd) {
background: #777;
}
tr:nth-child(even) {
background: #333;
}
.reveal td {
font-size: 0.8em;
}
</style>
<!-- If the query includes 'print-pdf', use the PDF print sheet -->
<script>
document.write( '<link rel="stylesheet" href="css/print/' + ( window.location.search.match( /print-pdf/gi ) ? 'pdf' : 'paper' ) + '.css" type="text/css" media="print">' );
</script>
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="reveal">
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<section data-state="alert" data-transition="zoom">
<h1 class="shadowfont white">Chart types</h1>
<h3>10a: Spatial / Geospatial data</h3>
</section>
<section>
<h3>Recap: How to design viz idioms</h3>
<img src="img/how-idioms.jpg"/>
</section>
<section>
<h3>Recap: Data Types</h3>
<ul>
<li>Tabular data</li>
<li>Networks</li>
<li>Geographic / spatial</li>
<li>Fields</li>
<li>Hierarchical</li>
</ul>
</section>
<section>
<h3>Spatial</h3>
<img src="img/arrange_spatial.jpg"/>
</section>
<section>
<h3>Geospatial data</h3>
<p><a href="https://en.wikipedia.org/wiki/GeoJSON" target="_blank">GeoJSON / TopoJSON</a> (<a href="https://geojson.org/" target="_blank">GeoJSON spec</a>) (<a href="https://github.com/topojson/topojson" target="_blank">TopoJSON spec</a>)</p>
<p><a href="https://en.wikipedia.org/wiki/Keyhole_Markup_Language" target="_blank">KML</a> (<a href="https://www.ogc.org/standards/kml" target="_blank">spec</a>)</p>
<p><a href="https://en.wikipedia.org/wiki/Shapefile" target="_blank">Shapefile (SHP)</a> (<a href="https://www.esri.com/content/dam/esrisites/sitecore-archive/Files/Pdfs/library/whitepapers/pdfs/shapefile.pdf" target="_blank">spec</a>)</p>
<p><a href="https://en.wikipedia.org/wiki/CityGML" target="_blank">CityGML</a> (<a href="https://www.ogc.org/standards/citygml" target="_blank">spec</a>)</p>
<p>There are a ton of <a href="https://en.wikipedia.org/wiki/GIS_file_formats" target="_blank">GIS file formats</a>.</p>
</section>
<section>
<h3>D3 Graph Gallery</h3>
<a href="https://www.d3-graph-gallery.com/" target="_blank"><img src="img/d3-graph-gallery.jpg"/></a>
<p><a href="https://www.d3-graph-gallery.com/" target="_blank">D3 Graph Gallery</a>, by Yan Holtz</p>
</section>
<section>
<h3>Geospatial (2D)</h3>
<p>Libraries</p>
<p><a href="https://leafletjs.com/" target="_blank">Leaflet</a></p>
<p><a href="https://openlayers.org/" target="_blank">Open Layers</a></p>
<hr/>
<p>Map Tiles</p>
<p><a href="https://www.openstreetmap.org/" target="_blank">Open street map</a></p>
<p><a href="https://openmaptiles.org/" target="_blank">Open map tiles</a></p>
<p><a href="https://www.onemap.gov.sg/apidocs/" target="_blank">SLA OneMap API</a></p>
</section>
<section>
<h3>Geospatial (2D)</h3>
<p>Tools</p>
<p><a href="https://mapshaper.org/" target="_blank">Mapshaper</a></p>
<p><a href="https://geojson.io/#map=2/20.0/0.0" target="_blank">GeoJSON.io</a></p>
<p><a href="https://www.qgis.org/en/site/about/index.html" target="_blank">QGIS</a></p>
<hr/>
<p>Platforms</p>
<p><a href="https://carto.com/" target="_blank">Carto</a> (formerly cartoDB)</p>
<p><a href="https://www.esri.com/en-us/arcgis/products/arcgis-online/overview" target="_blank">ArcGIS</a>, Esri</p>
<p><a href="https://developers.google.com/maps/documentation/javascript/overview" target="_blank">Google Maps API</a></p>
</section>
<section>
<h3>Geospatial (3D)</h3>
<p><a href="https://www.mapbox.com/" target="_blank">Mapbox</a>, MapboxGL</p>
<p><a href="https://deck.gl/" target="_blank">deck.gl</a></p>
<p><a href="https://cesium.com/" target="_blank">Cesium</a></p>
</section>
<section>
<h3>Idiom: Map Markers / Bubble</h3>
<table width="100%">
<tr>
<td><p>What: Data</p></td>
<td><p>Geographic geometry data of points. Additional qualitative / quantitative fields.</p></td>
</tr>
<tr>
<td><p>How: Encoding</p></td>
<td><p>Point marks on a geographic map. Often allows for zoom, pan and rotate functions.</p></td>
</tr>
<tr>
<td><p>Why: Task</p></td>
<td><p>Task: Lookup, compare values, find spatial trends</p></td>
</tr>
<tr>
<td>Scale</td>
<td>Color channel: If quantitative up to 8, if categorical up to 12.</td>
</tr>
</table>
<p><a href="https://www.d3-graph-gallery.com/backgroundmap.html" target="_blank">D3 Graph Gallery - Leaflet</a></p>
<p><a href="https://d3-graph-gallery.com/bubblemap.html" target="_blank">D3 Graph Gallery - Bubble map</a></p>
<p class="smallfont"><a href="https://datasuite.mogul.sg/" target="_blank">Market cluster example</a>, Mogul Datasuite</p>
</section>
<section>
<h3>Idiom: Choropleth Map</h3>
<table width="100%">
<tr>
<td><p>What: Data</p></td>
<td><p>Geographic geometry data. Table with one quantitative attribute per region</p></td>
</tr>
<tr>
<td><p>How: Encoding</p></td>
<td><p>Space: use given geometry for area mark boundaries. Color: sequential (or divergent) segmented colormap</p></td>
</tr>
<tr>
<td><p>Why: Task</p></td>
<td><p>Task: Lookup, compare values, find spatial trends</p></td>
</tr>
<tr>
<td>Scale</td>
<td>Color channel: If quantitative up to 8, if categorical up to 12.</td>
</tr>
</table>
<p><a href="https://www.d3-graph-gallery.com/choropleth.html" target="_blank">D3 Graph Gallery - Choropleth Map</a></p>
<p class="smallfont">SG Population by Subzone vs <a href="https://popquery.onemap.sg/" target="_blank">OneMap Population Query</a></p>
<p class="smallfont"><a href="https://elections.viz.sg/" target="_blank">SG Elections</a></p>
</section>
<section>
<h3>Idiom: Hexbin Maps</h3>
<table width="100%">
<tr>
<td><p>What: Data</p></td>
<td><p>Geographic data: lat/lon points, quantitative count attribute.</p></td>
</tr>
<tr>
<td><p>How: Encoding</p></td>
<td><p>Encode Use given geographic data geometry of points, overlay on hexbin map depening on zoom value.</p></td>
</tr>
<tr>
<td><p>Why: Task</p></td>
<td><p>Task: Find spatial trends, esp at different zoom values</p></td>
</tr>
<tr>
<td>Scale</td>
<td>Color channel: Quantitative (up to 8)</td>
</tr>
</table>
<p><a href="https://www.d3-graph-gallery.com/graph/density2d_hexbin.html" target="_blank">D3 Graph Gallery - Hexbin Charts</a></p>
<p><a href="https://bl.ocks.org/tnightingale/4668062" target="_blank">Leaflet + D3.js</a>, Tom Nightingale</p>
<p class="smallfont"><a href="https://yongquanben.github.io/sg_taxi_availability/" target="_blank">SG Taxi Availbility</a>, Yong Quan (<a href="https://github.com/yongquanben/sg_taxi_availability" target="_blank">repo</a>) </p>
<p class="smallfont"><a href="https://viz.vslashr.com/geotwin/" target="_blank">GeoTwin work</a></p>
</section>
<section>
<h3>Idiom: Tile cartograms</h3>
<table width="100%">
<tr>
<td><p>What: Data</p></td>
<td><p>Typically districts or states in a country</p></td>
</tr>
<tr>
<td><p>How: Encoding</p></td>
<td><p>Convert districts/states into boxes and lay them out in the rough shape of the country.</p></td>
</tr>
<tr>
<td><p>Why: Task</p></td>
<td><p>Use geography as a layout so we can quickly zoom into the district/state.</p></td>
</tr>
<tr>
<td>Scale</td>
<td>Color channel: Quantitative (up to 8)</td>
</tr>
</table>
<p><a href="https://datavizcatalogue.com/blog/chart-combinations-tile-grid-maps/" target="_blank">Tile Cartograms</a></p>
<p><a href="https://www.straitstimes.com/multimedia/graphics/2020/07/singapore-general-election-ge2020-live-results/index.html" target="_blank">Straits TImes Elections 2020</a></p>
</section>
<section>
<h3>Idiom: Contour Map</h3>
<table width="100%">
<tr>
<td><p>What: Data</p></td>
<td><p>2D spatial field; geographic data. Derived Geometry: set of isolines computed from field.</p></td>
</tr>
<tr>
<td><p>How: Encoding</p></td>
<td><p>Encode Use given geographic data geometry of points, lines, and region marks. Use derived geometry as line marks.</p></td>
</tr>
<tr>
<td><p>Why: Task</p></td>
<td><p>Task: Get a sense of spatial shape</p></td>
</tr>
<tr>
<td>Scale</td>
<td>Dozens of contour levels.</td>
</tr>
</table>
<p><a href="https://d3js.org/d3-contour" target="_blank">D3 contour map</a></p>
<p><a href="https://medium.com/two-n/an-alternative-to-choropleth-contour-density-maps-in-d3-js-93e1fdbdc4e" target="_blank">Contour density maps</a></p>
<p><a href="https://docs.mapbox.com/help/tutorials/get-started-isochrone-api/" target="_blank">Mapbox - Isochrone Maps</a></p>
</section>
<section>
<h3>Idiom: Vector Fields</h3>
<table width="100%">
<tr>
<td><p>What: Data</p></td>
<td><p>2D spatial field: geographic data. Each grid square - vector values (e.g. wind speeds, u and v)</p></td>
</tr>
<tr>
<td><p>How: Encoding</p></td>
<td><p>Encode vectors as arrow marks on a 2D spatial field</p></td>
</tr>
<tr>
<td><p>Why: Task</p></td>
<td><p>Task: Get a holistic sense of both direction and maginitude of the vectors. (e.g. wind speed and direction)</p></td>
</tr>
<tr>
<td>Scale</td>
<td>Hundreds of thousands of marks.</td>
</tr>
</table>
<p><a href="https://observablehq.com/@d3/vector-field" target="_blank">ObservableHQ - Vector Fields</a></p>
<p class="smallfont"><a href="https://www.cpc.ncep.noaa.gov/products/international/africa/africa.shtml" target="_blank">Climate Prediction Centre</a>, NOAA</p>
</section>
<section>
<h3>3D Volume Rendering</h3>
<table width="100%">
<tr>
<td><p>What: Data</p></td>
<td><p>3D spatial field</td>
</tr>
<tr>
<td><p>How: Encoding</p></td>
<td><p>A model of how light rays are absorbed, emitted, and scattered by the medium.</p></td>
</tr>
<tr>
<td><p>Why: Task</p></td>
<td><p>Task: Find anomalies, inspect 3D structure</p></td>
</tr>
</table>
<p><a href="https://www.willusher.io/webgl/2019/01/13/volume-rendering-with-webgl" target="_blank">Volume Rendering in webgl</a>, Will Usher</p>
<p class="smallfont">For 3D scientific viz, probably good to work with a 3D library, like three.js</p>
</section>
<section>
<h3>3D Viz (examples)</h3>
<p><a href="https://www.onemap3d.gov.sg/main/" target="_blank">One Map 3D</a>, SLA Singapore, (Cesium - I think)</p>
<p><a href="https://nationalmap.gov.au/" target="_blank">National Map</a> Australia, (Cesium)</p>
<p><a href="https://viz.vslashr.com/earth/" target="_blank">Urban City Visualization</a>, (three.js)</p>
</section>
<section>
<h2>Questions?</h2>
<div class="plain">
<div class="rotate-icon"><a href="http://www.vslashr.com"><img width="100" src="img/VslashR_logo_white.svg"></a></div>
</div>
<p><small>Chi-Loong | V/R</small></p>
</section>
</div>
</div>
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.js"></script>
<script>
// Full list of configuration options available here:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: true,
theme: Reveal.getQueryHash().theme, // available themes are in /css/theme
transition: Reveal.getQueryHash().transition || 'default', // default/cube/page/concave/zoom/linear/fade/none
// Optional libraries used to extend on reveal.js
dependencies: [
{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } },
{ src: 'plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } }
]
});
</script>
</body>
</html>