fastproj包可以便捷地预测未来人口趋势,在设置好相应工作目录后,一键输出相应的Word报表。
The goal of fastproj is for fast and convenient population projection, and to provide corresponding Word reports.
1. Install
devtools::install_github("yanyuteng/fastproj")
library(fastproj)
2. Case
library(fastproj)
####### 1. Read Population Data ########
infile = read_pop('~/Desktop/guangxi/1_input/Data_Population.xlsx')
######## 2. Project Parm ########
inparm_scene = read_param('/Users/yuteng/Desktop/guangxi/1_input/Data_Parameter.xlsx',inparm_scene_k = 3)
inparm_lt = mod_lx(q0_5_m = 0.00318, e0_m = 76.75, q0_5_f = 0.00264, e0_f = 82.22)
######## 3. Project Population ########
path_excel='~/Desktop/guangxi/2_output'
path_pic='~/Desktop/guangxi/3_pic'
path_word='~/Desktop/guangxi/4_word'
fast.proj_pop(infile=infile, inparm_scene=inparm_scene, inparm_scene_k=3, inparm_lt=inparm_lt,
initial_year = 2020, project_year = 31, area_name = '某省', pop_name = '常住人口',
path_excel, path_pic, path_word)