Skip to contents

Plot time-series intra-annual variability (highcharts)

Usage

plot_profile(
  data,
  unit = NA,
  polar = FALSE,
  unit.threshold = 10,
  subtitle = NULL,
  ...
)

Arguments

data

data.table to plot with columns date and value (will use date_start if date is missing)

unit

display unit

polar

use polar (circular) axis

unit.threshold

maximum threshold to convert from km³ to MCM unit (default: 10 km³)

subtitle

chart subtitle

...

Arguments passed on to hc_themed

hc

a highchart object

title

chart title

label

optional annotation

base_font

default font for all chart elements

axes

show axes (default: TRUE)

exporting

include chart export menu (default: TRUE)

credits

include credits (default: FALSE)

Value

highcharter object

Examples

dt <- DATA[iso3=="ken" & id=="rainfall" & period=="month"]
plot_profile(dt, unit="km³")
plot_profile(dt, unit="km³", polar=TRUE)