Compare commits

...

3 Commits

8 changed files with 667 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
build/

3
.latexmkrc Normal file
View File

@ -0,0 +1,3 @@
$pdflatex="pdflatex -shell-escape -interaction=nonstopmode -synctex=1 %O %S";
$out_dir = 'build';
$pdf_mode = 1;

14
Dockerfile Normal file
View File

@ -0,0 +1,14 @@
FROM alpine:3.19
RUN apk update && apk upgrade
RUN apk add make texlive texmf-dist-pictures
RUN apk add texmf-dist-publishers texmf-dist-science texmf-dist-fontsextra texmf-dist-latexextra
RUN apk add biber texmf-dist-bibtexextra
# The 'bbm' package insists on generating stuff in the home directory. In
# order to guarantee access to the home directory no matter the user the
# docker container is run with, create a temporary one anyone can write to
RUN mkdir /tmp/home
RUN chmod -R 777 /tmp/home
ENV HOME=/tmp/home

11
Makefile Normal file
View File

@ -0,0 +1,11 @@
all: build_folder paper.pdf
build_folder:
mkdir -p build/build
paper.pdf: paper.tex
latexmk -pdf paper.tex
clean:
rm -rf build

View File

@ -0,0 +1,23 @@
# KIT Library Hydration Study
Latex sources for a paper on the behavior of students at the KIT library with
regard to their water bottle refilling habits.
## Build
### Build manually
```bash
$ make
```
### Build using docker
1. Build docker image
```bash
$ docker build -f Dockerfile . -t bib-paper
```
2. Build examples
```bash
$ docker run --rm -v $PWD:$PWD -w $PWD -u `id -u`:`id -g` bib-paper make
```

316
common.tex Normal file
View File

@ -0,0 +1,316 @@
% Author: Andreas Tsouchlos
%
% Collection of useful commands and definitions
%
% ||====================================================================||
% || WARNING ||
% ||====================================================================||
% || The following packages have to be included before using this file: ||
% || amsmath ||
% || pgfplots ||
% ||====================================================================||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Math Symbols %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\DeclareMathOperator*{\argmin}{\arg\!\min}
\DeclareMathOperator*{\argmax}{\arg\!\max}
\DeclareMathOperator\sign{sign}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Data Manipulation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Filters for Pgfplots
% Source: https://tex.stackexchange.com/a/58563 (modified)
%
\pgfplotsset{
discard if/.style 2 args={
x filter/.append code={
\edef\tempa{\thisrow{#1}}
\edef\tempb{#2}
\ifx\tempa\tempb
\def\pgfmathresult{inf}
\fi
}
},
discard if not/.style 2 args={
x filter/.append code={
\edef\tempa{\thisrow{#1}}
\edef\tempb{#2}
\ifx\tempa\tempb
\else
\def\pgfmathresult{inf}
\fi
}
},
discard if gt/.style 2 args={
x filter/.append code={
\edef\tempa{\thisrow{#1}}
\edef\tempb{#2}
\ifdim\tempa pt > \tempb pt
\def\pgfmathresult{inf}
\fi
}
},
discard if lt/.style 2 args={
x filter/.append code={
\edef\tempa{\thisrow{#1}}
\edef\tempb{#2}
\ifdim\tempa pt < \tempb pt
\def\pgfmathresult{inf}
\fi
}
}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Graphics & Plotting %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Colors
%
% KIT Colors
\definecolor{kit-green100}{rgb}{0,.59,.51}
\definecolor{kit-green70}{rgb}{.3,.71,.65}
\definecolor{kit-green50}{rgb}{.50,.79,.75}
\definecolor{kit-green30}{rgb}{.69,.87,.85}
\definecolor{kit-green15}{rgb}{.85,.93,.93}
\definecolor{KITgreen}{rgb}{0,.59,.51}
\definecolor{KITpalegreen}{RGB}{130,190,60}
\colorlet{kit-maigreen100}{KITpalegreen}
\colorlet{kit-maigreen70}{KITpalegreen!70}
\colorlet{kit-maigreen50}{KITpalegreen!50}
\colorlet{kit-maigreen30}{KITpalegreen!30}
\colorlet{kit-maigreen15}{KITpalegreen!15}
\definecolor{KITblue}{rgb}{.27,.39,.66}
\definecolor{kit-blue100}{rgb}{.27,.39,.67}
\definecolor{kit-blue70}{rgb}{.49,.57,.76}
\definecolor{kit-blue50}{rgb}{.64,.69,.83}
\definecolor{kit-blue30}{rgb}{.78,.82,.9}
\definecolor{kit-blue15}{rgb}{.89,.91,.95}
\definecolor{KITyellow}{rgb}{.98,.89,0}
\definecolor{kit-yellow100}{cmyk}{0,.05,1,0}
\definecolor{kit-yellow70}{cmyk}{0,.035,.7,0}
\definecolor{kit-yellow50}{cmyk}{0,.025,.5,0}
\definecolor{kit-yellow30}{cmyk}{0,.015,.3,0}
\definecolor{kit-yellow15}{cmyk}{0,.0075,.15,0}
\definecolor{KITorange}{rgb}{.87,.60,.10}
\definecolor{kit-orange100}{cmyk}{0,.45,1,0}
\definecolor{kit-orange70}{cmyk}{0,.315,.7,0}
\definecolor{kit-orange50}{cmyk}{0,.225,.5,0}
\definecolor{kit-orange30}{cmyk}{0,.135,.3,0}
\definecolor{kit-orange15}{cmyk}{0,.0675,.15,0}
\definecolor{KITred}{rgb}{.63,.13,.13}
\definecolor{kit-red100}{cmyk}{.25,1,1,0}
\definecolor{kit-red70}{cmyk}{.175,.7,.7,0}
\definecolor{kit-red50}{cmyk}{.125,.5,.5,0}
\definecolor{kit-red30}{cmyk}{.075,.3,.3,0}
\definecolor{kit-red15}{cmyk}{.0375,.15,.15,0}
\definecolor{KITpurple}{RGB}{160,0,120}
\colorlet{kit-purple100}{KITpurple}
\colorlet{kit-purple70}{KITpurple!70}
\colorlet{kit-purple50}{KITpurple!50}
\colorlet{kit-purple30}{KITpurple!30}
\colorlet{kit-purple15}{KITpurple!15}
\definecolor{KITcyanblue}{RGB}{80,170,230}
\colorlet{kit-cyanblue100}{KITcyanblue}
\colorlet{kit-cyanblue70}{KITcyanblue!70}
\colorlet{kit-cyanblue50}{KITcyanblue!50}
\colorlet{kit-cyanblue30}{KITcyanblue!30}
\colorlet{kit-cyanblue15}{KITcyanblue!15}
% Matplotlib Colors
\definecolor{Mpl1}{HTML}{1f77b4}
\definecolor{Mpl2}{HTML}{ff7f0e}
\definecolor{Mpl3}{HTML}{2ca02c}
\definecolor{Mpl4}{HTML}{d62728}
\definecolor{Mpl5}{HTML}{9467bd}
\definecolor{Mpl6}{HTML}{8c564b}
\definecolor{Mpl7}{HTML}{e377c2}
\definecolor{Mpl8}{HTML}{7f7f7f}
\definecolor{Mpl9}{HTML}{bcbd22}
\definecolor{Mpl10}{HTML}{17becf}
%
% Color Schemes
%
% Define colormaps
\pgfplotsset{
colormap={mako}{
rgb=(0.18195582, 0.11955283, 0.23136943)
rgb=(0.25307401, 0.23772973, 0.48316271)
rgb=(0.21607792, 0.39736958, 0.61948028)
rgb=(0.20344718, 0.56074869, 0.65649508)
rgb=(0.25187832, 0.71827158, 0.67872193)
rgb=(0.54578602, 0.8544913, 0.69848331)
},
colormap={rocket}{
rgb=(0.20973515, 0.09747934, 0.24238489)
rgb=(0.43860848, 0.12177004, 0.34119475)
rgb=(0.67824099, 0.09192342, 0.3504148)
rgb=(0.8833417, 0.19830556, 0.26014181)
rgb=(0.95381595, 0.46373781, 0.31769923)
rgb=(0.96516917, 0.70776351, 0.5606593)
},
colormap={cividis}{
rgb=(0.130669, 0.231458, 0.43284)
rgb=(0.298421, 0.332247, 0.423973)
rgb=(0.42512, 0.431334, 0.447692)
rgb=(0.555393, 0.537807, 0.471147)
rgb=(0.695985, 0.648334, 0.440072)
rgb=(0.849223, 0.771947, 0.359729)
},
colormap={cel}{
color=(KITred!90!black);
color=(kit-blue100);
color=(kit-green70);
color=(kit-yellow70!80!kit-orange70);
},
colormap={matplotlib}{
% Source: https://github.com/matplotlib/matplotlib/blob/e5a85f960b2d47eac371cff709b830d52c36d267/lib/matplotlib/_cm.py#L1114
rgb=(0.2298057, 0.298717966, 0.753683153)
rgb=(0.26623388, 0.353094838, 0.801466763)
rgb=(0.30386891, 0.406535296, 0.84495867 )
rgb=(0.342804478, 0.458757618, 0.883725899)
rgb=(0.38301334, 0.50941904, 0.917387822)
rgb=(0.424369608, 0.558148092, 0.945619588)
rgb=(0.46666708, 0.604562568, 0.968154911)
rgb=(0.509635204, 0.648280772, 0.98478814 )
rgb=(0.552953156, 0.688929332, 0.995375608)
rgb=(0.596262162, 0.726149107, 0.999836203)
rgb=(0.639176211, 0.759599947, 0.998151185)
rgb=(0.681291281, 0.788964712, 0.990363227)
rgb=(0.722193294, 0.813952739, 0.976574709)
rgb=(0.761464949, 0.834302879, 0.956945269)
rgb=(0.798691636, 0.849786142, 0.931688648)
rgb=(0.833466556, 0.860207984, 0.901068838)
rgb=(0.865395197, 0.86541021, 0.865395561)
rgb=(0.897787179, 0.848937047, 0.820880546)
rgb=(0.924127593, 0.827384882, 0.774508472)
rgb=(0.944468518, 0.800927443, 0.726736146)
rgb=(0.958852946, 0.769767752, 0.678007945)
rgb=(0.96732803, 0.734132809, 0.628751763)
rgb=(0.969954137, 0.694266682, 0.579375448)
rgb=(0.966811177, 0.650421156, 0.530263762)
rgb=(0.958003065, 0.602842431, 0.481775914)
rgb=(0.943660866, 0.551750968, 0.434243684)
rgb=(0.923944917, 0.49730856, 0.387970225)
rgb=(0.89904617, 0.439559467, 0.343229596)
rgb=(0.869186849, 0.378313092, 0.300267182)
rgb=(0.834620542, 0.312874446, 0.259301199)
rgb=(0.795631745, 0.24128379, 0.220525627)
rgb=(0.752534934, 0.157246067, 0.184115123)
rgb=(0.705673158, 0.01555616, 0.150232812)
}
}
% Define cycle lists
\pgfplotscreateplotcyclelist{mako}{%
[samples of colormap={4} of mako]%
}
\pgfplotscreateplotcyclelist{rocket}{%
[samples of colormap={4} of rocket]%
}
\pgfplotscreateplotcyclelist{cividis}{%
[samples of colormap={4} of cividis]%
}
\pgfplotscreateplotcyclelist{viridis}{%
[samples of colormap={4} of viridis]%
}
\pgfplotscreateplotcyclelist{cel}{%
[samples of colormap={4} of cel]%
}
\pgfplotscreateplotcyclelist{matplotlib}{%
{Mpl1},{Mpl2},{Mpl3},{Mpl4}
}
% Define 'scolX' colors
\makeatletter
\def\extractcolormapcolor#1#2{%
\expandafter\pgfplotscolormapaccess\expandafter[\pgfplotspointmetatransformedrange]%
[1.0]%
{#2}%
{\pgfkeysvalueof{/pgfplots/colormap name}}%
\def\pgfplots@loc@TMPb{\pgfutil@definecolor{#1}{\csname pgfpl@cm@\pgfkeysvalueof{/pgfplots/colormap name}@colspace\endcsname}}%
\expandafter\pgfplots@loc@TMPb\expandafter{\pgfmathresult}%
}%
\def\getcolorbyvalue#1{
\csname pgfpl@cm@\pgfkeysvalueof{/pgfplots/colormap name}@colspace\endcsname
}
\makeatother
\def\setschemecolorsfrommap{
\extractcolormapcolor{scol0}{0}
\extractcolormapcolor{scol1}{333}
\extractcolormapcolor{scol2}{666}
\extractcolormapcolor{scol3}{1000}
}
\newcommand{\setschemecolorsmanually}[4]{
\colorlet{scol0}{#1}
\colorlet{scol1}{#2}
\colorlet{scol2}{#3}
\colorlet{scol3}{#4}
}
% Define color schemes
\pgfplotsset{
/pgfplots/colorscheme/cel/.style={
colormap name={cel},
cycle list name={cel},
/utils/exec={\setschemecolorsfrommap},
},
/pgfplots/colorscheme/rocket/.style={
colormap name={rocket},
cycle list name={rocket},
/utils/exec={\setschemecolorsfrommap},
},
/pgfplots/colorscheme/viridis/.style={
colormap name={viridis},
cycle list name={viridis},
/utils/exec={\setschemecolorsfrommap},
},
/pgfplots/colorscheme/mako/.style={
colormap name={mako},
cycle list name={mako},
/utils/exec={\setschemecolorsfrommap},
},
/pgfplots/colorscheme/cividis/.style={
colormap name={cividis},
cycle list name={cividis},
/utils/exec={\setschemecolorsfrommap},
},
/pgfplots/colorscheme/matplotlib/.style={
colormap name={matplotlib},
cycle list name={matplotlib},
/utils/exec={\setschemecolorsmanually{Mpl1}{Mpl2}{Mpl3}{Mpl4}},
},
}

6
paper.bib Normal file
View File

@ -0,0 +1,6 @@
@book{gertner2012idea,
title={The idea factory: Bell Labs and the great age of American innovation},
author={Gertner, Jon},
year={2012},
publisher={Penguin}
}

293
paper.tex Normal file
View File

@ -0,0 +1,293 @@
\documentclass[journal]{IEEEtran}
\usepackage{amsmath,amsfonts}
\usepackage{float}
\usepackage{algorithmic}
\usepackage{algorithm}
\usepackage{siunitx}
\usepackage[normalem]{ulem}
\usepackage{dsfont}
\usepackage{mleftright}
\usepackage{bbm}
\usepackage{lipsum}
\usepackage[
backend=biber,
style=ieee,
sorting=nty,
]{biblatex}
\usepackage{tikz}
\usetikzlibrary{spy, arrows.meta,arrows}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usepgfplotslibrary{statistics}
\usepackage{pgfplotstable}
\usepackage{filecontents}
\hyphenation{op-tical net-works semi-conduc-tor IEEE-Xplore}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Inputs & Global Options
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%
% Figures
%
\input{common.tex}
\pgfplotsset{colorscheme/rocket}
\newcommand{\figwidth}{\columnwidth}
\newcommand{\figheight}{0.5\columnwidth}
\pgfplotsset{
FERPlot/.style={
line width=1pt,
densely dashed,
},
BERPlot/.style={
line width=1pt,
},
DFRPlot/.style={
only marks,
},
}
%
% Bibliography
%
\addbibresource{paper.bib}
\AtBeginBibliography{\footnotesize}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Title, Header, Footer, etc.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\newcommand\todo[1]{\textcolor{red}{#1}}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Title, Header, Footer, etc.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\begin{document}
\title{The Effect of the Choice of Hydration Strategy on Average Academic
Performance}
\author{Some concerned fellow students%
\thanks{The authors would like to thank their hard-working peers as well as
the staff of the KIT library for their unknowing - but vital -
participation.}}
\markboth{Journal of the International Association of KIT Bibliophiles}{The
Effect of the Choice of Hydration Strategy on Average Academic Performance}
\maketitle
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Abstract & Index Terms
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\begin{abstract}
We evaluate the \todo{\ldots} and project that by using the right button of
the water dispenser to fill up their water bottles, students can potentially
gain up to \todo{5 minutes} of study time a day, which is equivalent to
raising their grades by up to \todo{0.01} levels.
\end{abstract}
\begin{IEEEkeywords}
KIT Library, Academic Performance, Hydration
\end{IEEEkeywords}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Content
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Introduction}
\IEEEPARstart{T}{he} concepts of hydration and study have always been tightly
interwoven. As an example, an investigation was once conducted by Bell Labs
into the productivity of their employees that found that ``workers with the
most patents often shared lunch or breakfast with a Bell Labs electrical
engineer named Harry Nyquist'' \cite{gertner2012idea}, and we presume that
they also paired their food with something to drink. We can see that
intellectual achievement and hydration are related even for the most
prestigious research institutions.
In this work, we quantify this relationship in the context of studying at the
KIT library and subsequently develop a novel and broadly applicable strategy
to leverage it to improve the academic performance of KIT students.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Experiment Setup}
Over a period of \todo{1 week} we monitored the usage of the water dispenser
on the ground floor of the KIT library. The experiment comprised two parts,
a system measurement and a recording of the behaviour of participants. The
system measurement consisted in determining the flow rate of the water
dispenser. The behavior of the participants we chose to evaluate was their
choice of hydration strategy, i.e., the tendency to press the left or right
button of the water dispenser.
As is always the case with measurements, care must be taken not to alter
quantities by measuring them. To this end, we made sure only to take system
measurements in the absence of participants and to only record data on the
behaviour of participants discreetly.
% \lipsum[3]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Experiment Results}
\begin{filecontents*}{system.csv}
4,5
5,6
6,7
6,7
2,3
3,4
8,9
4,5
1,2
2,3
3,4
4,5
\end{filecontents*}
\begin{filecontents*}{behavior.csv}
42, 34
\end{filecontents*}
\begin{figure}[H]
\centering
\begin{tikzpicture}
% Boxplot groups columns, but we want rows
\pgfplotstableread[col sep=comma]{system.csv}\systemcsvdata
\begin{axis}[
width=0.9\columnwidth,
height=0.4\columnwidth,
boxplot/draw direction = x,
xmajorgrids,
ytick = {1, 2},
yticklabels = {Left button, Right button},
xlabel = {Flowrate (\si{\milli\litre\per\second})},
]
\foreach \n in {0,1} {
\addplot+[boxplot, fill, draw=black] table[x index=\n] {\systemcsvdata};
}
\end{axis}
\end{tikzpicture}
\caption{\todo{Flow rate of the water dispenser depending on the button pressed.}}
\label{fig:System}
\end{figure}
\todo{TODO: Data collection and plotting}
\begin{figure}[H]
\centering
\begin{tikzpicture}
% Boxplot groups columns, but we want rows
\pgfplotstableread[col sep=comma]{system.csv}\systemcsvdata
\begin{axis}[
width=0.9\columnwidth,
height=0.4\columnwidth,
boxplot/draw direction = x,
xmajorgrids,
ytick = {1, 2},
yticklabels = {Left button, Right button},
xlabel = {Flowrate (\si{\milli\litre\per\second})},
]
\foreach \n in {0,1} {
\addplot+[boxplot, fill, draw=black] table[x index=\n] {\systemcsvdata};
}
\end{axis}
\end{tikzpicture}
\caption{\todo{Distribution of the choice of hydration strategy.}}
\label{fig:Behavior}
\end{figure}
\todo{TODO: Data collection and plotting}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Discussion}
\todo{
\begin{itemize}
\item Quantify relationship: Compute average time saving by using right
button $\rightarrow$ translate into grade gain
\item Develop novel strategy $\equiv$ Use right button
\end{itemize}
}
\todo{
\begin{itemize}
\item People using the left button slow down the entire queue
behind them, not only themselves
\item Possible sources of error: Limited sample size
\end{itemize}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Conclusion}
\todo{
\begin{itemize}
\item Reiterate discussion resuls: time and grade gain
\item Further research: People seeing a long queue might
decide not to fill up their bottles $\rightarrow$ they drink
less $\rightarrow$ They perform worse academically
\end{itemize}
}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Bibliography
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\printbibliography
\end{document}