This notebook compares the data all the nodes with with the meteorological data obtained from wow metoffice.
## Warning: package 'dplyr' was built under R version 3.5.3
## Warning: package 'ggplot2' was built under R version 3.5.3
## Warning: package 'stringr' was built under R version 3.5.3
nodes <- read.csv("AllStationsSuccessPercentage.data", header = TRUE)
nodes$date<- as.Date(nodes$date,tz="Europe/London")
wow_met <- readRDS("C:/Github/lorawan-analysis/data/wow_metoffice.Rds")
wow_day <- wow_met %>%
group_by(date=as.Date(time,tz="Europe/London")) %>%
summarise(rainfall=sum(Rainfall.Accumulation),
rh=mean(Relative.Humidity, na.rm=TRUE),
temperature=mean(Air.Temperature, na.rm=TRUE),
dew_point = mean(Dew.Point, na.rm=TRUE))
comp<-inner_join(nodes, wow_day, by = c("date", "date"))
p <- ggplot(data=comp, aes(x = rainfall, y = percentage, group = device, colour = device)) + geom_point() + ggtitle("Impact of rainfall on Percentage received - Daily")
ggplotly(p)
p <- ggplot(data=comp, aes(x = rh, y = percentage, group = device, colour = device)) + geom_point() + ggtitle("Impact of RH on Percentage received - Daily")
ggplotly(p)
p <- ggplot(data=comp, aes(x = temperature, y = percentage, group = device, colour = device)) + geom_point() + ggtitle("Impact of temperature on Percentage received - Daily")
ggplotly(p)
p <- ggplot(data=comp, aes(x = dew_point, y = percentage, group = device, colour = device)) + geom_point() + ggtitle("Impact of dew point on Percentage received - Daily")
ggplotly(p)
No pattern appearing with the different parameters.
##
## Call:
## lm(formula = percentage ~ temperature, data = filter(comp, grepl("nesta",
## device)))
##
## Residuals:
## Min 1Q Median 3Q Max
## -83.311 -10.133 5.181 14.412 39.953
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 44.9882 2.6661 16.87 <2e-16 ***
## temperature 2.0411 0.1885 10.83 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 21.49 on 627 degrees of freedom
## Multiple R-squared: 0.1576, Adjusted R-squared: 0.1563
## F-statistic: 117.3 on 1 and 627 DF, p-value: < 2.2e-16
summary(lm(percentage~ temperature + rh + dew_point + rainfall, data= filter(comp,grepl("nesta",device))))
##
## Call:
## lm(formula = percentage ~ temperature + rh + dew_point + rainfall,
## data = filter(comp, grepl("nesta", device)))
##
## Residuals:
## Min 1Q Median 3Q Max
## -85.290 -10.437 5.067 14.183 39.591
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 30.477596 78.720485 0.387 0.699
## temperature 3.099149 3.784190 0.819 0.413
## rh 0.150721 0.831375 0.181 0.856
## dew_point -1.269729 3.955305 -0.321 0.748
## rainfall 0.003381 0.005521 0.612 0.541
##
## Residual standard error: 21.51 on 624 degrees of freedom
## Multiple R-squared: 0.1595, Adjusted R-squared: 0.1541
## F-statistic: 29.61 on 4 and 624 DF, p-value: < 2.2e-16