changed 3 day graph to last week graph
Signed-off-by: Ben Varick <ben@dendroalsia.net>
6
ecobee.R
@ -172,11 +172,11 @@ ggsave(filename = "temp_time_all.png" ,
|
|||||||
units = "in")
|
units = "in")
|
||||||
|
|
||||||
ggplot() +
|
ggplot() +
|
||||||
geom_line(data = ecobee %>% filter(date > Sys.Date() - 3) %>% pivot_longer(cols = c(zoneAveTemp, outdoorTemp, zoneHeatTemp, zoneCoolTemp), names_to = "temp_type", values_to = "temp"),
|
geom_line(data = ecobee %>% filter(date > Sys.Date() - 7) %>% pivot_longer(cols = c(zoneAveTemp, outdoorTemp, zoneHeatTemp, zoneCoolTemp), names_to = "temp_type", values_to = "temp"),
|
||||||
aes(x = dateTime,
|
aes(x = dateTime,
|
||||||
y = temp,
|
y = temp,
|
||||||
color = temp_type))+
|
color = temp_type))+
|
||||||
geom_rect(data = ecobee %>% filter(date > Sys.Date() - 3) %>% pivot_longer(cols = c(compHeat1, auxHeat1, compCool1), names_to = "equipment", values_to = "active_sec") %>% filter(active_sec > 0),
|
geom_rect(data = ecobee %>% filter(date > Sys.Date() - 7) %>% pivot_longer(cols = c(compHeat1, auxHeat1, compCool1), names_to = "equipment", values_to = "active_sec") %>% filter(active_sec > 0),
|
||||||
aes(xmin = dateTime,
|
aes(xmin = dateTime,
|
||||||
xmax = dateTime + active_sec,
|
xmax = dateTime + active_sec,
|
||||||
ymin = equipment_y + equipment_types[match(equipment, equipment_types$column), 4],
|
ymin = equipment_y + equipment_types[match(equipment, equipment_types$column), 4],
|
||||||
@ -187,7 +187,7 @@ ggplot() +
|
|||||||
theme(legend.title = element_blank()) +
|
theme(legend.title = element_blank()) +
|
||||||
labs(x = 'Date',
|
labs(x = 'Date',
|
||||||
y = 'Temperature (\u00B0F)')
|
y = 'Temperature (\u00B0F)')
|
||||||
ggsave(filename = "temp_time_last_3_days.png" ,
|
ggsave(filename = "temp_time_last_week.png" ,
|
||||||
path = paste(getwd(),"/figures/", sep = ""),
|
path = paste(getwd(),"/figures/", sep = ""),
|
||||||
device = "png",
|
device = "png",
|
||||||
width = 11,
|
width = 11,
|
||||||
|
Before Width: | Height: | Size: 255 KiB After Width: | Height: | Size: 258 KiB |
Before Width: | Height: | Size: 247 KiB After Width: | Height: | Size: 248 KiB |
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 98 KiB |
Before Width: | Height: | Size: 233 KiB After Width: | Height: | Size: 227 KiB |
Before Width: | Height: | Size: 325 KiB After Width: | Height: | Size: 323 KiB |
Before Width: | Height: | Size: 359 KiB After Width: | Height: | Size: 367 KiB |
Before Width: | Height: | Size: 177 KiB After Width: | Height: | Size: 190 KiB |
BIN
figures/temp_time_last_week.png
Normal file
After Width: | Height: | Size: 251 KiB |