changes, plot
This commit is contained in:
parent
810970cdf4
commit
6a013f14c5
@ -43,7 +43,7 @@ con <- dbConnect(RPostgres::Postgres(),
|
|||||||
user='wn')
|
user='wn')
|
||||||
|
|
||||||
|
|
||||||
START <- "2021-08-02 00:00:00"
|
START <- "2021-08-12 00:00:00"
|
||||||
INTERVAL <- 3600
|
INTERVAL <- 3600
|
||||||
|
|
||||||
freq_deviation_integrals <- data.frame()
|
freq_deviation_integrals <- data.frame()
|
||||||
@ -64,7 +64,7 @@ for (offset in 0:23) {
|
|||||||
freq_wide <- freq_wide %>%
|
freq_wide <- freq_wide %>%
|
||||||
rowwise() %>%
|
rowwise() %>%
|
||||||
mutate(!!colName.mean := mean(c_across(location_names[- colIdx]), na.rm=TRUE)) %>%
|
mutate(!!colName.mean := mean(c_across(location_names[- colIdx]), na.rm=TRUE)) %>%
|
||||||
mutate(!!colName.diff := abs(eval(as.name(colName.mean)) - eval(as.name(location_names[colIdx]))) * 100)
|
mutate(!!colName.diff := abs(eval(as.name(colName.mean)) - eval(as.name(location_names[colIdx]))))
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,4 +91,10 @@ for (colIdx in 1:length(location_names)) {
|
|||||||
|
|
||||||
dbDisconnect(con)
|
dbDisconnect(con)
|
||||||
|
|
||||||
|
x1 <- freq_deviation_integrals %>% select(c('endDate', starts_with('diff.'))) %>%
|
||||||
|
pivot_longer(cols = starts_with('diff.'), names_to = 'location', names_pattern = "diff.(.*)", values_to = 'coa2m')
|
||||||
|
|
||||||
|
p <- ggplot(x1, aes(x=endDate, y=coa2m, color=location)) +
|
||||||
|
geom_point() +
|
||||||
|
theme(axis.text.x = element_text(angle = 90))
|
||||||
|
print(p)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user