Last active
March 15, 2023 11:38
-
-
Save kjhealy/877314bca843c80b2703d8577687e144 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
url <- "https://caphector.com/co2.csv" | |
df <- read_csv(url) |> | |
mutate(Time = paste0("2023/", Time), | |
Time = lubridate::as_datetime(Time)) | |
df |> | |
pivot_longer(`CO2 (SCD40)`:`Altitude (BME)`) |> | |
ggplot(mapping = aes(x = Time, | |
y = value, | |
color = name)) + | |
geom_line() + | |
facet_wrap(~ name, ncol = 1, | |
scales = "free_y") + | |
guides(color = "none") + | |
labs(title = "A Week of CO2", | |
subtitle = "Note that the y-axis of each panel is on its own scale", | |
y = "Value") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment