Skip to content
Snippets Groups Projects
Commit 5b1dcb80 authored by Berinda van Dijk's avatar Berinda van Dijk
Browse files

Removed figures (most of the timelines) and added a test figure. Modified other figures.

parent 64929888
Branches
No related tags found
1 merge request!5Removed figures (most of the timelines) and added a test figure. Modified other figures.
......@@ -69,40 +69,24 @@ doId <- function(id) {
tabel_Prs <- bovennul %>%
group_by(distance, stroke) %>%
filter(points == max(points, na.rm = TRUE))
filter(points == max(points, na.rm = TRUE)) %>%
filter(time == min(time, na.rm=TRUE))
tabel_LastEntrys<-zonder_split%>%
group_by(distance, stroke) %>%#Hier wil ik eigenlijk pooltype ook nog bij.
group_by(distance, stroke) %>%
filter(date == max(date, na.rm=TRUE))
tabel_LastEntrys2=tabel_LastEntrys[order(tabel_LastEntrys$date, decreasing = TRUE), ]
tijdlijn_LastEntrys <-ggplot(tabel_LastEntrys, aes(x=date,
y=interaction(distance, stroke, sep='m ', drop=TRUE),
group=poolType))+
geom_text(aes(label=date))+
labs(title="Tijdlijn laatst gezwommen (lange of korte afstand)", y='afstand, slag')
appendGraph(tijdlijn_LastEntrys)
tijdlijn_Prs <-ggplot(tabel_Prs, aes(x=date,
y=interaction(distance, stroke, sep='m ', drop=TRUE),
group=poolType))+
geom_text(aes(label=date))+
labs(title="Tijdlijn Prs (lange of korte afstand)", y='afstand, slag')
appendGraph(tijdlijn_Prs)
tijdlijn_test<-ggplot(zonder_split, aes(x=date, y=stroke, color=points, shape=poolType))+
tijdlijn_alles<-ggplot(zonder_split, aes(x=date, y=stroke, shape=poolType))+
geom_point()+
geom_point(data = . %>% group_by(stroke, distance, poolType) %>% summarise(date = max(date)),
color='orange', size=2, show.legend=FALSE)+
geom_point(data = tabel_Prs, color="green", alpha=0.7, size=2, show.legend=FALSE)+
labs(title="Datum van alle gezwommen slagen per afstand")+
facet_grid(vars(distance), scales='free_y', space='free_y')
appendGraph(tijdlijn_test)
facet_grid(vars(distance), scales='free_y')
appendGraph(tijdlijn_alles)
tijdlijn_test2<-ggplot(zonder_split, aes(x=date,
y=interaction(distance, stroke, sep='m ', drop=TRUE),
color=points,
shape=poolType))+
geom_point()+
labs(title="Datum van alle gezwommen slagen per afstand", y='afstand, slag')
appendGraph(tijdlijn_test2)
kleurentabel_prs <- ggplot(tabel_Prs, aes(distance, stroke)) +
geom_tile(aes(fill = points)) +
geom_text(aes(label = points)) +
......@@ -117,57 +101,78 @@ doId <- function(id) {
theme_bw()
appendGraph(kleurentabel_Lasts)
tabel_Prs <- bovennul %>%
group_by(distance, stroke, poolType) %>%
filter(points == max(points, na.rm = TRUE)) %>%
filter(time == min(time, na.rm=TRUE))
norm_barplot <- ggplot(tabel_Prs, aes(fill = distance, y = points, x = stroke)) +
geom_col(position = position_dodge2(preserve = "single")) +
labs(title = "Prs: Punten per afstand per slag", fill = "afstand")+
scale_fill_manual(values=kleurenset_afstanden, drop=TRUE)
scale_fill_manual(values=kleurenset_afstanden, limits=force)+
labs(title = "Prs: Punten per afstand per slag. Zowel lange - als kortebaan.")
appendGraph(norm_barplot)
norm_barplot_last <- ggplot(tabel_LastEntrys, aes(fill = distance, y = points, x = stroke, group=date)) +
tabel_LastEntrys<-zonder_split%>%
group_by(distance, stroke, poolType) %>%
filter(date == max(date, na.rm=TRUE))
norm_barplot_last <- ggplot(tabel_LastEntrys[tabel_LastEntrys$points!=0, ],
aes(fill = distance, y = points, x = stroke)) +
geom_col(position = position_dodge2(preserve = "single")) +
labs(title = "Laatste tijden: Punten >0 per afstand per slag", fill = "afstand")+
scale_fill_manual(values=kleurenset_afstanden, drop=TRUE)
scale_fill_manual(values=kleurenset_afstanden, drop=TRUE, limits=force)
appendGraph(norm_barplot_last)
stippenplot_perslag <- ggplot(zonder_split, aes(x=date, y=points, color=stroke, shape=poolType))+
stippenplot_perslag <- ggplot(zonder_split,
aes(x=date, y=points, color=stroke, shape=poolType))+
geom_point() +
scale_color_manual(values=kleurenset_strokes)+
labs(title = "Punten per datum per slag (punten>0)")
labs(title = "Punten per datum per slag")
appendGraph(stippenplot_perslag)
stippenplot_perafstand <- ggplot(zonder_split, aes(x=date, y=points, color=distance, shape=poolType))+
stippenplot_perafstand <- ggplot(zonder_split,
aes(x=date, y=points, color=distance, shape=poolType))+
geom_point() +
scale_color_manual(values=kleurenset_afstanden)+
labs(title = "Punten per datum per afstand")
appendGraph(stippenplot_perafstand)
stippenplot_alles<-ggplot(zonder_split, aes(x=date, y=points, color=stroke, size=distance, shape=poolType))+
stippenplot_alles<-ggplot(zonder_split[zonder_split$points>0,], aes(x=date, y=points, color=stroke, size=distance))+
geom_point() +
scale_color_manual(values=kleurenset_strokes)+
labs(title = "Punten per datum per afstand")
labs(title = "Punten >0 per datum per afstand")
appendGraph(stippenplot_alles)
lijnenplot_ineen <- ggplot(bovennul, aes(x = date,
y = points,
color = interaction(distance, stroke, sep='m ', drop=TRUE))) +
afstandEnslag=interaction(bovennul$distance, bovennul$stroke, sep='m ', drop=TRUE)
bovennul_50m=bovennul %>% filter(poolType=='50m')
lijnenplot_ineen <- ggplot(bovennul, aes(x = date, y = points, shape=poolType, color = afstandEnslag)) +
labs(title = "Punten per afstand, slag en datum", color='afstand, slag') +
geom_line()
appendGraph(lijnenplot_ineen)
lijnenplot_ineen2 <- ggplot(bovennul, aes(x = date, y = points, color=afstandEnslag)) +
labs(title = "Punten per afstand, slag en datum") +
geom_line()+
geom_point(data=bovennul_50m, shape=17, color='black', alpha=0.5)
appendGraph(lijnenplot_ineen2)
tabel=zonder_split%>% count(distance, stroke)
tabel=tabel[tabel$n>1,]
tabel=tabel%>%count(distance)
AfstandGefilterd<-zonder_split[zonder_split$distance %in% tabel$distance, ]
lijnenplot_gesplitst <- ggplot(AfstandGefilterd, aes(x = date, y = tijdsduur,
group=interaction(distance, stroke, sep='m ', drop=TRUE),
color = stroke)) +
lijnenplot_gesplitst <- ggplot(AfstandGefilterd,
aes(x = date, y = tijdsduur, color = stroke, group=AfstandSlag)) +
labs(y = "Tijd in seconden", title = "Tijden per datum en slag") +
geom_line() +
geom_point(size=1)+
theme(legend.position = "bottom")+
scale_y_continuous(breaks=seq(0,250,30), minor_breaks=seq(0,250,10))+
scale_colour_manual(values=kleurenset_strokes)
appendGraph(lijnenplot_gesplitst + facet_wrap(vars(distance), scales = 'free_y'))
scale_y_continuous(breaks=seq(0,15*60,30), minor_breaks=seq(0,15*60,10))+
scale_colour_manual(values=kleurenset_strokes)+
facet_wrap(vars(distance), scales = 'free_y')
appendGraph(lijnenplot_gesplitst)
return(response)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment