davidcarslaw / openair

Tools for air quality data analysis
https://davidcarslaw.github.io/openair/
GNU General Public License v2.0
305 stars 113 forks source link

Control `timeVariation()` lower panels #383

Open jack-davison opened 7 months ago

jack-davison commented 7 months ago

This PR adds the panels argument to timeVariation().

It allows users to control the order and presence of the lower three panels of the timeVariation() plot.

Notes:

devtools::load_all()
#> ℹ Loading openair

# default
timeVariation(mydata, "pm10")


# rejig the bottom panel
timeVariation(mydata, "pm10", panels = c("month", "day", "hour"))


# what if only one month of data is being used? looks crap
timeVariation(selectByDate(mydata, month = 1, year = 2000),
              "pm10",
              panels = c("month", "day", "hour"))


# get rid of the month panel
timeVariation(selectByDate(mydata, month = 1, year = 2000),
              "pm10",
              panels = c("day", "hour"))

Created on 2024-04-28 with reprex v2.0.2

jack-davison commented 6 months ago

Converted this to draft as I need to understand how the xlab argument works and interacts with this!