Skip to content

Instantly share code, notes, and snippets.

@namelessjon
Last active May 27, 2018 11:46
Show Gist options
  • Save namelessjon/e3ae8482d12e2b5720e1556f260bfc02 to your computer and use it in GitHub Desktop.
Save namelessjon/e3ae8482d12e2b5720e1556f260bfc02 to your computer and use it in GitHub Desktop.
Code to plot temperature sensor data
library(readr)
library(dplyr)
library(ggplot2)
read_tsv("http://192.168.1.204:8000/temp.log",
col_names = c("Time", "Temp", "Temp (Smooth)"),
col_types = cols(.default = col_double(), Time = col_datetime())) %>%
filter(Time >= "2018-05-27") %>%
ggplot(aes(x = Time, y = `Temp (Smooth)`, colour = 'Smooth')) +
geom_line(aes(y = Temp, colour = 'Raw')) +
geom_line() +
expand_limits(y = c(10, 25)) +
theme_bw() +
scale_y_continuous(minor_breaks = seq(-10,30, by = 1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment