R: Customizing seasons for windRose plot in Openair

592 views Asked by At

I am trying to plot a wind rose plot of a site using openair package in R. The code snippet is:

windRose(df, type = "season", paddle = F, key.position = "right") and the plot is: enter image description here

We know, this package openair considers seasons DJF as winter, MAM as spring and so on. However, in this region another categorization for seasons is commonly used as follows:

  • winter: Dec Jan Feb
  • Pre-monsoon: Mar Apr May Jun15 (i.e. till 15th of June)
  • Monsoon: 15Jun Jul Aug Sep (i.e. from 15th of June)
  • Post-monsoon: Oct Nov.

I am new in R, hence finding difficulty to plot the wind rose with the later categorization and putting the titles accordingly. I would highly appreciate any help.

Thanks!

1

There are 1 answers

2
AudioBubble On

Function windRose has an argument "type" which accepts a custom character or factor vector to facet (and label) the plot by.

  1. add a column for your custom season, e.g. "my_custom_season"
  2. make this column contain the corresponding season for each row ("winter", "pre-monsoon" etc.)
  3. call windRose(your_data,...,type="my_custom_season")