library(RODBC)
library(dygraphs)
library(xts)
library(ggplot2)
library(plotly)

dygraph - with highlight

dygraph(res_Wide[,1:50]) %>%
  dyHighlight(highlightCircleSize = 5, 
              highlightSeriesBackgroundAlpha = 0.2,
              hideOnMouseOut = FALSE)


ggplotly - autoplot timeSeries

autoplot(res_Wide[,c("26074","26032","26056","25945")], facets = Series ~ .) 

ggplotly()

ggplot, Stacked bar chart - Weeky Sensors status

head(Weekly_Status)
##   Week variable value
## 1    1     Good    18
## 2    2     Good   102
## 3    3     Good   334
## 4    4     Good   472
## 5    5     Good   491
## 6    6     Good   482
p<- ggplot(data=Weekly_Status, aes(x=Week, y=value, fill=variable)) +
  geom_bar(stat="identity")  + 
  scale_fill_manual(values=c("#1a9850", "#a6d96a", "#abd9e9", "#d73027"))+
  labs(y = "Sensors Count")

ggplotly(p)

ggplot, Stacked bar chart - Daily Sensors issues

head(Daily_Issues[,2:4] )
##   Day  variable value
## 1   1 Setup_cnt    19
## 2   2 Setup_cnt     4
## 3   3 Setup_cnt    16
## 4   4 Setup_cnt    14
## 5   5 Setup_cnt     5
## 6   6 Setup_cnt     4
p<- ggplot(data=Daily_Issues, aes(x=Day, y=value, fill=variable)) +
  geom_bar(stat="identity")  + 
  scale_fill_manual(values=c( "#abd9e9", "#fdae61", "#4575b4"))+
  labs(y = "Sensors Count", x="Day of season")

ggplotly(p)