Search code examples
ropenair

Customized WindRose


I am new in Rstudio. I am using library(openair) to plot a seasonal WindRose. I would like to know how I can change from English to spanish when I plot it and also how to set the season.

I mean, summer should be DJF and in the image it is JJA. Somebody could teach me how to change it.

enter image description here


Solution

  • I don't know how to change the labels to another language directly in an openair function. But you can do the following:

    Classify the data according to the season of the southern hemisphere:

    library(openair)
    newdata <- cutData(mydata, type = "season", hemisphere = "southern")
    

    Change labels manually:

    levels(newdata$season) <- c("primavera (SON)", "verano (DEF)", "otoño (MAM)", "invierno (JJA)")
    

    And, to graph.

    windRose(newdata, type = "season", paddle = F, key.position = "right")
    

    enter image description here