One bar per day, with the guideline of the World Health Organization for the average of a day as a dashed line, so the days above it stand out. The axis starts at 0 and always reaches above the guideline.
Arguments
- daily
Data frame from
get_daily().- variable
Name of the sensor, for the title and the hover labels.
- guideline
The guideline for the average of a day.
- mode
"light"or"dark", the mode of the app.
Examples
daily <- data.frame(date = as.Date("2026-10-01") + 0:29, value = 8 + 10 * abs(sin(1:30)), hours = 24)
plot_daily_means(daily, "PM2.5", 15)
url <- "http://pip1.crabdance.com:1507/api/v1/query_range"
plot_daily_means(get_daily(url, "PM25", days = 30), "PM2.5", 15)