<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/one-month-as-a-procrastinator-on-stack-overflow/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://privefl.github.io/blog/one-month-as-a-procrastinator-on-stack-overflow/"> blog</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<section>
<p>Hello everyone, I’m 6103040 aka F. Privé. In this post, I will give some insights about answering questions on Stack Overflow (SO) for a month. One of the reason I’ve began frenetically answering questions on Stack Overflow was to procrastinate while finishing a scientific manuscript.</p>
<div>
<h2>My activity on Stack Overflow</h2>
<p>We’ll use David Robinson’s package <strong>stackr</strong> to get data from Stack Overflow API.</p>
<div>
<pre><code><span># devtools::install_github(&quot;dgrtwo/stackr&quot;)</span>
<span>suppressMessages</span>({
  <span>library</span>(stackr)
  <span>library</span>(tidyverse)
  <span>library</span>(lubridate)
})</code></pre>
</div>
<div>
<h3>Evolution my SO reputation</h3>
<div>
<pre><code>myID &lt;-<span> &quot;6103040&quot;</span>

myRep &lt;-<span> </span><span>stack_users</span>(myID, <span>&quot;reputation-history&quot;</span>, <span>num_pages =</span> <span>10</span>)

(p &lt;-<span> </span>myRep %>%
<span> </span><span>arrange</span>(creation_date) %>%
<span> </span><span>ggplot</span>(<span>aes</span>(creation_date, <span>cumsum</span>(reputation_change))) %>%
<span> </span>bigstatsr:::<span>MY_THEME</span>() +
<span> </span><span>geom_point</span>() +
<span> </span><span>labs</span>(<span>x =</span> <span>&quot;Date&quot;</span>, <span>y =</span> <span>&quot;Reputation&quot;</span>, 
         <span>title =</span> <span>&quot;Evolution of my SO reputation over time&quot;</span>))</code></pre>
</div>
<p><img src="https://i1.wp.com/privefl.github.io/blog/knitr_files/post-SO_files/figure-html/unnamed-chunk-2-1.png?w=80%25&ssl=1" data-recalc-dims="1"></p>
<div>
<pre><code>p +
<span> </span><span>xlim</span>(<span>as.POSIXct</span>(<span>c</span>(<span>today</span>() -<span> </span><span>months</span>(<span>1</span>), <span>today</span>()))) +
<span> </span><span>geom_smooth</span>(<span>method =</span> <span>&quot;lm&quot;</span>) +
<span> </span><span>ggtitle</span>(<span>&quot;Evolution of my SO reputation over the last month&quot;</span>)</code></pre>
</div>
<pre><code>## Warning: Removed 39 rows containing non-finite values (stat_smooth).</code></pre>
<pre><code>## Warning: Removed 39 rows containing missing values (geom_point).</code></pre>
<p><img src="https://i0.wp.com/privefl.github.io/blog/knitr_files/post-SO_files/figure-html/unnamed-chunk-2-2.png?w=80%25&ssl=1" data-recalc-dims="1"></p>
</div>
<div>
<h3>Analyzing my answers</h3>
<div>
<pre><code>(myAnswers &lt;-<span> </span><span>stack_users</span>(myID, <span>&quot;answers&quot;</span>, <span>num_pages =</span> <span>10</span>,
                          <span>fromdate =</span> <span>today</span>() -<span> </span><span>months</span>(<span>1</span>)) %>%
<span> </span><span>select</span>(-<span>starts_with</span>(<span>&quot;owner&quot;</span>)) %>%
<span> </span><span>arrange</span>(<span>desc</span>(score)) %>%
<span> </span><span>as_tibble</span>())</code></pre>
</div>
<pre><code>## # A tibble: 63 x 7
##    is_accepted score  last_activity_date       creation_date answer_id
##          </code></pre></div></div></section>