Changes between Version 5 and Version 6 of udg/ecoms/RPackage/examples/visualization

Ignore:
Timestamp:
May 16, 2016 1:09:44 PM (6 years ago)
Comment:

--

Legend:

Unmodified
 v5 [[Image(image-20160513-160454.png)]] In order to compare the predictions against the observations, these need to be in the same reference grid. We use the interpolation capabilities of downscaleR to this aim: {{{#!text/R obsintp <- interpGrid(tx.obs, new.coordinates = getGrid(tx.forecast), method = "nearest") ## [2016-05-13 16:06:45] Calculating nearest neighbors... ## [2016-05-13 16:06:45] Performing nearest interpolation... may take a while ## [2016-05-13 16:06:45] Done ## Warning message: ## In interpGrid(tx.obs, new.coordinates = getGrid(tx.forecast), method = "nearest") : ##   The new longitudes are outside the data extent }}} We next show different forecast visualization plots: == Tercile plot Tercile plots are very useful in order to obtain a quick overview of the overall skill of the predictions over a region of interest. Tercile plots are very useful in order to obtain a quick overview of the overall skill of the predictions over a region of interest. First of all, we select a target year for which the predictions are to be analysed: {{{#!text/R year.target <- 1995 tercilePlotS4(prd, obs, year.target, detrend = TRUE, color.pal = "bw") ## Warning messages: == Bubble plots While the tercile plot provides an areal overview, to focus on particular regions bubble plots are very useful. First of all, we select a target year for which the predictions are to be analysed: While the tercile plot provides an areal overview, to focus on particular regions bubble plots are very useful. In order to compare the predictions against the observations for every grid point these need to be in the same reference grid. We use the interpolation capabilities of downscaleR to this aim: {{{#!text/R year.target <- 1995 obsintp <- interpGrid(tx.obs, new.coordinates = getGrid(tx.forecast), method = "nearest") ## [2016-05-13 16:06:45] Calculating nearest neighbors... ## [2016-05-13 16:06:45] Performing nearest interpolation... may take a while ## [2016-05-13 16:06:45] Done ## Warning message: ## In interpGrid(tx.obs, new.coordinates = getGrid(tx.forecast), method = "nearest") : ##   The new longitudes are outside the data extent }}} {{{#!text/R bubblePlotS4(prd, obs, year.target, detrend = FALSE, size.as.probability=TRUE, score = TRUE) }}} [[Image(image-20160516-124550.png)]] The bubble plot represents the most likely tercile in colors, the probability of that tercile with the size of the bubble (optional) and the skill of the forecast system for that tercile as transparency of the bubble (optional). Currently, the skill score used is the ROCSS. The color palete for the terciles (blue, grey, red) can be reversed (e.g for precipitation) using the color.reverse=TRUE option. Pie charts instead of bubbles can be drawn indicating the predicted likelihood of each tercile, as in this example (using the piechart=TRUE option). {{{#!text/R bubblePlotS4(prd, obs, The bubble plot represents the most likely tercile in colors, the probability of that tercile with the size of the bubble (optional) and the skill of the forecast system for that tercile as transparency of the bubble (optional). Currently, the skill score used is the ROCSS. Pie charts instead of bubbles can be drawn indicating the predicted likelihood of each tercile, as in this example (using the piechart=TRUE option). Using the bubble plot allows for instance to test the effect of data detrending, as we suggested in the previous example that may be the source of some -artificial- skill in the north-eastern sector of the study area. We control this through the logical argument detrend: bubblePlotS4(prd, obs, piechart = TRUE, year.target, detrend = TRUE, score = TRUE, color.reverse = TRUE) piechart = TRUE, score = TRUE ) }}}