Skip to contents

Plot yearly ECC time-series (highcharts)

Usage

plot_ecc(
  data,
  title = "Historical Claim Costs across Perils",
  subtitle = "As percent of limit, 2001-2019 average ECC",
  ...
)

Arguments

data

output of wc_ecc

title

chart title

subtitle

chart subtitle

Examples

data <- data.table(
  year = rep(2001:2020, each=5),
  ecc = sample(1:100/100, 5*20, replace=T),
  ecc_dr = sample(1:100/100, 5*20, replace=T),
  ecc_xs = sample(1:100/100, 5*20, replace=T),
  ecc_tp = sample(1:100/100, 5*20, replace=T),
  weight = sample(1:100/100, 5*20, replace=T)
  )
#> Error in data.table(year = rep(2001:2020, each = 5), ecc = sample(1:100/100,     5 * 20, replace = T), ecc_dr = sample(1:100/100, 5 * 20,     replace = T), ecc_xs = sample(1:100/100, 5 * 20, replace = T),     ecc_tp = sample(1:100/100, 5 * 20, replace = T), weight = sample(1:100/100,         5 * 20, replace = T)): could not find function "data.table"
plot_ecc(data)
#> Error in `:=`(year, as.character(year)): Check that is.data.table(DT) == TRUE. Otherwise, := and `:=`(...) are defined for use in j, once only and in particular ways. See help(":=").