knitr::opts_chunk$set(echo = TRUE)
library(tidyverse) library(readxl) library(here) library(janitor) library(lubridate)
nswgov <- read_csv(here::here("data", "nswgov_daily.csv")) %>% clean_names()
nswgov$date <- dmy(nswgov$date) glimpse(nswgov)
nswgov_long <- nswgov %>% select(1:27) %>% pivot_longer(names_to = "site", values_to = "aqi", 2:27)
nswgov_long %>% ggplot(aes(x = date, y = aqi, colour = site)) + geom_point() + theme(legend.position = "none")
nswgov_long %>% filter(date > "2018-12-31") %>% ggplot(aes(x = date, y = aqi, colour = site)) + geom_point() + theme(legend.position = "none")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.