-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathindex.html
529 lines (469 loc) · 15.8 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
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
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<title>All the Buildings in Manhattan</title>
<meta charset="utf-8">
<meta name="description" content="An interactive 3D visualization of the all the buildings in Manhattan.">
<meta name="news_keywords" content="data, data visualization, data vis, data viz, webgl, 3d, buildings, manhattan, nyc, new york city">
<meta property="og:title" content="All the Buildings in Manhattan">
<meta property="og:site_name" content="tbaldw.in">
<meta property="og:url" content="https://tbaldw.in/nyc-buildings">
<meta property="og:description" content="An interactive 3D visualization of the all the buildings in Manhattan.">
<meta property="og:type" content="article">
<meta property="og:image" content="https://tbaldw.in/nyc-buildings/img/all-the-buildings.png">
<meta property="og:image:type" content="image/png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="https://tbaldw.in">
<meta name="twitter:creator" content="@taylorbaldwin">
<meta name="twitter:title" content="All the Buildings in Manhattan">
<meta name="twitter:description" content="An interactive 3D visualization of the all the buildings in Manhattan">
<meta name="twitter:image:src" content="https://tbaldw.in/nyc-buildings/img/all-the-buildings.png">
<link href="https://fonts.googleapis.com/css?family=Raleway:300" rel="stylesheet">
<style>
html, body {
color: #333;
font-family: 'Raleway', 'Open Sans', 'Helvetica Neue', Helvetica, sans-serif;
}
a {
text-decoration: none;
}
.card {
padding: 28px 0;
position: absolute;
left: 30px;
z-index: 1;
width: 310px;
border-radius: 3px;
background: #fff;
border: 1px solid #bbb;
}
.title {
top: 30px;
width: 310px;
opacity: 1;
border: 1px solid #bbb;
font-size: 17px;
background: #fff;
z-index: 5;
transition: width 500ms cubic-bezier(0.215, 0.610, 0.355, 1),
font-size 500ms cubic-bezier(0.215, 0.610, 0.355, 1),
border 500ms linear 400ms,
background 500ms linear 300ms;
}
.title h1 {
opacity: 1;
transition: opacity 600ms linear;
}
.title h1.hidden {
opacity: 0;
}
.title h1 {
font-weight: 200;
margin: 0;
padding: 0 35px;
letter-spacing: -1px;
line-height: 100%;
}
.instructions {
margin: 17px 0;
padding: 0 35px;
font-size: 15px;
line-height: 1.2rem;
color: #999;
opacity: 1;
transition: opacity 500ms linear 400ms;
}
.links {
padding: 0 35px;
margin: 15px 0 0;
opacity: 1;
transition: opacity 500ms linear 700ms;
}
.links a {
padding: 10px 10px 10px 0;
}
.links svg {
fill: #777;
transition: fill 200ms linear;
}
.links a:hover svg {
fill : #333;
}
.source {
font-size: 10px;
margin-top: 12px;
color: #bbb;
text-transform: uppercase;
opacity: 1;
position: absolute;
bottom: 25px;
left: 30px;
z-index: 10;
transition: opacity 500ms 2500ms;
}
.source span {
margin-right: 10px;
}
.source a {
margin: 0 5px;
color: #777;
padding-bottom: 8px;
border-bottom: 1px solid rgba(255, 255, 255, 0);
transition: color 200ms linear,
padding-bottom 400ms cubic-bezier(0.215, 0.610, 0.355, 1),
border-bottom 400ms cubic-bezier(0.215, 0.610, 0.355, 1);
}
.source a:hover {
color: #333;
padding-bottom: 2px;
border-bottom: 1px solid rgba(51, 51, 51, 1);
}
.for-intro .title {
background: none;
border: 1px solid rgba(255, 255, 255, 0);
width: 600px;
font-size: 33px;
pointer-events: none;
}
.for-intro .links {
opacity: 0;
pointer-events: none;
}
.for-intro .instructions {
opacity: 0;
}
.for-intro .source {
opacity: 0;
pointer-events: none;
}
.for-intro .controls-container {
opacity: 0;
transform: translateY(-100px);
pointer-events: none;
}
.for-intro .loader {
opacity: 1;
transition-delay: 500ms;
}
.for-intro .loader.hidden {
opacity: 0;
}
.for-intro .autopilot-button {
opacity: 0;
pointer-events: none;
}
.autopilot-button.hidden {
opacity: 0;
pointer-events: none;
}
.autopilot-button {
opacity: 1;
transition: all 300ms linear;
position: absolute;
bottom: 50px;
padding: 5px 0;
font-size: 11px;
text-align: center;
color: #999;
cursor: pointer;
background-color: #fff;
text-transform: uppercase;
}
.autopilot-button:hover {
background-color: #fafafa;
color: #666;
}
.controls-container {
padding-top: 0;
top: 265px;
opacity: 1;
overflow: hidden;
transform: translateY(0);
transition: opacity 400ms linear 1600ms,
transform 800ms cubic-bezier(0.215, 0.610, 0.355, 1) 1600ms;
}
.controls-container .button-group {
width: 100%;
height: 62px;
display: flex;
position: relative;
/* border-bottom: 1px solid #999; */
}
.controls-container button:first-of-type {
border-left: 0;
}
.controls-container button.active {
color: #333;
}
.controls-container button {
flex-grow: 1;
width: 33.333333333%;
background: white;
outline: none;
border: 0;
/* border-left: 1px solid #999;
border-bottom: 1px solid #999; */
margin: 0;
height: 100%;
font-size: 12px;
color: #bbb;
cursor: pointer;
text-transform: uppercase;
line-height: 115%;
transition: color 200ms linear;
}
.controls-container button:hover {
color: #777;
}
.controls-container .arrow {
position: absolute;
border-right: 1px solid #333;
border-bottom: 1px solid #333;
width: 6px;
height: 6px;
top: 48px;
transform: rotate(45deg);
transition: transform 300ms cubic-bezier(0.215, 0.610, 0.355, 1);
}
.controls-container .axis-ticks {
display: flex;
justify-content: space-between;
justify-content: space-between;
padding: 0 35px;
font-size: 12px;
}
.keys {
position: relative;
height: 140px;
transition: height 300ms cubic-bezier(0.445, 0.05, 0.55, 0.95);
}
.key {
position: absolute;
opacity: 0;
transition: opacity 300ms linear;
}
.key.active {
opacity: 1;
}
.key img {
width: 310px;
height: 12px;
margin: 13px 0;
}
.key ul {
list-style: none;
font-size: 14px;
}
.key li {
margin: 2px;
color: #bbb;
transition: color 150ms linear;
cursor: pointer;
}
.key li.space-below {
margin-bottom: 12px;
}
.key li.disabled {
cursor: auto;
}
.key li:hover {
color: #777;
}
.key li.active {
color: #333;
}
.key li.active:hover {
color: #888;
}
.key li.disabled:hover {
color: inherit;
}
.key li span {
position: relative;
top: 2px;
height: 13px;
width: 13px;
margin-right: 8px;
display: inline-block;
border-radius: 50%;
border: 1px solid #ddd;
background-color: #fff;
transition: border 150ms linear,
background-color 150ms linear;
}
.key li:hover span {
border: 1px solid #999;
}
.key li.active span {
border: 1px solid #fff;
}
.loader {
position: absolute;
width: 100vw;
z-index: 10;
left: 0;
top: 32vh;
opacity: 0;
transition: opacity 200ms linear;
}
.loader h2 {
font-size: 16px;
letter-spacing: 2px;
text-align: center;
}
.loading-bar {
width: 400px;
height: 5px;
background: #eee;
position: relative;
margin: 35px auto;
}
.loading-bar .loaded {
position: absolute;
top: 0;
left: 0;
width: 0;
height: 100%;
background: #555;
transition: width 500ms cubic-bezier(0.445, 0.05, 0.55, 0.95);
}
.browser-warning {
opacity: 1;
position: absolute;
z-index: 100;
top: 0;
left: 0;
width: 100vw;
margin: 0;
padding: 0;
font-size: 22px;
transition: opacity 400ms linear;
}
.browser-warning section {
width: 440px;
line-height: 1.5em;
margin: 100px auto;
color: #666;
font-weight: 200;
}
.browser-warning button {
font-weight: 200;
color: #666;
background-color: #fff;
display: block;
margin: 45px auto;
padding: 15px 40px;
font-size: 20px;
border: 1px solid #666;
cursor: pointer;
transition: all 150ms linear;
}
.browser-warning button:hover {
background-color: #92a9ce;
color: white;
border: 1px solid white;
}
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
.browser-warning.hidden {
opacity: 0;
}
</style>
</head>
<body class="for-intro">
<canvas class="viz"></canvas>
<div class="browser-warning ios hidden">
<section>
<p>Unfortunately, there have been some issues getting this running on iOS due to memory constraints.
It is strongly recommended you view this on Desktop Chrome 😬 </p>
</section>
</div>
<div class="browser-warning non-chrome hidden">
<section>
<p>Before we download a bunch of data, I just wanna mention this visualization tends to work best with Chrome.</p>
<p>If you choose to go ahead and view with this browser, you can generally improve its performance by selecting
"Fewer Buildings" from the dropdown controls menu in the upper righthand corner of the screen.</p>
<button class="ok">Okay</button>
</section>
</div>
<div class="title card">
<h1 class="hidden">All the Buildings in Manhattan</h1>
<div class="instructions">Drag & scroll to move around. Double-click to recenter the map.</div>
<div class="links">
<a href="https://github.com/rolyatmax/nyc-buildings" class="github-link">
<svg width="22px" height="22px" viewBox="0 0 30 30" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M15,0.0576923077 C6.72580645,0.0576923077 0.00806451613,6.91483516 0.00806451613,15.3791209 C0.00806451613,22.1456044 4.30645161,27.8901099 10.2580645,29.9175824 C11.0080645,30.0576923 11.25,29.5879121 11.25,29.1840659 L11.25,26.3241758 C7.08064516,27.2554945 6.20967742,24.5192308 6.20967742,24.5192308 C5.53225806,22.7472527 4.5483871,22.2774725 4.5483871,22.2774725 C3.18548387,21.3296703 4.65322581,21.3461538 4.65322581,21.3461538 C6.16129032,21.4532967 6.9516129,22.9285714 6.9516129,22.9285714 C8.29032258,25.2692308 10.4596774,24.5934066 11.3145161,24.1978022 C11.4516129,23.2087912 11.8387097,22.532967 12.266129,22.1456044 C8.93548387,21.7582418 5.43548387,20.4478022 5.43548387,14.5714286 C5.43548387,12.8983516 6.02419355,11.5302198 6.98387097,10.4587912 C6.83064516,10.0714286 6.31451613,8.51373626 7.12903226,6.40384615 C7.12903226,6.40384615 8.38709677,5.99175824 11.25,7.97802198 C12.4435484,7.64010989 13.7258065,7.46703297 15,7.45879121 C16.2741935,7.46703297 17.5564516,7.63186813 18.7580645,7.97802198 C21.6209677,6 22.8790323,6.40384615 22.8790323,6.40384615 C23.6935484,8.51373626 23.1854839,10.0714286 23.0241935,10.4587912 C23.983871,11.5302198 24.5645161,12.8983516 24.5645161,14.5714286 C24.5645161,20.456044 21.0564516,21.75 17.7177419,22.1291209 C18.2580645,22.6071429 18.75,23.5384615 18.75,24.9642857 L18.75,29.1675824 C18.75,29.5714286 18.9919355,30.0494505 19.75,29.9010989 C25.7016129,27.8736264 29.9919355,22.1291209 29.9919355,15.3626374 C29.9919355,6.91483516 23.2741935,0.0576923077 15,0.0576923077 L15,0.0576923077 Z"></path></svg>
</a>
<a href="https://twitter.com/taylorbaldwin" class="twitter-link">
<svg width='26px' height='22px' viewBox='0 0 36 30' version='1.1' xmlns='http://www.w3.org/2000/svg'><path d='M35.954717,3.55813953 C34.6301887,4.1627907 33.2150943,4.56976744 31.7207547,4.74418605 C33.2377358,3.80232558 34.4150943,2.3255814 34.9584906,0.558139535 C33.5320755,1.43023256 31.9584906,2.05813953 30.2830189,2.39534884 C28.9358491,0.930232558 27.0226415,0 24.9056604,0 C20.1509434,0 16.6528302,4.55813953 17.7283019,9.29069767 C11.6037736,8.97674419 6.16981132,5.96511628 2.53584906,1.38372093 C0.611320755,4.77906977 1.53962264,9.23255814 4.81132075,11.4883721 C3.6,11.4534884 2.46792453,11.1046512 1.47169811,10.5465116 C1.39245283,14.0581395 3.83773585,17.3372093 7.38113208,18.0581395 C6.33962264,18.3488372 5.20754717,18.4186047 4.05283019,18.1860465 C4.99245283,21.1976744 7.70943396,23.3837209 10.9358491,23.4418605 C7.83396226,25.9302326 3.93962264,27.0465116 0.0226415094,26.5813953 C3.28301887,28.7325581 7.15471698,29.9767442 11.3207547,29.9767442 C24.9962264,29.9767442 32.7283019,18.1046512 32.2641509,7.46511628 C33.7245283,6.40697674 34.9698113,5.08139535 35.954717,3.55813953 L35.954717,3.55813953 Z' /></svg>
</a>
</div>
</div>
<div class="controls-container card">
<div class="button-group"></div>
<div class="keys">
<div class="key built">
<img src="img/magma.png" />
<div class="axis-ticks">
<span>1800</span>
<span>2017</span>
</div>
</div>
<div class="key height">
<img src="img/cool.png" />
<div class="axis-ticks">
<span>0</span>
<span>1800 feet</span>
</div>
</div>
<div class="key class">
<ul>
<li data-class-type="walkup-and-mixed-use"><span></span> Walk-ups & mixed-use rentals</li>
<li data-class-type="elevator" class="space-below"><span></span> Elevator rentals</li>
<li data-class-type="co-op"><span></span> Co-ops</li>
<li data-class-type="condo"><span></span> Condos</li>
<li data-class-type="one-or-two-family" class="space-below"><span></span> 1-2 Family homes</li>
<li data-class-type="hotel" class="space-below"><span></span> Hotels</li>
<li data-class-type="non-residential"><span></span> Non-residential</li>
</ul>
</div>
</div>
</div>
<div class="autopilot-button card hidden">Restart Autopilot</div>
<div class="source">
<span>Sources:</span>
<a href="https://www1.nyc.gov/site/doitt/initiatives/3d-building.page" target="_blank" rel="noopener noreferrer">NYC 3D Model</a>
&
<a href="https://www1.nyc.gov/site/planning/data-maps/open-data/dwn-pluto-mappluto.page" target="_blank" rel="noopener noreferrer">NYC PLUTO</a>
</div>
<div class="loader hidden">
<h2>LOADING</h2>
<div class="loading-bar">
<div class="loaded"></div>
</div>
</div>
<script>
window.DATA_VERSION = '1.1'
window.IS_DEV = !(
document.location.origin.includes('tbaldw.in') ||
document.location.origin.includes('taylorbaldw.in') ||
document.location.origin.includes('taylor.cool') ||
document.location.origin.includes('taylorbaldwin.org') ||
document.location.origin.includes('taylorb.me')
)
</script>
<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','https://www.google-analytics.com/analytics.js','ga');
if (!window.IS_DEV) {
ga('create', 'UA-36884625-1', 'auto');
ga('send', 'pageview');
}
</script>
<script src="bundle.js"></script>
</body>
</html>