-
Notifications
You must be signed in to change notification settings - Fork 11
/
input.R
121 lines (98 loc) · 4.84 KB
/
input.R
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
## Declare the 3-letter ISO code(s) of the country(ies) you are interested in
## modeling.
## NOTE: You must declare the ISO codes of the countries you are modelign even
## if you plan on only modeling portions of them, i.e. declaring
## specific admin IDs below or using a shapefile to subset them.
## EXAMPLE:
## rfg.input.countries <- c("BTN","NPL")
## rfg.input.countries <- c("ARM", "GEO", "AZE")
rfg.input.countries <- c("NPL")
## If you are using specific Population tables, i.e. non-standard, stored
## locally, declare their paths here. Otherwise, the script will source the
## ones from the WorldPop FTP
## EXAMPLE:
## rfg.input.poptables <- list(
## "NPL"="D:/WorldPop_Data/RandomeForest/BTN_POP_TABLE_FINAL.dbf",
## "BTN"="D:/WorldPop_Data/RandomeForest/BTN_POP_TABLE_FINAL.dbf"
## )
rfg.input.poptables <- NULL
## Declare specific admin IDS by which to subset the above declared countries:
## WARNING: You can NOT use this option in conjunction with the shapefile
## subsetting option. At least one of the two subsetting options MUST
## be set to NULL.
## EXAMPLE:
## rfg.input.adminids <- list(
## "BTN"=c(641378946,641378947,641378948),
## "NPL"=c(524664944,524664945,524664946))
rfg.input.adminids <- NULL
## Declare the paths to the shapefiles subsetting the countries of interest
## which were declared above.
## WARNING: You can NOT use this option in conjunction with the adminID
## subsetting option. At least one of the two subsetting options MUST
## be set to NULL.
## EXAMPLE:
## rfg.input.shp <- list( "BTN"="F:\\WorldPop\\RandomeForest\\shp\\BTN\\out.shp",
## "NPL"="F:\\WorldPop\\RandomeForest\\shp\\NPL\\out.shp")
rfg.input.shp <- NULL
## Declare the input year for which we are modeling.
## NOTE: This must be declared as a numeric character string.
rfg.input.year <- "2000"
## Declare a list of the character representations of the covaraites with which
## we intend to do modeling with:
## NOTE: You can use the function wpgpListCountryCovariates() from the
## wpgpCovariates library to see what all covariates are available, but
## most will remain the same between covariate runs excluding the year
## specific part of their name.
## EXAMPLE:
## wpgpListCountryDatasets("ABW")
##
## WARNING: Ensure that the covariates declared match the year declared for
## the rfg.input.year variable.
rfg.input.cvr <- list("esaccilc_dst011_100m_2000",
"esaccilc_dst040_100m_2000",
"esaccilc_dst130_100m_2000",
"esaccilc_dst140_100m_2000",
"esaccilc_dst150_100m_2000",
"esaccilc_dst160_100m_2000",
"esaccilc_dst190_100m_2000",
"esaccilc_dst200_100m_2000",
"esaccilc_dst_water_100m_2000_2012",
"osm_dst_roadintersec_100m_2016",
"osm_dst_waterway_100m_2016",
"osm_dst_road_100m_2016",
"srtm_slope_100m",
"srtm_topo_100m",
"dst_coastline_100m_2000_2020",
"dmsp_100m_2000"
)
# Add custom covaiates
#
#rfg.input.custom.cvr <- list( "ghsl_esa_dst_2000"="E:\\WorldPop\\RF_NEW\\btn_grid_100m_ghsl_dst_2000.tif",
# "wclim_prec"="E:\\WorldPop\\RF_NEW\\btn_grid_100m_wclim_prec.tif",
# "wclim_temp"="E:\\WorldPop\\RF_NEW\\btn_grid_100m_wclim_temp.tif")
rfg.input.custom.cvr <- NULL
## It is posible to turn off proximity in RF
##
rfg.proximity <- TRUE
## Declare if we are using a fixed set in this modeling, i.e. are we
## parameterizing, in part or in full, this RF model run upon another
## country's(ies') RF model object.
##
## Copy popfit you are going to use to a relative folder
## /data/old_popfits/popfits_final and popfits_quant
## all popfits in this folder will be loaded
##
rfg.fixed.set <- FALSE
rfg.fixed.set.incl.input.countries <- FALSE
## this option only used if rfg.fixed.set.incl.input.countries is TRUE
## if the country has less then rfg.fixed.set.idmin.id.threshold idmin units
## then RF popfit will not be combined with RF model run upon another
## country's(ies') RF model object
rfg.fixed.set.idmin.id.threshold <- 20
## Write a description of what fixset is used
rfg.fixed.set.description <- "Description Using ...."
## if TRUE then we will calculate the zonal stats sum on our
## main results and comper with POP table.
rfg.check.result <- TRUE
## if > this value then during check it will be reported at the end.
rfg.check.result.eps <- 0.1