Control Concentration Levels in Windrose

Hello Everyone.

Does anyone know how to control the concentration levels in the windrose?

windRose(mydata, type = "pm10", layout = c(4, 1))

This example, PM10, has the following levels in each figure:
1-22
22-31
31-44
44-801

Is there any way to control these levels?

Best,
Steve

the documentation explains

type
type determines how the data are split i.e. conditioned, and then plotted. The default is will produce a single plot using the entire data. Type can be one of the built-in types as detailed in cutData e.g. “season”, “year”, “weekday” and so on. For example, type = "season" will produce four plots — one for each season.

It is also possible to choose type as another variable in the data frame. If that variable is numeric, then the data will be split into four quantiles (if possible) and labelled accordingly. If type is an existing character or factor variable, then those categories/levels will be used directly. This offers great flexibility for understanding the variation of different variables and how they depend on one another.

^^^ what you are doing

Type can be up length two e.g. type = c("season", "weekday") will produce a 2x2 plot split by season and day of the week. Note, when two types are provided the first forms the columns and the second the rows.

example:

mydata2 <- dplyr::mutate(mydata,
                         pm10x = factor(
                           dplyr::case_when(pm10 < 8 ~ "LT 8",
                                     pm10 <100 ~ "GE8 LT100",
                                     TRUE ~ "GE100"),
                               levels = c("LT 8",
                                      "GE8 LT100",
                                     "GE100")))
windRose(mydata2, type =  "pm10x", layout = c(4, 1))

Thank you for sharing this code. Works great!