-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathzh.html
1714 lines (1524 loc) · 71.5 KB
/
zh.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
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en-us">
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-81478188-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-81478188-1');
</script>
<meta charset="UTF-8">
<title>互動地圖:雙北所得大解密</title>
<style>
#map{ width: 100%; height: 100vh;}
div {
font-family: "Noto Sans TC", "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;;
}
div.legend {
position: absolute;
text-align: left;
width: 310px;
height: 60px;
left: 5%;
top: 79px;
padding: 2px;
font: 12px "Noto Sans TC";
background: rgba(255,255,255,0.6);
border: 0px;
border-radius: 4px;
pointer-events: none;
}
div.title {
position: absolute;
text-align: left;
color: #558C89;
font-size: 1.5rem;
left: 5%;
top: 10px;
padding: 10px;
border: 0px;
border-radius: 4px;
background: rgba(255,255,255,0.6);
}
div.tooltip {
position: absolute;
text-align: center;
width: 100px;
height: 35px;
padding: 5.5px 2px;
font: 14px sans-serif;
background: white;
border: 0px;
border-radius: 8px;
pointer-events: none;
}
div#mapcontrol {
position: absolute;
text-align: left;
left: 5%;
top: 143px;
font-size: 0.7rem;
width: 6rem;
padding: 0.01rem;
border: 0px;
border-radius: 4px;
background: rgba(255,255,255,0.6);
white-space: pre;
}
div.story {
position: absolute;
text-align: left;
left: 50%;
-ms-transform: translateX(-50%);
-webkit-transform: translate(-50%,0);
transform: translate(-50%,0);
bottom: 5rem;
width: 17rem;
height: 7.5rem;
padding: 0.55rem 2.3rem;
font-size: 0.75rem;
background: rgba(255,255,255,0.6);
border: 0px;
border-radius: 8px;
white-space: pre;
}
div.distname {
position: absolute;
text-align: center;
width: 5rem;
height: 1.3rem;
padding: 0.05rem;
font-size: 0.8rem;
background: rgba(255,255,255,0.75);
border: 0px;
border-radius: 2px;
}
.arrow {
position: absolute;
left: 45%;
-ms-transform: translateX(-50%);
-webkit-transform: translate(-50%,0);
transform: translate(-50%,0);
bottom: 0.5rem;
width: 5rem;
height: 2rem;
}
#back {
position: absolute;
left: 0rem;
top: 1.25rem;
width: 1.5rem;
height: 5rem;
}
#next {
position: absolute;
right: 0rem;
top: 1.25rem;
width: 1.5rem;
height: 5rem;
}
#exit {
position: absolute;
right: 6px;
top: 4px;
width: 15px;
height: 15px;
}
#boxplot {
width: 30%;
height: 90%;
}
#side {
max-width: 50%;
float:left;
margin-right:2%;
}
.axis path,
.axis line {
fill: none;
stroke: #000;
shape-rendering: crispEdges;
}
.chart1legend text {
font-weight: 400;
font-size: 0.7rem;
}
.meantext, .mediantext, .q1text, .q3text {
font-weight: 400;
font-size: 0.7rem;
opacity: 0;
}
@media screen and (min-width: 64em) {
#side {
max-width: 50%; }
#chart1 {
width: 60vw;
height: 30vh;}
.x.axis text {
font-weight: 400;
font-size: 0.7rem;
}
.y.axis text {
font-weight: 400;
font-size: 0.8rem;
} }
@media screen and (min-width: 42em) and (max-width: 64em) {
#side {
max-width: 100%;
clear: left; }
#chart1 {
width: 100vw;
height: 40vh;
clear: left; }
.x.axis text {
font-weight: 400;
font-size: 0.5rem;
}
.y.axis text {
font-weight: 400;
font-size: 0.6rem;
} }
@media screen and (max-width: 42em) {
#side {
max-width: 100%;
min-width: 100%;
clear: left; }
#chart1 {
width: 100vw;
height: 40vh;
clear: left; }
.x.axis text {
font-weight: 400;
font-size: 0.5rem;
}
.y.axis text {
font-weight: 400;
font-size: 0.6rem;
} }
/* The switch - the box around the slider */
.switch {
position: relative;
display: inline-block;
width: 1.6rem;
height: 0.8rem;
}
/* Hide default HTML checkbox */
.switch input {display:none;}
/* The slider */
.sliderround {
position: absolute;
cursor: pointer;
top: 0.2rem;
left: 0.15rem;
right: 0;
bottom: 0;
background-color: #ccc;
-webkit-transition: .4s;
transition: .4s;
border-radius: 1rem;
}
.sliderround:before {
position: absolute;
content: "";
height: 0.65rem;
width: 0.65rem;
left: 0.0008rem;
bottom: 0.015rem;
background-color: white;
-webkit-transition: .4s;
transition: .4s;
border-radius: 50%;
}
input:checked + .sliderround {
background-color: #74AFAD;
}
input:focus + .sliderround {
box-shadow: 0 0 1px #74AFAD;
}
input:checked + .sliderround:before {
-webkit-transform: translateX(0.9rem);
-ms-transform: translateX(0.9rem);
transform: translateX(0.9rem);
}
</style>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta property="og:image" content="https://raw.githubusercontent.com/missmoss/taipei-stat-mrt/gh-pages/front.png"/>
<meta property="og:description" content="台北的有錢人都住在大安區嗎?圍牆內外,居民收入竟是百萬與千萬的差別?雙北所得分布地圖帶你一窺大台北地區的所得樣貌。"/>
<link rel="stylesheet" type="text/css" href="stylesheets/normalize.css" media="screen"/>
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' 'type='text/css'/>
<link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen"/>
<link rel="stylesheet" type="text/css" href="stylesheets/github-light.css" media="screen"/>
<link rel="stylesheet" href="https://npmcdn.com/[email protected]/dist/leaflet.css" />
<link rel="stylesheet" type="text/css" href="stylesheets/jquery.fullPage.css" />
<script src="https://npmcdn.com/[email protected]/dist/leaflet.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.js"></script>
<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<script src="https://d3js.org/d3.v3.min.js"></script>
<script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript" src="stylesheets/scrolloverflow.min.js"></script>
<script type="text/javascript" src="stylesheets/jquery.fullPage.js"></script>
</head>
<body>
<div id="fullpage">
<div class="section">
<section class="main-content">
<img src="front.png" id="side" style="margin-right:2%;"/>
<h1>互動地圖:<br>雙北所得大解密</h1>
<p>製作/<a href="https://github.com/missmoss">@missmoss</a></p>
<p>協力/<a href="https://www.facebook.com/Cicadatatw/">知了新聞</a>、<a href="https://www.facebook.com/TalkEcon/">白經濟</a></p>
<p>台北的有錢人都住在大安區嗎?圍牆內外,居民收入竟是百萬與千萬的差別?雙北所得分布地圖帶你一窺大台北地區的所得樣貌。</p>
<p>(為達最佳瀏覽效果,建議使用電腦版閱讀。)</font></p>
<p><a href="index.html">英文(English Version)</a></p>
</section>
</div>
<div class="section">
<section class="main-content">
<p>星期五晚上11點,敦化南路上的律師事務所仍然燈火通明,C 律師與同事們正為了下週即將開庭的大案積極備戰。在 C 沒有對外窗的裡間獨立辦公室,感覺不到日夜的更迭,唯一明確變動的,只有眼前待解決的工作數量。「不加班,根本做不完。」</p>
<p>入行兩年的 C 說:「週末,我不是在辦公室,就是抱著卷宗和電腦在家趕工。」</p>
<p>每週工時上看 90 小時的 C ,有著大多數人稱羨的薪水:出社會第一年、25 歲就年薪百萬。然而,在 C 家所在的內湖區南湖里,他的年薪還比整個里的所得中位數低一些,表示南湖里有一半以上的家庭,年收入都比 C 律師還要來得高。</p>
<p>上班族追逐的年薪百萬,在台北市只能算是中產,更有 25% 的家庭,一年的所得總額低於 40 萬元。這樣的薪水,在台北市生活尚且不容易,更何況這 40 萬元可能要養活的是一整個家庭。</p>
<p>在大台北地區,所得的空間分布可以一窺區域差異,透過簡單的統計指標,我們嘗試討論:<b>雙北地區的高所得居民集中在哪?區域的內部,又有著什麼樣的差異?</b></p>
</section>
</div>
<div class="section">
<section class="main-content">
<h2>雙北地區所得前十名</h2>
<div>
<div id="side">
<table>
<thead>
<tr>
<th>排名</th>
<th>縣市</th>
<th>鄉鎮市區</th>
<th>村里</th>
<th>所得中位數</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>台北市</td>
<td>內湖區</td>
<td>寶湖里</td>
<td>124.0萬</td>
</tr>
<tr>
<td>2</td>
<td>台北市</td>
<td>文山區</td>
<td>政大里</td>
<td>123.6萬</td>
</tr>
<tr>
<td>3</td>
<td>新北市</td>
<td>新店區</td>
<td>華城里</td>
<td>119.7萬</td>
</tr>
<tr>
<td>4</td>
<td>台北市</td>
<td>內湖區</td>
<td>金湖里</td>
<td>118.3萬</td>
</tr>
<tr>
<td>5</td>
<td>台北市</td>
<td>中山區</td>
<td>成功里</td>
<td>116.4萬</td>
</tr>
<tr>
<td>6</td>
<td>台北市</td>
<td>內湖區</td>
<td>南湖里</td>
<td>112.0萬</td>
</tr>
<tr>
<td>7</td>
<td>台北市</td>
<td>大安區</td>
<td>光明里</td>
<td>106.9萬</td>
</tr>
<tr>
<td>8</td>
<td>台北市</td>
<td>南港區</td>
<td>重陽里</td>
<td>106.5萬</td>
</tr>
<tr>
<td>9</td>
<td>台北市</td>
<td>大安區</td>
<td>龍門里</td>
<td>105.7萬</td>
</tr>
<tr>
<td>10</td>
<td>台北市</td>
<td>大安區</td>
<td>福住里</td>
<td>105.1萬</td>
</tr>
</tbody>
</table>
<p style="font-size: 0.7rem;">資料來源:103年所得稅統計資料</p>
<hr class="narrowonly">
</div>
<div>
<p>被網友戲稱為天龍國的台北市大安區,印象中向來是有錢人才住得起的地方,也被認為應該是台灣平均收入最高的一群,若將年度家戶所得依各村里中位數排出前十名,大安區雖然無法拔得頭籌,卻囊括了十名中的七、九、十名,區內各里也都在台北市的前段班。</p>
<h3>位於市郊的領先群組</h3>
<p>前五名中的文山區政大里、新店區華城里及內湖區金湖里均是相對市郊、環山抱翠,聚集了不少喜歡清幽的有錢人。</p>
<h3>明星學區長青不衰</h3>
<p>其他入榜的村里均位於市區,鄰近明星學區、醫院、科技公司聚集處,內湖區寶湖里鄰近三總、國防醫學院,中山區成功里即明水路一帶,著名的大直水岸第一排就座落於此,大安區光明里臨中正紀念堂,為明星學校中正國中學區,南港區重陽里也臨河,近南港軟體園區,內湖區南湖里在哈拉影城後方,中正區新營里為中正紀念堂、羅斯福路及杭州南路所夾三角地區,也是中正國中學區,龍門里則被大安森林公園、台大、名校龍門國中所環繞,福住里在金華國中、大安森林公園旁。</p>
<blockquote>
<h4>為什麼使用中位數</h4>
<p>中位數是將原始資料排序後,位於正中間(50%)的數值。在所得資料中,平均數常常被少數高所得的極端值拉高,使得平均數有時難以衡量一個群體的大致收入樣貌,所以我們採用中位數,以求貼近一般的所得水準。</p>
</blockquote>
</div>
</section>
</div>
<div class="section">
<div id="map">
</div>
</div>
<div class="section">
<section class="main-content">
<h2>一道圍牆,兩個世界</h2>
<p>民生東路四段巷內,台北市隨處可見的五到七樓高華廈住宅群中,有幾棟並不特別華麗大氣、卻由高聳圍牆、濃密樹蔭與監視器所環繞的半新大樓,森嚴的戒備與低調外觀平添了神秘感。</p>
<p>這些大樓位於松山區東昌里。財稅中心公布的各村里所得總額統計數字,或可提供一些線索:</p>
<table id="no-more-tables">
<thead>
<tr>
<th>區域</th>
<th>村里</th>
<th>區域所得總額</th>
<th>納稅單位</th>
<th>平均</th>
<th>第一分位數</th>
<th>中位數</th>
<th>第三分位數</th>
<th>標準差</th>
</tr>
</thead>
<tbody>
<tr>
<td data-title="區域">松山區</td>
<td data-title="村里">東昌里</td>
<td data-title="區域所得總額">983657萬</td>
<td data-title="納稅單位">917</td>
<td data-title="平均">1072.7萬</td>
<td data-title="第一分位數">47.4萬</td>
<td data-title="中位數">93.6萬</td>
<td data-title="第三分位數">181.6萬</td>
<td data-title="標準差">261760.57</td>
</tr>
</tbody>
</table>
<blockquote>
<h4>稅收資料的單位</h4>
<p>因為稅籍資料以報稅單位為最小單位,我們無法得知究竟人們是單獨報稅、夫妻報稅或是整個家庭一起報稅,但我們可以將每個報稅單位視為一組共同生活的小群體,想像他們的收入及支出是共用的。</p>
</blockquote>
<p>將所有資料從最小到最大排序,依序找出排在 25%、50% 及 75% 位置的資料,這就是第一分位數、中位數和第三分位數的概念。從所得總額的資料中,我們可以知道排序在收入最低 0-25% 的東昌里設籍家戶/居民,年度所得介於 0-47.4 萬間。中位數 93.6 萬,位於台北市 456 個里的第 37 名,屬於前段班,但絕無擠進前十名的機會。即使是位於整個里 75% 的高收入族群,年度所得也只在 181.6 萬,排名台北市第 59。</p>
<h2>圍牆內的天文數字</h2>
<p>乍看之下,東昌里只是一個收入屬於台北市前段班的普通村里。</p>
<p>然而,松山區東昌里整個區域的平均年度所得總額,卻長期盤踞北市、甚至全台的第一名寶座。103 年度的統計中,這個數字是驚人的 1072.7 萬。</p>
<p><b>遠高於中位數、甚至是第三分位數數倍的平均數,暗示著東昌里的 917 個納稅單位中,有一位或多位納稅人,有著天文數字般的所得總額。</b></p>
<p>我們可以嘗試做個簡單的估計:假設 0-25% 的人收入都是 47.4 萬、25-50% 的人收入都是 93.6 萬,50-75% 的人收入都是 181.6 萬,剩下的 75-100% 收入設定個 2000 萬好了,再用整區所得總額 983657 萬,減掉前面估計出的所得總額,再除以我們設定的納稅單位數量,來看看這些拉高平均的納稅單位,年度所得總額到底有多高。</p>
<h3>假設 1:10 個超高收入納稅單位</h3>
<table id="no-more-tables">
<thead>
<tr>
<th>所得族群</br>假設所得總額</th>
<th>25%</br>47.4萬</th>
<th>50%</br>93.6萬</th>
<th>75%</br>181.6萬</th>
<th>100%</br>2000萬</th>
<th>超高收入納稅單位</th>
</tr>
</thead>
<tbody>
<tr>
<td data-title="所得族群">單位數</td>
<td data-title="25%">230</td>
<td data-title="50%">230</td>
<td data-title="75%">230</td>
<td data-title="100%">217</td>
<td data-title="超高收入">10</td>
</tr>
<tr>
<td data-title="所得族群">分組所得總額</td>
<td data-title="25%">10971萬</td>
<td data-title="50%">21528萬</td>
<td data-title="75%">41768萬</td>
<td data-title="100%">434000萬</td>
<td data-title="超高收入">475399萬</td>
</tr>
<tr>
<td data-title="超高收入"><b>平均每單位所得總額</b></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td><font color="#558C89">約 4 億 7 千萬</font></td>
</tr>
</tbody>
</table>
<h3>假設 2:50 個超高收入納稅單位</h3>
<table id="no-more-tables">
<thead>
<tr>
<th>所得族群</br>假設所得總額</th>
<th>25%</br>47.4萬</th>
<th>50%</br>93.6萬</th>
<th>75%</br>181.6萬</th>
<th>100%</br>2000萬</th>
<th>超高收入納稅單位</th>
</tr>
</thead>
<tbody>
<tr>
<td data-title="所得族群">單位數</td>
<td data-title="25%">230</td>
<td data-title="50%">230</td>
<td data-title="75%">230</td>
<td data-title="100%">177</td>
<td data-title="超高收入">50</td>
</tr>
<tr>
<td data-title="所得族群">分組所得總額</td>
<td data-title="25%">10971萬</td>
<td data-title="50%">21528萬</td>
<td data-title="75%">41768萬</td>
<td data-title="100%">354000萬</td>
<td data-title="超高收入">555399萬</td>
</tr>
<tr>
<td data-title="超高收入"><b>平均每單位所得總額</b></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td><font color="#558C89">約 1 億 1 千萬</font></td>
</tr>
</tbody>
</table>
<p>從上面的估計中可以發現,這些神秘的大戶每年至少有上億的收入。由於我們已經非常高估其他人的所得,神秘大戶的報稅收入,應該會比剛剛估算的數字更多一些。如果仔細觀察數字的分布,還可發現,整個東昌里其他納稅單位的全部所得加起來,可能還比大戶們的所得少一些。</p>
<h2>有錢的鄰居在哪裡</h2>
<p>像這樣在同一個區域內,所得分配有巨大差異的狀況,到底有多少呢?</p>
<div id="chart1">
</div>
<p>圖 1:區域內部所得分配差異</p>
<p>在圖 1 中,我們繪出平均所得總額前十名的村里的各項統計數字,稍微觀察一下這些平均數遠高於中位數、甚至第三分位數的區域,分別是哪些村里,差距又有多大。不過除了長據第一的松山區東昌里,因為位於敦化北路台塑總部後方,據傳是台塑集團王永在家族的居住地之外,其他的村里我們暫時找不到資料,足以解釋造成平均數飆高的原因。</p>
<h2>10%?1%?0.1%?</h2>
<p>我們或可想像,一般印象中的大安區、或者一開始的中位數前十名各里,住著台灣/雙北地區排名 10% 左右的有錢人,但超高平均數呈現出的,可能是 1%、甚至 0.1% 的有錢人。有錢人在哪裡?這是一個大家都好奇的問題。藉由地圖和統計資料的觀察,我們嘗試描繪高所得人群的空間分布。</p>
<p>不過,在想了解有錢人生活的好奇心之外,我們或許可以提出更多問題:有錢人的收入穩定嗎?他們的收入來源和一般人有什麼差別?這些差別,有沒有可能告訴我們什麼?接下來,我們會嘗試使用稅務資料繼續研究這些問題,如果發現了有趣的結果,再和大家分享。</p>
</section>
<!--
<div class="section">
<section class="main-content">
<h1>我是h1</h1>
<h2>我是h2</h2>
<h3>我是h3</h3>
<h4>我是h4</h4>
<h5>我是h5</h5>
<p>我是p</p>
<pre><code>我是code</code></pre>
<blockquote>
<h4>我是小框框標題</h4>
<p>我是小框框內容</p>
</blockquote>
</section>
</div>
-->
<section class="main-content">
<hr>
<h3>互動地圖:雙北所得大解密</h3>
<p>將台北市、新北市 103 年所得稅統計資料各村里綜合所得稅所得總額中位數畫成熱圖,顏色越粉紅,所得稅中位數越高,顏色越綠,該村里所得稅中位數越低。中位數僅能大致窺見區域分布差異,無法完全衡量實際分布,也無法顯示出家戶內部的所得差異。未設籍在居住地的人口也無法被計入。</p>
<p>另所得稅統計資料處理過程繁複,需時較久,目前資料僅釋出至 103 年度,故以 103 年度資料討論及作圖。</p>
<h3>資料來源</h3>
所得稅統計資料:103 年/<a href="http://www.fia.gov.tw/ct.asp?xItem=3451&ctNode=668&mp=1">財政部財政資訊中心</a> <a href="https://github.com/leeneil">、@leeneil</a> 在 <a href="https://github.com/cicadatatw>@cicadatatw">@cicadatatw</a> 的 <a href="https://github.com/cicadatatw/taiwan-income-by-village"> pdf/csv 轉檔</a></br>
101 年/<a href="http://data.gov.tw/">政府資料開放平台</a> <a href="http://data.gov.tw/node/17983">台北市</a>、<a href="http://data.gov.tw/node/17975">新北市</a></br>
捷運站點位置: <a href="https://github.com/repeat" class="user-mention">@repeat</a> 的 <a href="https://github.com/repeat/taipei-metro-stations">taipei-metro-stations</a>
<h3>延伸自</h3>
<a href="http://missmoss.github.io/taipei-mrt-viz/">台北捷運一日進出站流量</a></br>
<footer class="site-footer">
<span class="site-footer-owner"><a href="https://github.com/missmoss/taipei-stat-mrt">雙北所得分布地圖</a> 由 <a href="https://github.com/missmoss"> @missmoss</a> 製作。</span>
<!--<span class="site-footer-credits">The front photo is via courtesy of <a href="https://www.flickr.com/photos/lipon/11730442194/">liponan</a>.</span>-->
<span class="site-footer-credits">本頁面是 <a href="https://pages.github.com">GitHub Pages</a> ,修改自由 <a href="https://twitter.com/jasonlong">Jason Long</a> 製作的 <a href="https://github.com/jasonlong/cayman-theme">Cayman theme</a>。特別感謝 Miss Monday、務熙學長、鴨鴨、有有、南哥、Kn、白經濟作者群在製作過程的討論與協助。</span>
</footer>
</section>
</div>
</div>
<script>
var subdist, interactive, stationName, firstTime = false, exit = false;
$(document).ready(function() {
$('#fullpage').fullpage({
// scrolling
scrollOverflow: true,
// for mobile
scrollHorizontally: true,
// event
afterLoad: function(anchorLink, index){
var loadedSection = $(this);
//using index
if ( index === 4 && firstTime === false ) {
firstTime = true;
storyTeller();
}
},
onLeave: function(index, nextIndex, direction){
if ( index === 1 ) {
directionArrow.remove();
} else if ( index === 4 ) {
exit = true;
distname.style("opacity", 0);
tooltip.style("opacity", 0);
subdist.style("opacity", 0.475);
story.remove();
interactive();
}
},
})
});
/* Set up Leaflet.js map */
var northEast = L.latLng(25.3,122),
southWest = L.latLng(24.7,121.258),
bounds = L.latLngBounds(southWest, northEast);
/* Hydda.Base MAP
var layer = L.tileLayer('http://{s}.tile.openstreetmap.se/hydda/base/{z}/{x}/{y}.png', {
attribution: 'Tiles courtesy of <a href="http://openstreetmap.se/" target="_blank">OpenStreetMap Sweden</a> — Map data © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
});
*/
/* CARTODB BASEMAP */
var carto = L.tileLayer('http://{s}.basemaps.cartocdn.com/light_nolabels/{z}/{x}/{y}.png', {
attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, © <a href="http://cartodb.com/attributions">CartoDB</a>',
subdomain: 'abcd'
});
var satellite = L.tileLayer('http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', {
attribution: 'Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community'
});
var map = L.map('map', {
scrollWheelZoom: false,
doubleClickZoom: false,
center: [25.045,121.547],
zoom: 13,
zoomControl: false,
maxBounds: bounds
});
//add zoom control with your options
L.control.zoom({
position:'topright'
}).addTo(map);
map.addLayer(carto);
/* Initialize the SVG layer */
map._initPathRoot()
/* Set up svg and some elements for charts */
/* svg1 for Heatmap */
/* We simply pick up the SVG from the map object */
var directionArrow = d3.select("body")
.append("div")
.attr("class", "arrow")
.append("svg");
setTimeout(function() {
directionArrow
.append("path")
.attr("d", "m0,0L30,25L60,0L60,7L30,32L0,7z")
.attr("fill", "#d0d0d0")
.attr("transform", "translate(0, -20)")
.transition()
.duration(500)
.attr("transform", "translate(0, 0)");
directionArrow
.append("text")
.attr("x", 65)
.attr("y", 0)
.attr("fill", "#d0d0d0")
.style("font-size", "1rem")
.text("往下滑動到下一頁")
.transition()
.duration(500)
.attr("y", 17);
}, 1000);
var svg1 = d3.select("#map").select("svg");
g = svg1.append("g");
var title = d3.select("#map").append("div")
.attr("class", "title");
title.text("雙北所得地圖");
var legend = d3.select("#map").append("div")
.attr("class", "legend");
var mapcontrol = d3.select("#map").append("div")
.attr("id", "mapcontrol");
var label1 = d3.select("#mapcontrol")
.append("div")
.append("label")
.attr("class", "switch")
.text(" 捷運線");
label1.append("input")
.attr("type", "checkbox")
.attr("checked", true)
.attr("id", "mrtline");
label1.append("div")
.attr("class", "sliderround");
var label2 = d3.select("#mapcontrol")
.append("div")
.append("label")
.attr("class", "switch")
.text(" 捷運站點");
label2.append("input")
.attr("type", "checkbox")
.attr("id", "station");
label2.append("div")
.attr("class", "sliderround");
var label3 = d3.select("#mapcontrol")
.append("div")
.append("label")
.attr("class", "switch")
.text(" 衛星地圖");
label3.append("input")
.attr("type", "checkbox")
.attr("id", "satellite");
label3.append("div")
.attr("class", "sliderround");
d3.select("#satellite").on("change", changeMap);
function changeMap() {
var check = this.checked;
if (check === true) {
map.removeLayer(carto);
map.addLayer(satellite);
stationName.attr("fill", "white");
} else {
map.removeLayer(satellite);
map.addLayer(carto);
stationName.attr("fill", "black");
}
}
var tooltip = d3.select("body").append("div")
.attr("class", "tooltip")
.style("opacity", 0);
var distname = d3.select("body").append("div")
.attr("class", "distname")
.style("opacity", 0);
var svg2 = d3.select(map.getPanes().overlayPane).append("svg"),
g2 = svg2.append("g").attr("class", "dist");
g3 = svg2.append("g").attr("class", "station");
var story = d3.select("#map").append("div")
.attr("class", "story");
function numberWithCommas(x) {
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}
d3.json("twnsub3.json", function(collection) {
var incomeMedian = collection.features.map(function(item) {
return parseInt(item.properties.INCOME_MEDIAN);
}
)
var extent = d3.extent(incomeMedian),
middle = (extent[0]+extent[1])/2;
var fillColor = d3.scale.linear()
.domain([extent[0], middle, extent[1]])
//.range(["#7CFFDE", "#5468E8", "#E84374"]);
.range(["#52FFB0", "#5468E8", "#E84374"]);
//.range(["#00A388", "#FFF457", "#E8518E"]);
var fillOpacity = d3.scale.linear()
.domain(extent)
//.range(["#52FFB0", "#5468E8", "#E84374"]);
.range([0.35, 0.55]);
//legend
var legendData = [300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200];
var rectWidth = 27;
legend = legend.append("svg");
legend.append("text")
.attr("x", 5)
.attr("y", 18)
.attr("fill", "#6C6C6C")
.style("font-size", 14)
.text("雙北各里年度家戶所得中位數");
legend.selectAll(".legend")
.data(legendData)
.enter()
.append("rect")
.attr("x", function(d,i) { return 10+rectWidth*i; })
.attr("y", 25)
.attr("width", rectWidth)
.attr("height", 10)
.attr("fill", function(d) { return fillColor(d); })
.style("opacity", 0.4);
legend.selectAll(".legendtext")
.data(legendData)
.enter()
.append("text")
.attr("text-anchor", "start")
.attr("x", function(d,i) { return 5+rectWidth*i; })
.attr("y", 50)
.attr("fill", "#6C6C6C")
.text(function(d) { return d/10;});
legend.append("text")
.attr("text-anchor", "start")
.attr("x", rectWidth*10+5)
.attr("y", 49)
.attr("fill", "#6C6C6C")
.text("萬元");
var transform = d3.geo.transform({point: projectPoint}),
path = d3.geo.path().projection(transform);
subdist = g2.selectAll(".subdist")
.data(collection.features)
.enter().append("path")
.attr("stroke", "white")
.attr("stroke-width", 0.5)
.attr("class", function(d) { return d.properties.TOWN; }) //class=中正區/大安區/松山區...etc
.attr("id", function(d) { return d.properties.VILLAGE; }) //id=華城里/政大里/龍門里...etc
.attr("fill", function(d) {
// Get data value
var value = d.properties.INCOME_MEDIAN;
if (value) {
//If value exists…
return fillColor(value);
} else {
//If value is undefined…
return "white";
}
})
.style("opacity", 0.475);
interactive = function () {
subdist.on("mouseover", function(d) {
d3.select(this)
.style("opacity", 0.85);
tooltip.transition()
.duration(200)
.style("opacity", 0.9);
tooltip.text(function () {
return d.properties.TOWN+'\n'+
d.properties.VILLAGE+'\n'+
numberWithCommas(d.properties.INCOME_MEDIAN)+',000 元';
})
.style("left", (d3.event.pageX) + "px")
.style("top", (d3.event.pageY - 28) + "px");
})
.on("click", function(d) {
d3.select(this)
.style("opacity", 0.85);
tooltip.transition()
.duration(200)
.style("opacity", 0.9);
tooltip.text(function () {
return d.properties.TOWN+'\n'+
d.properties.VILLAGE+'\n'+
numberWithCommas(d.properties.INCOME_MEDIAN)+',000 元';
})
.style("left", (d3.event.pageX) + "px")
.style("top", (d3.event.pageY - 28) + "px");
})
.on("mouseout", function(d) {
d3.select(this)
.style("opacity", 0.475)
tooltip.transition()
.duration(500)
.style("opacity", 0);
});
}
//d3 code stolen from http://bost.ocks.org/mike/leaflet/#init
map.on("viewreset", reset);
reset();
function reset() {
var topobounds = path.bounds(collection),
topLeft = topobounds[0],
bottomRight = topobounds[1];
svg2.attr("width", bottomRight[0] - topLeft[0])
.attr("height", bottomRight[1] - topLeft[1])
.style("left", topLeft[0] + "px")
.style("top", topLeft[1] + "px");
g2.attr("transform", "translate(" + -topLeft[0] + "," + -topLeft[1] + ")");
subdist.attr("d", path);
}
function projectPoint(x, y) {
var point = map.latLngToLayerPoint(new L.LatLng(y, x));
this.stream.point(point.x, point.y);
}
});
//twnsublatlng.json Village_NLSC_121_1050219 25.0853403,121.4231634
d3.csv("taipei.csv", function(data) {
var transform = d3.geo.transform({point: projectPoint}),
d3path = d3.geo.path().projection(transform);
function projectPoint(x, y) {
var point = map.latLngToLayerPoint(new L.LatLng(x, y));
this.stream.point(point.x, point.y);
}
var lines = {
"1":{
color: "brown",
geoLineString: {
type: "LineString",
coordinates: []
}},
"2": {
color: "red",
geoLineString: {
type: "LineString",
coordinates: []
}},
"3": {
color: "green",
geoLineString: {
type: "LineString",
coordinates: []
}},
"4": {
color: "orange",
geoLineString: {
type: "LineString",
coordinates: []
}},
"4-1": {
color: "orange",
geoLineString: {
type: "LineString",
coordinates: []
}},
"5": {
color: "blue",
geoLineString: {
type: "LineString",
coordinates: []
}},
"n": {
color: "red",
geoLineString: {
type: "LineString",
coordinates: []
}},
"s": {
color: "green",
geoLineString: {
type: "LineString",
coordinates: []
}}
};
data.forEach(function(d) {
lines[d.line_no].geoLineString.coordinates.push(
[parseFloat(d.lat), parseFloat(d.lon)]);
});
var keys = d3.keys(lines).filter(function(key, d) {
return key;
});
var lines2 = [];
keys.forEach(function(key) {
var tmpdata = lines[key];
tmpdata['line_no'] = key;
lines2.push(tmpdata);
});