# Activity on this site vs. time of the day

Motivated by a comment by Barbara Beeton, I was wondering if there is a way to show the average activity on this site vs. time of the day? I am interested in a plot of the following type (I stress that there is no real data underlying this plot, this is the data I am interested in!)

Is it possible to get this data? If so, how? Where can one read more about how to access this data?

EDIT: Barbara Beeton pointed that one has, of course, to specify the time zone. I was thinking the natural choice will be the time zone in which the reputation gets binned.

• you should specify the base time zone so that the results make sense. utc would be best, i think. – barbara beeton Aug 1 '18 at 14:28
• @barbarabeeton You are right, but isn't there a predefined time zone, namely the one a day on TeXLive is defined? (Users subject to reputation caps will know what I mean ;-) – marmot Aug 1 '18 at 14:30
• related pre-existing query at SEDE data.stackexchange.com/meta.tex/query/315251/… – David Carlisle Aug 1 '18 at 14:34
• i agree there must be a predefined time zone, but unless the person looking at the results of the query knows what that is w.r.t their local time, not helpful. what i see on my screen for the timestamp of a question/answer/comment/chat item is my local time. – barbara beeton Aug 1 '18 at 14:35
• @DavidCarlisle Sadly I cannot run it ... – marmot Aug 1 '18 at 14:36
• if you have not set up an account there there is a captcha to check you are human, which obviously marmots can not pass. – David Carlisle Aug 1 '18 at 14:39
• This answer could also be interesting meta.stackexchange.com/a/313296/237989 For TeX.se the graph looks like this: i.stack.imgur.com/lTyn3.png – user36296 Aug 1 '18 at 16:24

I created a SEDE query for the distribution of the creation dates of questions and answers by time of day (in UTC): At time of writing, the result looks like this

The data comes from the entire time TeX StackExchange existed until 2018-08-01, 19:20.

The following graph only analyzes posts from 2017 (SEDE query):

As far as I can tell this is not possible for votes: While votes are accessible using the Data Explorer, the time is considered private information.

Since this is a LaTeX forum, one can also plot the data with LaTeX means.

\documentclass[tikz,border=3.14mm]{standalone}
\usepackage{pgfplots,filecontents}
\begin{filecontents*}{allquestions.csv}
Hour,Name,Activity
0,Question,0.02742403306
1,Question,0.02445506715
2,Question,0.02222056242
3,Question,0.0215981377
4,Question,0.01952546339
5,Question,0.0200545244
6,Question,0.02334092691
7,Question,0.03000087139
8,Question,0.04025843074
9,Question,0.04803873971
10,Question,0.05047242036
11,Question,0.05041017788
12,Question,0.0528002888
13,Question,0.05857639018
14,Question,0.06190013817
15,Question,0.06244787192
16,Question,0.06130883469
17,Question,0.05616138228
18,Question,0.05274427058
19,Question,0.05022345047
20,Question,0.04956990452
21,Question,0.04505732531
22,Question,0.03954886656
23,Question,0.0318619213
\end{filecontents*}
Hour,Name,Activity
\end{filecontents*}
\pgfplotsset{compat=1.16}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
width  = 0.85*\textwidth,
ymin=0,
height = 8cm,xmax=24,xmin=0,
ylabel = {activity},xlabel={time of day},
legend cell align=left,
legend style={
at={(1,1.05)},
anchor=south east,
column sep=1ex
}
]
\end{axis}
\end{tikzpicture}
\end{document}


Here is the plot for the 2017 data. To produce it,

2. remove the obnoxious <cr>with dos2unix and remove all apostrophes in that file

Then you will be able to compile

\documentclass[tikz,border=3.14mm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
width  = 0.85*\textwidth,
ymin=0,
height = 8cm,xmax=24,xmin=0,
ylabel = {activity},xlabel={time of day},
legend cell align=left,
legend style={
at={(1,1.05)},
anchor=south east,
column sep=1ex
},
]
skip coords between index={24}{49}]{\datatable};
skip coords between index={0}{24}]{\datatable};
\end{axis}
\end{tikzpicture}
\end{document}


to get

• I added some pgfplots way of plotting your nice data, please feel free to remove it if you don't like it. – marmot Aug 1 '18 at 18:16
• @marmot This certainly looks much nicer than the original – Marcel Krüger Aug 1 '18 at 18:22
• there seems to be an increase in 2017 in the wee hours. maybe that indicates greater participation from australia, japan, and elsewhere in east asia. – barbara beeton Aug 1 '18 at 18:41
• @barbarabeeton I'm not sure I agree. The problem is that the vertical axis does not start at 0. But in the 2017 curve the lowest hand highest points of the answer curve differ by a factor 4, yet in the all time data this factor is a bit lower. This ratio is just half as large on the mathematics and physics sites, where the peak is also shifted to the right. – marmot Aug 1 '18 at 18:55
• thought i checked that, but obviously not. the lowest index on the all-years graph is .015 and .010 for 2017. i stand corrected. still, it appears to be strongly eurocentric. thanks for the exploration. – barbara beeton Aug 1 '18 at 19:08
• @barbarabeeton I just added a pgfplots version of the second plot, which starts from 0. And I added a simple snippet plus instructions that will allow you to produce the plots for any site or year (of course using Marcel's nice data!). – marmot Aug 1 '18 at 19:31
• Also related tex.meta.stackexchange.com/questions/6840/… – percusse Aug 2 '18 at 6:34