SiangKai commited on
Commit
27a9d7a
·
verified ·
1 Parent(s): 36922c0

Update 社福支出.html

Browse files
Files changed (1) hide show
  1. 社福支出.html +230 -22
社福支出.html CHANGED
@@ -4,6 +4,7 @@
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>高齡化下的財政挑戰:高雄市老人社會福利支出變化報告</title>
 
7
  <style>
8
  :root {
9
  --c-primary: #2c5aa0;
@@ -385,6 +386,12 @@
385
  text-align: center;
386
  }
387
 
 
 
 
 
 
 
388
  .chart-placeholder {
389
  background: var(--c-secondary);
390
  padding: 60px 40px;
@@ -714,37 +721,22 @@
714
  </div>
715
 
716
  <figure>
717
- <div class="chart-placeholder">
718
- <strong>圖表佔位符:高雄市總人口與扶老比趨勢圖</strong><br>
719
- 類型:長條折線複合圖<br>
720
- X軸:年度(109年至123年)<br>
721
- Y軸(左):人口數(萬人),以長條圖呈現<br>
722
- Y軸(右):扶老比,以折線圖呈現<br>
723
- 重點:清楚顯示總人口下降與扶老比急速上升的反向趨勢。
724
  </div>
725
  <figcaption>資料來源:高雄市政府主計處,依人口CCR法推估。</figcaption>
726
  </figure>
727
 
728
  <figure>
729
- <div class="chart-placeholder">
730
- <strong>圖表佔位符:各年齡層人口變化趨勢</strong><br>
731
- 類型:折線圖<br>
732
- X軸:年度(109年至123年)<br>
733
- Y軸:人口數(萬人)<br>
734
- 線條:三條線分別代表 0-14歲、15-64歲、65歲以上人口<br>
735
- 重點:呈現勞動人口(15-64歲)下降,而高齡人口(65歲以上)穩定上升的交叉趨勢。
736
  </div>
737
  <figcaption>資料來源:高雄市政府主計處,依人口CCR法推估。</figcaption>
738
  </figure>
739
 
740
  <figure>
741
- <div class="chart-placeholder">
742
- <strong>圖表佔位符:三大老人社福支出預估</strong><br>
743
- 類型:堆疊區域圖或分組長條圖<br>
744
- X軸:年度(113年至123年)<br>
745
- Y軸:支出金額(億元)<br>
746
- 分類:中低收入老人生活津貼、65歲以上老人健保費補助、重陽節敬老禮金<br>
747
- 重點:視覺化呈現三項主要支出的成長趨勢及總額的快速膨脹。
748
  </div>
749
  <figcaption>資料來源:高雄市政府主計處,依人口推估及物價指數模型計算。</figcaption>
750
  </figure>
@@ -851,7 +843,7 @@
851
  });
852
 
853
  // Scroll-triggered animations
854
- const fadeElements = document.querySelectorAll('.overview-item, .kpi-card, .pullquote, .timeline-item, figure, .source-list li');
855
 
856
  const observerOptions = {
857
  root: null,
@@ -873,6 +865,219 @@
873
  animationObserver.observe(el);
874
  });
875
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
876
  // Event listeners
877
  window.addEventListener('scroll', () => {
878
  updateActiveNav();
@@ -886,3 +1091,6 @@
886
  </script>
887
  </body>
888
  </html>
 
 
 
 
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>高齡化下的財政挑戰:高雄市老人社會福利支出變化報告</title>
7
+ <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
8
  <style>
9
  :root {
10
  --c-primary: #2c5aa0;
 
386
  text-align: center;
387
  }
388
 
389
+ .chart-container {
390
+ position: relative;
391
+ height: 400px;
392
+ width: 100%;
393
+ }
394
+
395
  .chart-placeholder {
396
  background: var(--c-secondary);
397
  padding: 60px 40px;
 
721
  </div>
722
 
723
  <figure>
724
+ <div class="chart-container">
725
+ <canvas id="populationChart"></canvas>
 
 
 
 
 
726
  </div>
727
  <figcaption>資料來源:高雄市政府主計處,依人口CCR法推估。</figcaption>
728
  </figure>
729
 
730
  <figure>
731
+ <div class="chart-container">
732
+ <canvas id="ageStructureChart"></canvas>
 
 
 
 
 
733
  </div>
734
  <figcaption>資料來源:高雄市政府主計處,依人口CCR法推估。</figcaption>
735
  </figure>
736
 
737
  <figure>
738
+ <div class="chart-container">
739
+ <canvas id="welfareSpendingChart"></canvas>
 
 
 
 
 
740
  </div>
741
  <figcaption>資料來源:高雄市政府主計處,依人口推估及物價指數模型計算。</figcaption>
742
  </figure>
 
843
  });
844
 
845
  // Scroll-triggered animations
846
+ const fadeElements = document.querySelectorAll('.overview-item, .kpi-card, .pullquote, .timeline-item, .source-list li');
847
 
848
  const observerOptions = {
849
  root: null,
 
865
  animationObserver.observe(el);
866
  });
867
 
868
+ // --- Chart.js Initialization ---
869
+ const ctx = document.getElementById('populationChart').getContext('2d');
870
+ const chartLabels = ['109', '110', '111', '112', '113', '114', '115', '116', '117', '118', '119', '120', '121', '122', '123'];
871
+ const populationData = [276.6, 274.5, 272.8, 273.8, 273.1, 272.1, 270.9, 269.7, 268.3, 266.9, 265.3, 263.6, 261.8, 259.8, 257.8];
872
+ const dependencyRatioData = [23.3, 24.7, 26.1, 27.4, 28.8, 30.4, 31.8, 33.2, 34.7, 36.1, 37.4, 38.7, 39.9, 41.2, 42.5];
873
+
874
+ const populationChart = new Chart(ctx, {
875
+ type: 'bar',
876
+ data: {
877
+ labels: chartLabels,
878
+ datasets: [{
879
+ label: '總人口數 (萬人)',
880
+ data: populationData,
881
+ backgroundColor: 'rgba(44, 90, 160, 0.6)',
882
+ borderColor: 'rgba(44, 90, 160, 1)',
883
+ borderWidth: 1,
884
+ yAxisID: 'y',
885
+ order: 2
886
+ }, {
887
+ label: '扶老比 (%)',
888
+ data: dependencyRatioData,
889
+ type: 'line',
890
+ borderColor: '#e74c3c',
891
+ backgroundColor: '#e74c3c',
892
+ tension: 0.3,
893
+ yAxisID: 'y1',
894
+ order: 1
895
+ }]
896
+ },
897
+ options: {
898
+ responsive: true,
899
+ maintainAspectRatio: false,
900
+ plugins: {
901
+ title: {
902
+ display: true,
903
+ text: '高雄市總人口與扶老比趨勢圖 (民國109-123年)',
904
+ font: { size: 18, family: "'Microsoft JhengHei', sans-serif" },
905
+ padding: { top: 10, bottom: 20 }
906
+ },
907
+ tooltip: {
908
+ mode: 'index',
909
+ intersect: false,
910
+ },
911
+ },
912
+ scales: {
913
+ x: {
914
+ title: {
915
+ display: true,
916
+ text: '年度'
917
+ }
918
+ },
919
+ y: {
920
+ type: 'linear',
921
+ display: true,
922
+ position: 'left',
923
+ title: {
924
+ display: true,
925
+ text: '總人口數 (萬人)'
926
+ },
927
+ min: 250
928
+ },
929
+ y1: {
930
+ type: 'linear',
931
+ display: true,
932
+ position: 'right',
933
+ title: {
934
+ display: true,
935
+ text: '扶老比 (%)'
936
+ },
937
+ grid: {
938
+ drawOnChartArea: false, // only want the grid lines for one axis to show up
939
+ },
940
+ min: 20
941
+ }
942
+ }
943
+ }
944
+ });
945
+
946
+ // --- Chart.js Age Structure Chart ---
947
+ const ageCtx = document.getElementById('ageStructureChart').getContext('2d');
948
+ const ageLabels = ['109', '110', '111', '112', '113', '114', '115', '116', '117', '118', '119', '120', '121', '122', '123'];
949
+ const ageData0to14 = [32.3, 31.6, 30.9, 30.6, 30.0, 29.9, 29.3, 28.3, 27.6, 26.8, 25.9, 25.1, 24.3, 23.6, 23.0];
950
+ const ageData15to64 = [198.1, 194.7, 191.9, 190.9, 188.7, 185.8, 183.3, 181.2, 178.7, 176.4, 174.3, 171.9, 169.8, 167.3, 164.7];
951
+ const ageData65plus = [46.1, 48.1, 50.0, 52.3, 54.4, 56.4, 58.4, 60.2, 62.0, 63.6, 65.1, 66.6, 67.7, 68.9, 70.0];
952
+
953
+ const ageStructureChart = new Chart(ageCtx, {
954
+ type: 'line',
955
+ data: {
956
+ labels: ageLabels,
957
+ datasets: [
958
+ {
959
+ label: '15-64歲 (萬人)',
960
+ data: ageData15to64,
961
+ borderColor: '#2c5aa0',
962
+ backgroundColor: 'rgba(44, 90, 160, 0.1)',
963
+ tension: 0.3,
964
+ fill: true
965
+ },
966
+ {
967
+ label: '65歲以上 (萬人)',
968
+ data: ageData65plus,
969
+ borderColor: '#e74c3c',
970
+ backgroundColor: 'rgba(231, 76, 60, 0.1)',
971
+ tension: 0.3,
972
+ fill: true
973
+ },
974
+ {
975
+ label: '0-14歲 (萬人)',
976
+ data: ageData0to14,
977
+ borderColor: '#f39c12',
978
+ backgroundColor: 'rgba(243, 156, 18, 0.1)',
979
+ tension: 0.3,
980
+ fill: true
981
+ }
982
+ ]
983
+ },
984
+ options: {
985
+ responsive: true,
986
+ maintainAspectRatio: false,
987
+ plugins: {
988
+ title: {
989
+ display: true,
990
+ text: '高雄市各年齡層人口變化趨勢 (民國109-123年)',
991
+ font: { size: 18, family: "'Microsoft JhengHei', sans-serif" },
992
+ padding: { top: 10, bottom: 20 }
993
+ },
994
+ tooltip: {
995
+ mode: 'index',
996
+ intersect: false
997
+ }
998
+ },
999
+ scales: {
1000
+ x: {
1001
+ title: {
1002
+ display: true,
1003
+ text: '年度'
1004
+ }
1005
+ },
1006
+ y: {
1007
+ title: {
1008
+ display: true,
1009
+ text: '人口數 (萬人)'
1010
+ }
1011
+ }
1012
+ }
1013
+ }
1014
+ });
1015
+
1016
+
1017
+ // --- Chart.js Welfare Spending Chart ---
1018
+ const welfareCtx = document.getElementById('welfareSpendingChart').getContext('2d');
1019
+ const welfareLabels = ['113', '114', '115', '116', '117', '118', '119', '120', '121', '122', '123'];
1020
+ const welfareData1 = [38, 40, 43, 45, 48, 50, 53, 55, 58, 60, 63]; // 中低收
1021
+ const welfareData2 = [28, 29, 31, 33, 35, 37, 38, 40, 42, 44, 45]; // 健保
1022
+ const welfareData3 = [9, 9, 9, 10, 10, 10, 11, 11, 11, 11, 11]; // 敬老
1023
+
1024
+ const welfareSpendingChart = new Chart(welfareCtx, {
1025
+ type: 'bar',
1026
+ data: {
1027
+ labels: welfareLabels,
1028
+ datasets: [
1029
+ {
1030
+ label: '中低收入老人生活津貼',
1031
+ data: welfareData1,
1032
+ backgroundColor: 'rgba(44, 90, 160, 0.7)',
1033
+ },
1034
+ {
1035
+ label: '65歲以上老人健保費補助',
1036
+ data: welfareData2,
1037
+ backgroundColor: 'rgba(231, 76, 60, 0.7)',
1038
+ },
1039
+ {
1040
+ label: '重陽節敬老禮金',
1041
+ data: welfareData3,
1042
+ backgroundColor: 'rgba(243, 156, 18, 0.7)',
1043
+ }
1044
+ ]
1045
+ },
1046
+ options: {
1047
+ responsive: true,
1048
+ maintainAspectRatio: false,
1049
+ plugins: {
1050
+ title: {
1051
+ display: true,
1052
+ text: '三大老人社福支出預估 (民國113-123年)',
1053
+ font: { size: 18, family: "'Microsoft JhengHei', sans-serif" },
1054
+ padding: { top: 10, bottom: 20 }
1055
+ },
1056
+ tooltip: {
1057
+ mode: 'index',
1058
+ intersect: false
1059
+ }
1060
+ },
1061
+ scales: {
1062
+ x: {
1063
+ stacked: true,
1064
+ title: {
1065
+ display: true,
1066
+ text: '年度'
1067
+ }
1068
+ },
1069
+ y: {
1070
+ stacked: true,
1071
+ title: {
1072
+ display: true,
1073
+ text: '支出金額 (億元)'
1074
+ }
1075
+ }
1076
+ }
1077
+ }
1078
+ });
1079
+
1080
+
1081
  // Event listeners
1082
  window.addEventListener('scroll', () => {
1083
  updateActiveNav();
 
1091
  </script>
1092
  </body>
1093
  </html>
1094
+
1095
+
1096
+