summaryrefslogtreecommitdiff
path: root/climbing.rnw
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2020-12-13 12:15:23 -0500
committerBenjamin Chausse <benjamin@chausse.xyz>2020-12-13 12:15:23 -0500
commit15b9e4a5bc6f91b2e825d27ee208232622b81c85 (patch)
tree8db2f60002654543b54c2f55b75a39889d3e0b18 /climbing.rnw
parent1af5b4ae979ce023fc5b2af9a8767be57e152a20 (diff)
Fixed server script and added here as backup
Diffstat (limited to 'climbing.rnw')
-rw-r--r--climbing.rnw16
1 files changed, 9 insertions, 7 deletions
diff --git a/climbing.rnw b/climbing.rnw
index 1e4a205..0bb19af 100644
--- a/climbing.rnw
+++ b/climbing.rnw
@@ -8,7 +8,7 @@
\author{Benjamin Chausse}
\date{\today}
-\title{Climbing Attendance Over Time at La Débarque}
+\title{Climbers Over Time at La Débarque}
% \personaltitle{}
% \classnb{}
% \subject{}
@@ -18,11 +18,13 @@
\begin{document}
\maketitle
\newpage
+
<<LIBRARIES>>=
library(ggplot2)
library(ggforce)
library(scales)
@
+
<<CSV>>=
attendance <- data.frame(
read.csv("./debarque.csv",
@@ -41,7 +43,7 @@ attendance$WEEKDAY <- factor(attendance$WEEKDAY,
"Friday",
"Saturday"))
@
-
+\newpage
<<WEEK-PLOT>>=
# Day of the week averages
week <- ggplot(attendance,
@@ -58,8 +60,8 @@ week <- ggplot(attendance,
scale_x_datetime(
labels=date_format("%R", tz="America/Toronto"),
date_breaks="2 hours") +
- labs(x="Heure de la journée",
- y="Nombre de grimpeurs") +
+ labs(x="Time of day",
+ y="Number of climbers") +
theme(legend.position="none") +
facet_wrap(~WEEKDAY)
@
@@ -73,7 +75,7 @@ timeline <- ggplot(attendance, aes(x=DAY, y=CLIMBERS)) +
print(week)
@
-<<PRINT-TIMELINE, fig.width=10, fig.fullwidth=TRUE, echo=FALSE>>=
-print(timeline)
-@
+% <<PRINT-TIMELINE, fig.width=10, fig.fullwidth=TRUE, echo=FALSE>>=
+% print(timeline)
+% @
\end{document}