-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_all.R
51 lines (35 loc) · 1.05 KB
/
run_all.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
##########################
# TCI index and analyses #
##########################
# setwd('path/to/TCI')
# get assumptions
source('assumptions.R')
# outputs directory (creates one per day!)
now <- Sys.time()
dname <- paste0( 'run_', strftime(now, format = "%Y%m%d"))
outdir <- file.path( 'outputs', dname )
dir.create(outdir)
dir.create(file.path(outdir,'tables'))
dir.create(file.path(outdir,'figures'))
# view assumptions / parameters
print(ls.str())
# 1. compile data and calculate TCI scores
source('code/0_getData.R')
# 2. summary maps and tables
source('code/maps.R')
source('code/tables.R')
source('code/figures.R')
# 3. Analyses
source('code/1_uncertainty.R')
source('code/2_spatial_autocorrelation.R')
source('code/3_cluster.R')
#############
# Appendix #
#############
# 4. Scripts for generating climate weighted indicators
# source('code/z_make_CWI_migration.R')
# source('code/z_make_CWI_FDI.R')
# 5. Special materials for presentation
source('code/z_migration_impact_figs.R')
source('code/z_fdi_impact_figs.R')
source('code/z_donut_figs.R')