Revision 552b7959
Added by Benoit Parmentier almost 9 years ago
climate/research/oregon/interpolation/global_run_scalingup_assessment_part3.R | ||
---|---|---|
7 | 7 |
#Analyses, figures, tables and data are also produced in the script. |
8 | 8 |
#AUTHOR: Benoit Parmentier |
9 | 9 |
#CREATED ON: 03/23/2014 |
10 |
#MODIFIED ON: 02/09/2016
|
|
10 |
#MODIFIED ON: 02/10/2016
|
|
11 | 11 |
#Version: 5 |
12 | 12 |
#PROJECT: Environmental Layers project |
13 | 13 |
#COMMENTS: Initial commit, script based on part 2 of assessment, will be modified further for overall assessment |
... | ... | |
188 | 188 |
|
189 | 189 |
setwd(out_dir) |
190 | 190 |
|
191 |
list_outfiles <- vector("list", length=31) #collect names of output files, this should be dynamic?
|
|
192 |
list_outfiles_names <- vector("list", length=31) #collect names of output files
|
|
191 |
list_outfiles <- vector("list", length=35) #collect names of output files, this should be dynamic?
|
|
192 |
list_outfiles_names <- vector("list", length=35) #collect names of output files
|
|
193 | 193 |
counter_fig <- 0 #index of figure to collect outputs |
194 | 194 |
|
195 | 195 |
#i <- year_predicted |
... | ... | |
447 | 447 |
title(paste("RMSE with scaling for all tiles: ",model_name[i],sep="")) |
448 | 448 |
dev.off() |
449 | 449 |
list_outfiles[[counter_fig+2]] <- paste("Figure3b_boxplot_overall_region_scaling_",model_name[i],"_",out_suffix,".png",sep="") |
450 |
counter_fig <- counter_fig +2 |
|
450 | 451 |
} |
451 |
counter_fig <- counter_fig + length(model_name) |
|
452 |
#counter_fig <- counter_fig + length(model_name)
|
|
452 | 453 |
r6 <-c("figure_3a","Boxplot overall accuracy with outliers","mod1",metric_name,region_name,year_predicted,list_outfiles[[6]]) |
453 | 454 |
r7 <-c("figure_3b","Boxplot overall accuracy with scaling","mod1",metric_name,region_name,year_predicted,list_outfiles[[7]]) |
454 | 455 |
r8 <-c("figure_3a","Boxplot overall accuracy with outliers","mod_kr",metric_name,region_name,year_predicted,list_outfiles[[8]]) |
455 | 456 |
r9 <-c("figure_3b","Boxplot overall accuracy with scaling","mod_kr",metric_name,region_name,year_predicted,list_outfiles[[9]]) |
456 | 457 |
|
457 | 458 |
################ |
458 |
### Figure 4: plot predicted tiff for specific date per model
|
|
459 |
### Figure 4: plot accuracy metric by month
|
|
459 | 460 |
## Replace by break out by season? |
460 | 461 |
|
461 |
#y_var_name <-"dailyTmax" |
|
462 |
#index <-244 #index corresponding to Sept 1 |
|
463 |
|
|
464 |
# if (mosaic_plot==TRUE){ |
|
465 |
# index <- 1 #index corresponding to Jan 1 |
|
466 |
# date_selected <- "20100901" |
|
467 |
# name_method_var <- paste(interpolation_method,"_",y_var_name,"_",sep="") |
|
468 |
# |
|
469 |
# pattern_str <- paste("mosaiced","_",name_method_var,"predicted",".*.",date_selected,".*.tif",sep="") |
|
470 |
# lf_pred_list <- list.files(pattern=pattern_str) |
|
471 |
# |
|
472 |
# for(i in 1:length(lf_pred_list)){ |
|
473 |
# |
|
474 |
# |
|
475 |
# r_pred <- raster(lf_pred_list[i]) |
|
476 |
# |
|
477 |
# res_pix <- 480 |
|
478 |
# col_mfrow <- 1 |
|
479 |
# row_mfrow <- 1 |
|
480 |
# |
|
481 |
# png(filename=paste("Figure4_models_predicted_surfaces_",model_name[i],"_",name_method_var,"_",data_selected,"_",out_suffix,".png",sep=""), |
|
482 |
# width=col_mfrow*res_pix,height=row_mfrow*res_pix) |
|
483 |
# |
|
484 |
# plot(r_pred) |
|
485 |
# title(paste("Mosaiced",model_name[i],name_method_var,date_selected,sep=" ")) |
|
486 |
# dev.off() |
|
487 |
# } |
|
488 |
# #Plot Delta and clim... |
|
489 |
# |
|
490 |
# ## plotting of delta and clim for later scripts... |
|
491 |
# |
|
492 |
# } |
|
462 |
for(i in 1:length(model_name)){ |
|
463 |
|
|
464 |
tb_subset <- subset(tb,pred_mod==model_name[i])#mod1 is i=1, mod_kr is last |
|
465 |
labels <- month.abb # abbreviated names for each month |
|
466 |
|
|
467 |
## Figure 4a |
|
468 |
fig_filename <- paste("Figure4a_boxplot_overall_accuracy_separated_by_month_with_outliers_",model_name[i],"_",out_suffix,".png",sep="") |
|
469 |
png(filename=fig_filename, |
|
470 |
width=col_mfrow*res_pix,height=row_mfrow*res_pix) |
|
493 | 471 |
|
472 |
boxplot(rmse~month_no,data=tb_subset,ylab=metric_name,xlab="averaged by month",axes=F)#,names=tb$pred_mod) |
|
473 |
axis(1, labels = FALSE) |
|
474 |
## Plot x axis labels at default tick marks |
|
475 |
text(1:length(labels), par("usr")[3] - 0.25, srt = 45, adj = 1,cex=0.8, |
|
476 |
labels = labels, xpd = TRUE) |
|
477 |
axis(2) |
|
478 |
box() |
|
479 |
title(paste("Overall accuracy for ", model_name[i], " by month for ",region_name,sep="")) |
|
480 |
|
|
481 |
#p<- bwplot(rmse~year_predicted | reg , data=tb_subset,ylim=c(0,5), |
|
482 |
#main="RMSE per model and region over all tiles") |
|
483 |
#print(p) |
|
484 |
dev.off() |
|
485 |
|
|
486 |
list_outfiles[[counter_fig+1]] <- fig_filename |
|
487 |
counter_fig <- counter_fig + 1 |
|
488 |
|
|
489 |
fig_filename <- paste("Figure4b_boxplot_overall_separated_by_month_scaling_",model_name[i],"_",out_suffix,".png",sep="") |
|
490 |
png(filename=fig_filename, |
|
491 |
width=col_mfrow*res_pix,height=row_mfrow*res_pix) |
|
494 | 492 |
|
493 |
boxplot(rmse~month_no,data=tb_subset,ylim=c(0,5),outline=FALSE,ylab=metric_name, |
|
494 |
xlab="averaged by month",axes=F)#,names=tb$pred_mod) |
|
495 |
axis(1, labels = FALSE) |
|
496 |
## Plot x axis labels at default tick marks |
|
497 |
text(1:length(labels), par("usr")[3] - 0.25, srt = 45, adj = 1,cex=0.8, |
|
498 |
labels = labels, xpd = TRUE) |
|
499 |
axis(2) |
|
500 |
box() |
|
501 |
|
|
502 |
title(paste("Overall accuracy for ", model_name[i], " by month for ",region_name,sep="")) |
|
503 |
#p<- bwplot(rmse~year_predicted | reg , data=tb_subset,ylim=c(0,5), |
|
504 |
#main="RMSE per model and region over all tiles") |
|
505 |
#print(p) |
|
506 |
dev.off() |
|
507 |
|
|
508 |
list_outfiles[[counter_fig+1]] <- fig_filename |
|
509 |
counter_fig <- counter_fig + 1 |
|
510 |
} |
|
511 |
#counter_fig <- counter_fig + length(model_name) |
|
512 |
r10 <-c("figure_4a","Boxplot overall accuracy by month with outliers","mod1",metric_name,region_name,year_predicted,list_outfiles[[10]]) |
|
513 |
r11 <-c("figure_4b","Boxplot overall accuracy by month with scaling","mod1",metric_name,region_name,year_predicted,list_outfiles[[11]]) |
|
514 |
r12 <-c("figure_4a","Boxplot overall accuracy by month with outliers","mod_kr",metric_name,region_name,year_predicted,list_outfiles[[12]]) |
|
515 |
r13 <-c("figure_4b","Boxplot overall accuracy by month with scaling","mod_kr",metric_name,region_name,year_predicted,list_outfiles[[13]]) |
|
516 |
|
|
495 | 517 |
###################### |
496 | 518 |
### Figure 5: plot accuracy ranked |
497 | 519 |
|
... | ... | |
519 | 541 |
title(paste("RMSE ranked by tile for ",model_name[i],sep="")) |
520 | 542 |
|
521 | 543 |
dev.off() |
522 |
list_outfiles[[counter_fig+i]] <- fig_filename |
|
544 |
list_outfiles[[counter_fig+1]] <- fig_filename |
|
545 |
counter_fig <- counter_fig + 1 |
|
523 | 546 |
} |
524 | 547 |
|
525 |
counter_fig <- counter_fig + length(model_name) |
|
548 |
#counter_fig <- counter_fig + length(model_name)
|
|
526 | 549 |
|
527 |
r10 <-c("figure_5","Barplot of accuracy metrics ranked by tiles","mod1",metric_name,region_name,year_predicted,list_outfiles[[8]])
|
|
528 |
r11 <-c("figure_5","Barplot of accuracy metrics ranked by tiles","mod_kr",metric_name,region_name,year_predicted,list_outfiles[[9]])
|
|
550 |
r14 <-c("figure_5","Barplot of accuracy metrics ranked by tiles","mod1",metric_name,region_name,year_predicted,list_outfiles[[14]])
|
|
551 |
r15 <-c("figure_5","Barplot of accuracy metrics ranked by tiles","mod_kr",metric_name,region_name,year_predicted,list_outfiles[[15]])
|
|
529 | 552 |
|
530 | 553 |
###################### |
531 | 554 |
### Figure 6: plot map of average RMSE per tile at centroids |
... | ... | |
571 | 594 |
} |
572 | 595 |
counter_fig <- counter_fig+length(model_name) |
573 | 596 |
|
574 |
r12 <-c("figure_6","Average accuracy metrics map at centroids","mod1",metric_name,region_name,year_predicted,list_outfiles[[8]])
|
|
575 |
r13 <-c("figure_6","Average accuracy metrics map at centroids","mod_kr",metric_name,region_name,year_predicted,list_outfiles[[9]])
|
|
597 |
r16 <-c("figure_6","Average accuracy metrics map at centroids","mod1",metric_name,region_name,year_predicted,list_outfiles[[16]])
|
|
598 |
r17 <-c("figure_6","Average accuracy metrics map at centroids","mod_kr",metric_name,region_name,year_predicted,list_outfiles[[17]])
|
|
576 | 599 |
|
577 | 600 |
|
578 | 601 |
###################### |
... | ... | |
594 | 617 |
nb<-nrow(subset(summary_metrics_v,model_name=="mod1")) |
595 | 618 |
sum(subset(summary_metrics_v,model_name=="mod1")$n_missing)/nb #33/35 |
596 | 619 |
|
597 |
## Make this a figure... |
|
598 |
|
|
599 |
#plot(summary_metrics_v) |
|
600 |
#Make this a function later so that we can explore many thresholds... |
|
601 |
#Problem here |
|
602 |
#Browse[3]> c |
|
603 |
#Error in grid.Call.graphics(L_setviewport, pvp, TRUE) : |
|
604 |
#non-finite location and/or size for viewport |
|
605 | 620 |
|
606 | 621 |
j<-1 #for model name 1,mod1 |
607 | 622 |
for(i in 1:length(threshold_missing_day)){ |
... | ... | |
613 | 628 |
|
614 | 629 |
fig_filename <- paste("Figure7a_ac_metrics_map_centroids_tile_",model_name[j],"_","missing_day_",threshold_missing_day[i], |
615 | 630 |
"_",out_suffix,".png",sep="") |
631 |
list_outfiles[[counter_fig+i]] <- fig_filename |
|
616 | 632 |
|
617 | 633 |
if(sum(summary_metrics_v_subset$n_missing) > 0){#then there are centroids to plot!!! |
618 | 634 |
|
... | ... | |
638 | 654 |
|
639 | 655 |
} |
640 | 656 |
|
641 |
list_outfiles[[counter_fig+i]] <- fig_filename |
|
657 |
#list_outfiles[[counter_fig+i]] <- fig_filename
|
|
642 | 658 |
} |
643 | 659 |
counter_fig <- counter_fig+length(threshold_missing_day) #currently 4 days... |
644 | 660 |
|
645 |
r14 <-c("figure_7","Number of missing days threshold1 map at centroids","mod1",metric_name,region_name,year_predicted,list_outfiles[[8]])
|
|
646 |
r15 <-c("figure_7","Number of missing days threshold2 map at centroids","mod1",metric_name,region_name,year_predicted,list_outfiles[[9]])
|
|
647 |
r16 <-c("figure_7","Number of missing days threshold3 map at centroids","mod1",metric_name,region_name,year_predicted,list_outfiles[[8]])
|
|
648 |
r17 <-c("figure_7","Number of missing days threshold4 map at centroids","mod1",metric_name,region_name,year_predicted,list_outfiles[[9]])
|
|
661 |
r18 <-c("figure_7","Number of missing days threshold1 map at centroids","mod1",metric_name,region_name,year_predicted,list_outfiles[[18]])
|
|
662 |
r19 <-c("figure_7","Number of missing days threshold2 map at centroids","mod1",metric_name,region_name,year_predicted,list_outfiles[[19]])
|
|
663 |
r20 <-c("figure_7","Number of missing days threshold3 map at centroids","mod1",metric_name,region_name,year_predicted,list_outfiles[[20]])
|
|
664 |
r21 <-c("figure_7","Number of missing days threshold4 map at centroids","mod1",metric_name,region_name,year_predicted,list_outfiles[[21]])
|
|
649 | 665 |
|
650 | 666 |
### Potential |
651 | 667 |
png(filename=paste("Figure7b_number_daily_predictions_per_models","_",out_suffix,".png",sep=""), |
... | ... | |
657 | 673 |
|
658 | 674 |
list_outfiles[[counter_fig+1]] <- paste("Figure7b_number_daily_predictions_per_models","_",out_suffix,".png",sep="") |
659 | 675 |
counter_fig <- counter_fig + 1 |
660 |
r18 <-c("figure_7b","Number of daily predictions per_models","mod1",metric_name,region_name,year_predicted,list_outfiles[[9]])
|
|
676 |
r22 <-c("figure_7b","Number of daily predictions per_models","mod1",metric_name,region_name,year_predicted,list_outfiles[[22]])
|
|
661 | 677 |
|
662 | 678 |
table(tb$pred_mod) |
663 | 679 |
table(tb$index_d) |
... | ... | |
685 | 701 |
|
686 | 702 |
list_outfiles[[counter_fig+1]] <- paste("Figure7c_histogram_number_daily_predictions_per_models","_",out_suffix,".png",sep="") |
687 | 703 |
counter_fig <- counter_fig + 1 |
688 |
r19 <-c("figure_7c","Histogram number daily predictions per models","mod1",metric_name,region_name,year_predicted,list_outfiles[[9]])
|
|
704 |
r23 <-c("figure_7c","Histogram number daily predictions per models","mod1",metric_name,region_name,year_predicted,list_outfiles[[23]])
|
|
689 | 705 |
|
690 |
|
|
691 | 706 |
#table(tb) |
692 | 707 |
## Figure 7b |
693 | 708 |
#png(filename=paste("Figure7b_number_daily_predictions_per_models","_",out_suffix,".png",sep=""), |
... | ... | |
743 | 758 |
counter_fig <- counter_fig + 1 |
744 | 759 |
|
745 | 760 |
|
746 |
r20 <-c("figure 8a","Boxplot overall accuracy by model separated by region with outliers",NA,metric_name,region_name,year_predicted,list_outfiles[[20]])
|
|
747 |
r21 <-c("figure 8b","Boxplot overall accuracy by model separated by region with scaling",NA,metric_name,region_name,year_predicted,list_outfiles[[21]])
|
|
761 |
r24 <-c("figure 8a","Boxplot overall accuracy by model separated by region with outliers",NA,metric_name,region_name,year_predicted,list_outfiles[[24]])
|
|
762 |
r25 <-c("figure 8b","Boxplot overall accuracy by model separated by region with scaling",NA,metric_name,region_name,year_predicted,list_outfiles[[25]])
|
|
748 | 763 |
|
749 | 764 |
####### |
750 | 765 |
##Second, plot for each model separately |
... | ... | |
787 | 802 |
|
788 | 803 |
} |
789 | 804 |
|
790 |
r22 <-c("figure 8c","Boxplot overall accuracy separated by region with outliers","mod1",metric_name,region_name,year_predicted,list_outfiles[[22]])
|
|
791 |
r23 <-c("figure 8d","Boxplot overall accuracy separated by region with scaling","mod1",metric_name,region_name,year_predicted,list_outfiles[[23]])
|
|
792 |
r24 <-c("figure 8c","Boxplot overall accuracy separated by region with outliers","mod_kr",metric_name,region_name,year_predicted,list_outfiles[[24]])
|
|
793 |
r25 <-c("figure 8d","Boxplot overall accuracy separated by region with scaling","mod_kr",metric_name,region_name,year_predicted,list_outfiles[[25]])
|
|
805 |
r26 <-c("figure 8c","Boxplot overall accuracy separated by region with outliers","mod1",metric_name,region_name,year_predicted,list_outfiles[[26]])
|
|
806 |
r27 <-c("figure 8d","Boxplot overall accuracy separated by region with scaling","mod1",metric_name,region_name,year_predicted,list_outfiles[[27]])
|
|
807 |
r28 <-c("figure 8c","Boxplot overall accuracy separated by region with outliers","mod_kr",metric_name,region_name,year_predicted,list_outfiles[[28]])
|
|
808 |
r29 <-c("figure 8d","Boxplot overall accuracy separated by region with scaling","mod_kr",metric_name,region_name,year_predicted,list_outfiles[[29]])
|
|
794 | 809 |
|
795 | 810 |
##################################################### |
796 | 811 |
#### Figure 9: plotting boxplot by year and regions ########### |
... | ... | |
799 | 814 |
res_pix <- 480 |
800 | 815 |
col_mfrow <- 1 |
801 | 816 |
row_mfrow <- 1 |
802 |
|
|
803 |
png(filename=paste("Figure9a_boxplot_overall_separated_by_year_and_model_with_oultiers_",out_suffix,".png",sep=""),
|
|
817 |
fig_filename <- paste("Figure9a_boxplot_overall_separated_by_year_and_model_with_oultiers_",out_suffix,".png",sep="") |
|
818 |
png(filename= fig_filename,
|
|
804 | 819 |
width=col_mfrow*res_pix,height=row_mfrow*res_pix) |
805 | 820 |
#This will need to be changed, the layout is difficult at this stage |
806 | 821 |
#p<- bwplot(rmse~pred_mod + reg + year_predicted, data=tb, |
... | ... | |
809 | 824 |
main="RMSE per model and region over all tiles") |
810 | 825 |
print(p) |
811 | 826 |
dev.off() |
812 |
|
|
827 |
list_outfiles[[counter_fig+1]] <- fig_filename |
|
828 |
counter_fig <- counter_fig + 1 |
|
829 |
|
|
813 | 830 |
## Figure 9b |
814 |
png(filename=paste("Figure9b_boxplot_overall_separated_by_year_and_model_scaling_",out_suffix,".png",sep=""), |
|
831 |
fig_filename <- paste("Figure9b_boxplot_overall_separated_by_year_and_model_scaling_",out_suffix,".png",sep="") |
|
832 |
png(filename= fig_filename, |
|
815 | 833 |
width=col_mfrow*res_pix,height=row_mfrow*res_pix) |
816 | 834 |
|
817 | 835 |
#boxplot(rmse~pred_mod,data=tb,ylim=c(0,5),outline=FALSE)#,names=tb$pred_mod) |
... | ... | |
820 | 838 |
main="RMSE per model and region over all tiles") |
821 | 839 |
print(p) |
822 | 840 |
dev.off() |
841 |
list_outfiles[[counter_fig+1]] <- fig_filename |
|
842 |
counter_fig <- counter_fig + 1 |
|
823 | 843 |
|
824 | 844 |
for(i in 1:length(model_name)){ |
825 | 845 |
|
... | ... | |
855 | 875 |
counter_fig <- counter_fig + 1 |
856 | 876 |
} |
857 | 877 |
|
858 |
r26 <-c("figure 9a","Boxplot overall accuracy separated_by year and model with oultiers",NA,metric_name,region_name,year_predicted,list_outfiles[[22]])
|
|
859 |
r27 <-c("figure 9b","Boxplot overall accuracy separated_by year and model with scaling",NA,metric_name,region_name,year_predicted,list_outfiles[[23]])
|
|
860 |
r28 <-c("figure 9c","Boxplot overall accuracy separated by year with outliers","mod1",metric_name,region_name,year_predicted,list_outfiles[[24]])
|
|
861 |
r29 <-c("figure 9d","Boxplot overall accuracy separated by year with scaling","mod_kr",metric_name,region_name,year_predicted,list_outfiles[[25]])
|
|
862 |
r30 <-c("figure 9c","Boxplot overall accuracy separated by year with outliers","mod1",metric_name,region_name,year_predicted,list_outfiles[[24]])
|
|
863 |
r31 <-c("figure 9d","Boxplot overall accuracy separated by year with scaling","mod_kr",metric_name,region_name,year_predicted,list_outfiles[[25]])
|
|
878 |
r30 <-c("figure 9a","Boxplot overall accuracy separated_by year and model with oultiers",NA,metric_name,region_name,year_predicted,list_outfiles[[30]])
|
|
879 |
r31 <-c("figure 9b","Boxplot overall accuracy separated_by year and model with scaling",NA,metric_name,region_name,year_predicted,list_outfiles[[31]])
|
|
880 |
r32 <-c("figure 9c","Boxplot overall accuracy separated by year with outliers","mod1",metric_name,region_name,year_predicted,list_outfiles[[32]])
|
|
881 |
r33 <-c("figure 9d","Boxplot overall accuracy separated by year with scaling","mod_kr",metric_name,region_name,year_predicted,list_outfiles[[33]])
|
|
882 |
r34 <-c("figure 9c","Boxplot overall accuracy separated by year with outliers","mod1",metric_name,region_name,year_predicted,list_outfiles[[34]])
|
|
883 |
r35 <-c("figure 9d","Boxplot overall accuracy separated by year with scaling","mod_kr",metric_name,region_name,year_predicted,list_outfiles[[35]])
|
|
864 | 884 |
|
865 | 885 |
############################################################## |
866 | 886 |
############## Prepare object to return |
... | ... | |
869 | 889 |
# This is hard coded and can be improved later on for flexibility. It works for now... |
870 | 890 |
#This data.frame contains all the files from the assessment |
871 | 891 |
|
872 |
#Should have this at the location of the figures!!! will be done later? |
|
873 |
#r1 <-c("figure_1","Tiles processed for the region",NA,NA,region_name,year_predicted,list_outfiles[[1]]) |
|
874 |
#r2 <-c("figure_2a","Boxplot of accuracy with outliers by tiles","mod1",metric_name,region_name,year_predicted,list_outfiles[[2]]) |
|
875 |
#r3 <-c("figure_2a","boxplot of accuracy with outliers by tiles","mod_kr",metric_name,region_name,year_predicted,list_outfiles[[3]]) |
|
876 |
#r4 <-c("figure_2b","Boxplot of accuracy with scaling by tiles","mod1",metric_name,region_name,year_predicted,list_outfiles[[4]]) |
|
877 |
#r5 <-c("figure_2b","Boxplot of accuracy with scaling by tiles","mod_kr",metric_name,region_name,year_predicted,list_outfiles[[5]]) |
|
878 |
#r6 <-c("figure_3a","Boxplot overall accuracy with outliers","mod1",metric_name,region_name,year_predicted,list_outfiles[[6]]) |
|
879 |
#r7 <-c("figure_3b","Boxplot overall accuracy with scaling","mod1",metric_name,region_name,year_predicted,list_outfiles[[7]]) |
|
880 |
#r8 <-c("figure_3a","Boxplot overall accuracy with outliers","mod_kr",metric_name,region_name,year_predicted,list_outfiles[[8]]) |
|
881 |
#r9 <-c("figure_3b","Boxplot overall accuracy with scaling","mod_kr",metric_name,region_name,year_predicted,list_outfiles[[9]]) |
|
882 |
#r10 <-c("figure_5","Barplot of accuracy metrics ranked by tiles","mod1",metric_name,region_name,year_predicted,list_outfiles[[10]]) |
|
883 |
#r11 <-c("figure_5","Barplot of accuracy metrics ranked by tiles","mod_kr",metric_name,region_name,year_predicted,list_outfiles[[11]]) |
|
884 |
#r12 <-c("figure_6","Average accuracy metrics map at centroids","mod1",metric_name,region_name,year_predicted,list_outfiles[[12]]) |
|
885 |
#r13 <-c("figure_6","Average accuracy metrics map at centroids","mod_kr",metric_name,region_name,year_predicted,list_outfiles[[13]]) |
|
886 |
#r14 <-c("figure_7","Number of missing days threshold1 map at centroids","mod1",metric_name,region_name,year_predicted,list_outfiles[[14]]) |
|
887 |
#r15 <-c("figure_7","Number of missing days threshold2 map at centroids","mod1",metric_name,region_name,year_predicted,list_outfiles[[15]]) |
|
888 |
#r16 <-c("figure_7","Number of missing days threshold3 map at centroids","mod1",metric_name,region_name,year_predicted,list_outfiles[[16]]) |
|
889 |
#r17 <-c("figure_7","Number of missing days threshold4 map at centroids","mod1",metric_name,region_name,year_predicted,list_outfiles[[17]]) |
|
890 |
#r18 <-c("figure_7b","Number of daily predictions per_models","mod1",metric_name,region_name,year_predicted,list_outfiles[[18]]) |
|
891 |
#r19 <-c("figure_7c","Histogram number daily predictions per models","mod1",metric_name,region_name,year_predicted,list_outfiles[[19]]) |
|
892 |
#r20 <-c("figure 8a","Boxplot overall accuracy by model separated by region with outliers",NA,metric_name,region_name,year_predicted,list_outfiles[[20]]) |
|
893 |
#r21 <-c("figure 8b","Boxplot overall accuracy by model separated by region with scaling",NA,metric_name,region_name,year_predicted,list_outfiles[[21]]) |
|
894 |
#r22 <-c("figure 8c","Boxplot overall accuracy separated by region with outliers","mod1",metric_name,region_name,year_predicted,list_outfiles[[22]]) |
|
895 |
#r23 <-c("figure 8d","Boxplot overall accuracy separated by region with scaling","mod1",metric_name,region_name,year_predicted,list_outfiles[[23]]) |
|
896 |
#r24 <-c("figure 8c","Boxplot overall accuracy separated by region with outliers","mod_kr",metric_name,region_name,year_predicted,list_outfiles[[24]]) |
|
897 |
#r25 <-c("figure 8d","Boxplot overall accuracy separated by region with scaling","mod_kr",metric_name,region_name,year_predicted,list_outfiles[[25]]) |
|
898 |
|
|
899 | 892 |
#Assemble all the figures description and information in a data.frame for later use |
900 | 893 |
list_rows <-list(r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13,r14,r15,r16,r17,r18,r19,r20,r21,r22,r23,r24, |
901 |
r25,r26,r27,r28,r29,r30,r31) |
|
894 |
r25,r26,r27,r28,r29,r30,r31,r32,r33,r34,r35)
|
|
902 | 895 |
df_assessment_figures_files <- as.data.frame(do.call(rbind,list_rows)) |
903 | 896 |
names(df_assessment_figures_files) <- c("figure_no","comment","model_name","reg","metric_name","year_predicted","filename") |
904 | 897 |
|
... | ... | |
912 | 905 |
###################################################### |
913 | 906 |
##### Prepare objet to return #### |
914 | 907 |
|
915 |
assessment_obj <- list(df_assessment_files, df_assessment_figures_files) |
|
908 |
assessment_obj <- list(list_df_assessment_files, df_assessment_figures_files)
|
|
916 | 909 |
names(assessment_obj) <- c("df_assessment_files", "df_assessment_figures_files") |
917 | 910 |
## Prepare list of files to return... |
918 | 911 |
return(assessment_obj) |
Also available in: Unified diff
assessment part3, solving figures count and clean up