Taylor Diagram

Authors

[Editor] Hu Zheng;

[Contributors]

Note

Hiplot website

This page is the tutorial for source code version of the Hiplot Taylor Diagram plugin. You can also use the Hiplot website to achieve no code ploting. For more information please see the following link:

https://hiplot.cn/basic/taylor-diagram?lang=en

It can be used to display the standard deviation (SD), root mean square (RMS) error and correlation coefficient of the models simultaneously.

Setup

  • System Requirements: Cross-platform (Linux/MacOS/Windows)

  • Programming language: R

  • Dependent packages: openair

# Install packages
if (!requireNamespace("openair", quietly = TRUE)) {
  install.packages("openair")
}

# Load packages
library(openair)

Data Preparation

# Load data
dat <- selectByDate(mydata, year = 2003)

# convert data structure
dat <- data.frame(date = mydata$date, obs = mydata$nox, mod = mydata$nox)
dat <- transform(dat, month = as.numeric(format(date, "%m")))
mod1 <- transform(dat, mod = mod + 10 * month + 10 * month * rnorm(nrow(dat)),
model = "model 1")
mod1 <- transform(mod1, mod = c(mod[5:length(mod)], mod[(length(mod) - 3) :
length(mod)]))
mod2 <- transform(dat, mod = mod + 7 * month + 7 * month * rnorm(nrow(dat)),
model = "model 2")
mod3 <- transform(dat, mod = mod + 3 * month + 3 * month * rnorm(nrow(dat)),
model = "model 3")
mod.dat <- rbind(mod1, mod2, mod3)

# View data
head(mod.dat)
                 date obs      mod month   model
1 1998-01-01 00:00:00 285 488.4019     1 model 1
2 1998-01-01 01:00:00  NA 279.2397     1 model 1
3 1998-01-01 02:00:00  NA 173.3744     1 model 1
4 1998-01-01 03:00:00 493 196.6891     1 model 1
5 1998-01-01 04:00:00 468 156.5663     1 model 1
6 1998-01-01 05:00:00 264 142.7856     1 model 1

Visualization

# Taylor Diagram
TaylorDiagram(mod.dat, obs = "obs", mod = "mod", group = "model",
              main = "Taylor diagram", 
              cols = c("#00468BFF","#8e6097","#BFACF0FF"))
FigureΒ 1: Taylor Diagram