Revision daecef39
Added by Benoit Parmentier over 8 years ago
climate/research/oregon/interpolation/global_run_scalingup_assessment_part3.R | ||
---|---|---|
3 | 3 |
#This script uses the worklfow code applied to the globe. Results currently reside on NEX/PLEIADES NASA. |
4 | 4 |
#Combining tables and figures for individual runs for years and tiles. |
5 | 5 |
#This script complements part1 and part2 of the accuracy assessment and group tables and outputs |
6 |
#from run of accuracy assessement generated earlier. |
|
6 |
#from run of accuracy assessement generated earlier. |
|
7 |
#This is used in Stage 8 of master script. |
|
7 | 8 |
#Analyses, figures, tables and data are also produced in the script. |
8 | 9 |
#AUTHOR: Benoit Parmentier |
9 | 10 |
#CREATED ON: 03/23/2014 |
10 |
#MODIFIED ON: 04/29/2016
|
|
11 |
#MODIFIED ON: 07/27/2016
|
|
11 | 12 |
#Version: 5 |
12 | 13 |
#PROJECT: Environmental Layers project |
13 | 14 |
#COMMENTS: Initial commit, script based on part 2 of assessment, will be modified further for overall assessment |
... | ... | |
243 | 244 |
|
244 | 245 |
## Step 2: only read what is necessary at this stage... |
245 | 246 |
list_tb <- lapply(list_tb_fname,function(x){read.table(x,stringsAsFactors=F,sep=",")}) |
246 |
|
|
247 |
list_tb_updated <- mclapply(list_tb,FUN=adding_tile_nb_fun,mc.preschedule=FALSE,mc.cores = num_cores,num_cores_tmp=1) |
|
248 |
|
|
249 |
|
|
250 |
adding_tile_nb_fun <- function(x,num_cores_tmp){ |
|
251 |
x$tile_id <- factor(x$tile_id, levels=unique(mixedsort(x$tile_id)))#fix level ordering for plotting |
|
252 |
#num_cores_tmp <- 1 |
|
253 |
x$tile_nb <- unlist(mclapply(as.character(x$tile_id),FUN=function(y){strsplit(y,"_")[[1]][2]},mc.preschedule=FALSE,mc.cores = num_cores_tmp)) |
|
254 |
return(x) |
|
255 |
} |
|
256 |
#tb$tile_id <- factor(tb$tile_id, levels=unique(mixedsort(tb$tile_id)))#fix level ordering for plotting |
|
257 |
#fix level ordering for plotting |
|
258 |
#tb$tile_nb <- unlist(mclapply(as.character(tb$tile_id),FUN=function(x){strsplit(x,"_")[[1]][2]},mc.preschedule=FALSE,mc.cores = num_cores)) |
|
259 |
#unlist(mclapply(as.character(tb$tile_id[1:10]),FUN=function(x){strsplit(x,"_")[[1]][2]},mc.preschedule=FALSE,mc.cores = num_cores)) |
|
260 | 247 |
|
261 | 248 |
tb <- do.call(rbind,list_tb) |
262 | 249 |
list_tb_s <- lapply(list_tb_s_fname,function(x){read.table(x,stringsAsFactors=F,sep=",")}) |
Also available in: Unified diff
assessment function part3, overall table building