Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug correction in the Mov-Around app #2

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
4 changes: 2 additions & 2 deletions R/5_plot_speed.R
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ plot_speed <- function(...){
}

chart <- ggplot(data_plot)+
aes(x=.data$count, y=.data$speed, color = .data$legend, group=.data$legend)+
aes(x=.data$count, y=.data$percentage, color = .data$legend, group=.data$legend)+
geom_line(color="black")+ geom_smooth(method='gam', formula=y ~ s(x, bs = "cs"))+
labs(x="Nombre de vehicules sur une tranche horaire", y = "Pourcentage de vehicule depassant la vitesse donnees")+
ggtitle("Evolution de la vitesse de conduite selon le nombre d'usagers") +
Expand All @@ -84,7 +84,7 @@ plot_speed <- function(...){
theme_bw()+
theme(panel.background = element_rect(fill = "#F5F5F5"), # background color
panel.grid = element_line(color = "#E3E3E3"), # grid color
panel.border = element_rect(color = "#E3E3E3", size = 2)) # border color and size
panel.border = element_rect(color = "#E3E3E3", linewidth = 2)) # border color and size

return(list(chart=chart,
DE_test = DE_test,
Expand Down
2 changes: 1 addition & 1 deletion R/5_plot_threshold.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ plot_threshold <- function(plot_speed, selected_speed, state_threshold, threshol
}

# to place the threshold text
mean_ord <- (100+min(plot_speed$data_plot$speed))/2
mean_ord <- 50

if (state_threshold == "auto") {
plot_speed$chart + geom_vline(xintercept = mean, color = "red", size = 1.5)+
Expand Down