Skip to content

Probabilistic visualization

miturbide edited this page Nov 22, 2017 · 5 revisions

Tercile based probability map

Function tercileMap stratifies probabilities according to terciles, to return a map showing the areas which have an increased probability (exceeding 40%) of being either below the lower tercile or above the upper tercile.

tercileMap is a wrapper for the lattice (trellis) plot methods for spatial data in sp::spplot and spatialPlot::visualizeR. Therefore, many different aspects of the map can be controlled passing the relevant arguments to spplot and/or spatialPlot. Fine control of graphical parameters for the trellis display can be also controlled using trellis.par.set from package lattice.

In this case, we use a simple example centered in the Iberian peninsula using R data objects provided by package transformeR. Here we use 9 members of CFSv2 seasonal predictions for winter temperature, considering the period 1983-2001 as the hindcast and year 2002 as the forecast.

library(transformeR)
data(CFS_Iberia_tas)
str(CFS_Iberia_tas)
hindcast <- subsetGrid(CFS_Iberia_tas, years = 1983:2001)
forecast <- subsetGrid(CFS_Iberia_tas, years = 2002)
tercileMap(hindcast, forecast)

Next, the operation is repeated, but using additional spatialPlot and lattice parameters:

tercileMap(hindcast, forecast, backdrop.theme = "countries", 
                main = list("CFS temperature 2002", cex = 0.8))