1 Age structure of DINSHAN

1.1 load them

pacman::p_load(mlmRev, tidyverse, lme4, merTools)

1.2 input data

data1 <- read.table("C:/Users/HANK/Desktop/age1.csv", header = TRUE, sep = ",") 
# 檔案路徑是相對於目前的工作目錄,header 是指資料是否有包含欄位名稱,sep 是指資料的分隔符號。

#
head(data1)
##       yr popul blw14 X15to64 X65up blw14p X15to64p X65upper Depen
## 1 din108   830    32     582   216   3.86    70.12    26.02    43
## 2 din107   858    35     606   217   4.08    70.63    25.29    42
## 3 din106   875    40     613   222   4.57    70.06    25.37    43
## 4 din105   900    47     624   229   5.22    69.33    25.44    44
## 5 din104   920    48     637   235   5.22    69.24    25.54    44
## 6 din103   947    59     653   235   6.23    68.95    24.82    45
require(ggplot2)
qplot(x = yr,
      y = popul,
      data = data1)

require(ggplot2)
qplot(x = yr,
      y = blw14,
      data = data1)

require(ggplot2)
qplot(x = yr,
      y = X15to64,
      data = data1)

require(ggplot2)
qplot(x = yr,
      y = X65up,
      data = data1)

require(ggplot2)
qplot(x = yr,
      y = Depen,
      data = data1)

2 Age structure of CHIGU District

Description:七股全區的人口結構(資料從民國99年至108年底,分為“七股區總人口數”、“14歲以下人數”、“15至64歲人數”、“65歲以上人數”;“14歲以下百分比”、“15至64歲百分比”、“65歲以上百分比”、“扶養比”)

2.1 input data

data2 <- read.table("C:/Users/HANK/Desktop/age2.csv", header = TRUE, sep = ",") 
# 檔案路徑是相對於目前的工作目錄,header 是指資料是否有包含欄位名稱,sep 是指資料的分隔符號。

#
head(data2)
##         yr popul blw14 X15to64 X65up blw14p X15to64p X65upper Depen
## 1 total108 22299  2031   15693  4575   9.11    70.38    20.52    42
## 2 total107 22732  2182   15997  4553   9.60    70.37    20.03    42
## 3 total106 22974  2304   16136  4534  10.03    70.24    19.74    42
## 4 total105 23172  2407   16278  4487  10.39    70.25    19.36    42
## 5 total104 23365  2473   16445  4447  10.58    70.38    19.03    42
## 6 total103 23608  2568   16616  4424  10.88    70.38    18.74    42
require(ggplot2)
qplot(x = yr,
      y = popul,
      data = data2)

require(ggplot2)
qplot(x = yr,
      y = blw14,
      data = data2)

require(ggplot2)
qplot(x = yr,
      y = X15to64,
      data = data2)

require(ggplot2)
qplot(x = yr,
      y = X65up,
      data = data2)

require(ggplot2)
qplot(x = yr,
      y = Depen,
      data = data2)

3 Population Growth of DINSHAN

3.1 load them

pacman::p_load(mlmRev, tidyverse, lme4, merTools)

3.2 input data

data3 <- read.table("C:/Users/HANK/Desktop/grow2.csv", header = TRUE, sep = ",") 
# 檔案路徑是相對於目前的工作目錄,header 是指資料是否有包含欄位名稱,sep 是指資料的分隔符號。

#
head(data3)
##       yr totalgw born death natgw mv_in mv_out socgw
## 1 din108     -28    2    14   -12    18     36   -18
## 2 din107     -17    3    15   -12    32     37    -5
## 3 din106     -25    2    17   -15    20     28    -8
## 4 din105     -20    2    16   -14    20     20     0
## 5 din104     -27    6    13    -7     7     21   -14
## 6 din103     -18    2    11    -9    26     33    -7
require(ggplot2)
qplot(x = yr,
      y = totalgw,
      data = data3)

require(ggplot2)
qplot(x = yr,
      y = natgw,
      data = data3)

require(ggplot2)
qplot(x = yr,
      y = mv_in,
      data = data3)

require(ggplot2)
qplot(x = yr,
      y = mv_out,
      data = data3)

require(ggplot2)
qplot(x = yr,
      y = socgw,
      data = data3)

4 Population Growth of CHIGU District

4.1 load them

pacman::p_load(mlmRev, tidyverse, lme4, merTools)

4.2 input data

data4 <- read.table("C:/Users/HANK/Desktop/grow1.csv", header = TRUE, sep = ",") 
# 檔案路徑是相對於目前的工作目錄,header 是指資料是否有包含欄位名稱,sep 是指資料的分隔符號。

#
head(data4)
##         yr totalgw born death natgw mv_in mv_out socgw
## 1 total108    -433  103   329  -226   887   1094  -207
## 2 total107    -242  108   294  -186  1012   1068   -56
## 3 total106    -198  102   294  -192   986    992    -6
## 4 total105    -193  119   307  -188   957    962    -5
## 5 total104    -243  152   274  -122   808    929  -121
## 6 total103    -263  128   281  -153   945   1055  -110
require(ggplot2)
qplot(x = yr,
      y = totalgw,
      data = data4)

require(ggplot2)
qplot(x = yr,
      y = natgw,
      data = data4)

require(ggplot2)
qplot(x = yr,
      y = mv_in,
      data = data4)

require(ggplot2)
qplot(x = yr,
      y = mv_out,
      data = data4)

require(ggplot2)
qplot(x = yr,
      y = socgw,
      data = data4)