You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
opensensmapR/inst/doc/osem-history.html

1821 lines
185 KiB
HTML

2 years ago
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="author" content="Norwin Roosen" />
2 years ago
<meta name="date" content="2023-03-08" />
2 years ago
<title>Visualising the History of openSenseMap.org</title>
<script>// Pandoc 2.9 adds attributes on both header and div. We remove the former (to
// be compatible with the behavior of Pandoc < 2.8).
document.addEventListener('DOMContentLoaded', function(e) {
var hs = document.querySelectorAll("div.section[class*='level'] > :first-child");
var i, h, a;
for (i = 0; i < hs.length; i++) {
h = hs[i];
if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6
a = h.attributes;
while (a.length > 0) h.removeAttribute(a[0].name);
}
});
</script>
<style type="text/css">
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
</style>
<style type="text/css">
code {
white-space: pre;
}
.sourceCode {
overflow: visible;
}
</style>
<style type="text/css" data-origin="pandoc">
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
pre > code.sourceCode { white-space: pre-wrap; }
pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
{ counter-reset: source-line 0; }
pre.numberSource code > span
{ position: relative; left: -4em; counter-increment: source-line; }
pre.numberSource code > span > a:first-child::before
{ content: counter(source-line);
position: relative; left: -1em; text-align: right; vertical-align: baseline;
border: none; display: inline-block;
-webkit-touch-callout: none; -webkit-user-select: none;
-khtml-user-select: none; -moz-user-select: none;
-ms-user-select: none; user-select: none;
padding: 0 4px; width: 4em;
color: #aaaaaa;
}
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
div.sourceCode
{ }
@media screen {
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
}
code span.al { color: #ff0000; font-weight: bold; }
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; }
code span.at { color: #7d9029; }
code span.bn { color: #40a070; }
code span.bu { color: #008000; }
code span.cf { color: #007020; font-weight: bold; }
code span.ch { color: #4070a0; }
code span.cn { color: #880000; }
code span.co { color: #60a0b0; font-style: italic; }
code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; }
code span.do { color: #ba2121; font-style: italic; }
code span.dt { color: #902000; }
code span.dv { color: #40a070; }
code span.er { color: #ff0000; font-weight: bold; }
code span.ex { }
code span.fl { color: #40a070; }
code span.fu { color: #06287e; }
code span.im { color: #008000; font-weight: bold; }
code span.in { color: #60a0b0; font-weight: bold; font-style: italic; }
code span.kw { color: #007020; font-weight: bold; }
code span.op { color: #666666; }
code span.ot { color: #007020; }
code span.pp { color: #bc7a00; }
code span.sc { color: #4070a0; }
code span.ss { color: #bb6688; }
code span.st { color: #4070a0; }
code span.va { color: #19177c; }
code span.vs { color: #4070a0; }
code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; }
</style>
<script>
// apply pandoc div.sourceCode style to pre.sourceCode instead
(function() {
var sheets = document.styleSheets;
for (var i = 0; i < sheets.length; i++) {
if (sheets[i].ownerNode.dataset["origin"] !== "pandoc") continue;
try { var rules = sheets[i].cssRules; } catch (e) { continue; }
var j = 0;
while (j < rules.length) {
var rule = rules[j];
// check if there is a div.sourceCode rule
if (rule.type !== rule.STYLE_RULE || rule.selectorText !== "div.sourceCode") {
j++;
continue;
}
var style = rule.style.cssText;
// check if color or background-color is set
if (rule.style.color === '' && rule.style.backgroundColor === '') {
j++;
continue;
}
// replace div.sourceCode by a pre.sourceCode rule
sheets[i].deleteRule(j);
sheets[i].insertRule('pre.sourceCode{' + style + '}', j);
}
}
})();
</script>
<style type="text/css">body {
background-color: #fff;
margin: 1em auto;
max-width: 700px;
overflow: visible;
padding-left: 2em;
padding-right: 2em;
font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 1.35;
}
#TOC {
clear: both;
margin: 0 0 10px 10px;
padding: 4px;
width: 400px;
border: 1px solid #CCCCCC;
border-radius: 5px;
background-color: #f6f6f6;
font-size: 13px;
line-height: 1.3;
}
#TOC .toctitle {
font-weight: bold;
font-size: 15px;
margin-left: 5px;
}
#TOC ul {
padding-left: 40px;
margin-left: -1.5em;
margin-top: 5px;
margin-bottom: 5px;
}
#TOC ul ul {
margin-left: -2em;
}
#TOC li {
line-height: 16px;
}
table {
margin: 1em auto;
border-width: 1px;
border-color: #DDDDDD;
border-style: outset;
border-collapse: collapse;
}
table th {
border-width: 2px;
padding: 5px;
border-style: inset;
}
table td {
border-width: 1px;
border-style: inset;
line-height: 18px;
padding: 5px 5px;
}
table, table th, table td {
border-left-style: none;
border-right-style: none;
}
table thead, table tr.even {
background-color: #f7f7f7;
}
p {
margin: 0.5em 0;
}
blockquote {
background-color: #f6f6f6;
padding: 0.25em 0.75em;
}
hr {
border-style: solid;
border: none;
border-top: 1px solid #777;
margin: 28px 0;
}
dl {
margin-left: 0;
}
dl dd {
margin-bottom: 13px;
margin-left: 13px;
}
dl dt {
font-weight: bold;
}
ul {
margin-top: 0;
}
ul li {
list-style: circle outside;
}
ul ul {
margin-bottom: 0;
}
pre, code {
background-color: #f7f7f7;
border-radius: 3px;
color: #333;
white-space: pre-wrap;
}
pre {
border-radius: 3px;
margin: 5px 0px 10px 0px;
padding: 10px;
}
pre:not([class]) {
background-color: #f7f7f7;
}
code {
font-family: Consolas, Monaco, 'Courier New', monospace;
font-size: 85%;
}
p > code, li > code {
padding: 2px 0px;
}
div.figure {
text-align: center;
}
img {
background-color: #FFFFFF;
padding: 2px;
border: 1px solid #DDDDDD;
border-radius: 3px;
border: 1px solid #CCCCCC;
margin: 0 5px;
}
h1 {
margin-top: 0;
font-size: 35px;
line-height: 40px;
}
h2 {
border-bottom: 4px solid #f7f7f7;
padding-top: 10px;
padding-bottom: 2px;
font-size: 145%;
}
h3 {
border-bottom: 2px solid #f7f7f7;
padding-top: 10px;
font-size: 120%;
}
h4 {
border-bottom: 1px solid #f7f7f7;
margin-left: 8px;
font-size: 105%;
}
h5, h6 {
border-bottom: 1px solid #ccc;
font-size: 105%;
}
a {
color: #0033dd;
text-decoration: none;
}
a:hover {
color: #6666ff; }
a:visited {
color: #800080; }
a:visited:hover {
color: #BB00BB; }
a[href^="http:"] {
text-decoration: underline; }
a[href^="https:"] {
text-decoration: underline; }
code > span.kw { color: #555; font-weight: bold; }
code > span.dt { color: #902000; }
code > span.dv { color: #40a070; }
code > span.bn { color: #d14; }
code > span.fl { color: #d14; }
code > span.ch { color: #d14; }
code > span.st { color: #d14; }
code > span.co { color: #888888; font-style: italic; }
code > span.ot { color: #007020; }
code > span.al { color: #ff0000; font-weight: bold; }
code > span.fu { color: #900; font-weight: bold; }
code > span.er { color: #a61717; background-color: #e3d2d2; }
</style>
</head>
<body>
<h1 class="title toc-ignore">Visualising the History of
openSenseMap.org</h1>
<h4 class="author">Norwin Roosen</h4>
2 years ago
<h4 class="date">2023-03-08</h4>
2 years ago
<div id="TOC">
<ul>
<li><a href="#plot-count-of-boxes-by-time" id="toc-plot-count-of-boxes-by-time">Plot count of boxes by time</a>
<ul>
<li><a href="#and-exposure" id="toc-and-exposure">…and exposure</a></li>
<li><a href="#and-grouptag" id="toc-and-grouptag">…and grouptag</a></li>
</ul></li>
<li><a href="#plot-rate-of-growth-and-inactivity-per-week" id="toc-plot-rate-of-growth-and-inactivity-per-week">Plot rate of growth
and inactivity per week</a></li>
<li><a href="#plot-duration-of-boxes-being-active" id="toc-plot-duration-of-boxes-being-active">Plot duration of boxes
being active</a>
<ul>
<li><a href="#by-exposure" id="toc-by-exposure">…by exposure</a></li>
<li><a href="#by-grouptag" id="toc-by-grouptag">…by grouptag</a></li>
<li><a href="#by-year-of-registration" id="toc-by-year-of-registration">…by year of registration</a></li>
</ul></li>
<li><a href="#more-visualisations" id="toc-more-visualisations">More
Visualisations</a></li>
</ul>
</div>
<blockquote>
<p>This vignette serves as an example on data wrangling &amp;
visualization with <code>opensensmapr</code>, <code>dplyr</code> and
<code>ggplot2</code>.</p>
</blockquote>
<div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="co"># required packages:</span></span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="fu">library</span>(opensensmapr) <span class="co"># data download</span></span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a><span class="fu">library</span>(dplyr) <span class="co"># data wrangling</span></span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a><span class="fu">library</span>(ggplot2) <span class="co"># plotting</span></span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a><span class="fu">library</span>(lubridate) <span class="co"># date arithmetic</span></span>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a><span class="fu">library</span>(zoo) <span class="co"># rollmean()</span></span></code></pre></div>
<p>openSenseMap.org has grown quite a bit in the last years; it would be
2 years ago
interesting to see how we got to the current 11448 sensor stations,
2 years ago
split up by various attributes of the boxes.</p>
<p>While <code>opensensmapr</code> provides extensive methods of
filtering boxes by attributes on the server, we do the filtering within
R to save time and gain flexibility. So the first step is to retrieve
<em>all the boxes</em>:</p>
<div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="co"># if you want to see results for a specific subset of boxes,</span></span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="co"># just specify a filter such as grouptag=&#39;ifgi&#39; here</span></span>
2 years ago
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb2-4"><a href="#cb2-4" aria-hidden="true" tabindex="-1"></a><span class="co"># boxes = osem_boxes(cache = &#39;.&#39;)</span></span>
<span id="cb2-5"><a href="#cb2-5" aria-hidden="true" tabindex="-1"></a>boxes <span class="ot">=</span> <span class="fu">readRDS</span>(<span class="st">&#39;boxes_precomputed.rds&#39;</span>) <span class="co"># read precomputed file to save resources </span></span></code></pre></div>
2 years ago
<div id="plot-count-of-boxes-by-time" class="section level1 tabset">
<h1 class="tabset">Plot count of boxes by time</h1>
<p>By looking at the <code>createdAt</code> attribute of each box we
know the exact time a box was registered. With this approach we have no
information about boxes that were deleted in the meantime, but thats
okay for now.</p>
<div id="and-exposure" class="section level2">
<h2>…and exposure</h2>
<div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a>exposure_counts <span class="ot">=</span> boxes <span class="sc">%&gt;%</span></span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">group_by</span>(exposure) <span class="sc">%&gt;%</span></span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">mutate</span>(<span class="at">count =</span> <span class="fu">row_number</span>(createdAt))</span>
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-5"><a href="#cb3-5" aria-hidden="true" tabindex="-1"></a>exposure_colors <span class="ot">=</span> <span class="fu">c</span>(<span class="at">indoor =</span> <span class="st">&#39;red&#39;</span>, <span class="at">outdoor =</span> <span class="st">&#39;lightgreen&#39;</span>, <span class="at">mobile =</span> <span class="st">&#39;blue&#39;</span>, <span class="at">unknown =</span> <span class="st">&#39;darkgrey&#39;</span>)</span>
<span id="cb3-6"><a href="#cb3-6" aria-hidden="true" tabindex="-1"></a><span class="fu">ggplot</span>(exposure_counts, <span class="fu">aes</span>(<span class="at">x =</span> createdAt, <span class="at">y =</span> count, <span class="at">colour =</span> exposure)) <span class="sc">+</span></span>
<span id="cb3-7"><a href="#cb3-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">geom_line</span>() <span class="sc">+</span></span>
<span id="cb3-8"><a href="#cb3-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">scale_colour_manual</span>(<span class="at">values =</span> exposure_colors) <span class="sc">+</span></span>
<span id="cb3-9"><a href="#cb3-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">xlab</span>(<span class="st">&#39;Registration Date&#39;</span>) <span class="sc">+</span> <span class="fu">ylab</span>(<span class="st">&#39;senseBox count&#39;</span>)</span></code></pre></div>
2 years ago
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqAAAAHgCAMAAABNUi8GAAABEVBMVEUAAAAAADoAAGYAAP8AOmYAOpAAZrYzMzM6AAA6ADo6AGY6OgA6OmY6OpA6ZrY6kJA6kNtNTU1NTW5NTY5NbqtNjshmAABmADpmAGZmOgBmOpBmZmZmZrZmkJBmtrZmtv9uTU1uTW5uTY5ubo5ubqtuq+SOTU2OTW6OTY6Obk2ObquOyP+QOgCQOjqQOmaQZgCQkDqQkGaQtpCQ27aQ2/+Q7pCpqamrbk2rbm6rjk2ryKur5OSr5P+2ZgC2Zjq2Zma225C22/+2/7a2///Ijk3I///bkDrb25Db2//b/7bb///kq27k///r6+vy8vL/AAD/tmb/yI7/25D/27b/29v/5Kv//7b//8j//9v//+T///8ySIGqAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAZ2ElEQVR4nO2dC3vbRnaGJbuWZbXpionseHuT4/rWSu6uU9HqRdrdRhHbWnIlsaUp4f//kM4AIAm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iPCg/oz+CVu+D+gmaTrLHeVBORo8EvT+uOIr3FNQzIbrAw9BVSMSCNg4ElWVAUCIQVJYBQYlAUFkGBCUCQWUZEJRI6fqg/+X54hBd4GHoKqQvguZnQO//CSfq2RgQlEj5Arb2Bje3uHgYIwOCEinvg6aXbsC3mRgZEJTI0kHSeNfjgyQIGitEq6D3x1s76WbeMSG6wMPQVUhfBP32Yju9xw32QfkYEJRISdC/yZZ/hKBsDAhKBCfqZRkQlAimHcsyICgRfGFZltFDQc/TeRuzSSA+gmLKBz+jt4Imyxd1
2 years ago
<p>Outdoor boxes are growing <em>fast</em>! We can also see the
introduction of <code>mobile</code> sensor “stations” in 2017. While
mobile boxes are still few, we can expect a quick rise in 2018 once the
new senseBox MCU with GPS support is released.</p>
<p>Lets have a quick summary:</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a>exposure_counts <span class="sc">%&gt;%</span></span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">summarise</span>(</span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a> <span class="at">oldest =</span> <span class="fu">min</span>(createdAt),</span>
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a> <span class="at">newest =</span> <span class="fu">max</span>(createdAt),</span>
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a> <span class="at">count =</span> <span class="fu">max</span>(count)</span>
<span id="cb4-6"><a href="#cb4-6" aria-hidden="true" tabindex="-1"></a> ) <span class="sc">%&gt;%</span></span>
<span id="cb4-7"><a href="#cb4-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">arrange</span>(<span class="fu">desc</span>(count))</span></code></pre></div>
<div class="kable-table">
<table>
<thead>
<tr class="header">
<th align="left">exposure</th>
<th align="left">oldest</th>
<th align="left">newest</th>
<th align="right">count</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td align="left">outdoor</td>
<td align="left">2016-08-09 19:34:42</td>
2 years ago
<td align="left">2023-02-28 09:47:17</td>
<td align="right">8417</td>
2 years ago
</tr>
<tr class="even">
<td align="left">indoor</td>
<td align="left">2018-05-10 20:14:44</td>
2 years ago
<td align="left">2023-02-27 09:53:33</td>
<td align="right">2364</td>
2 years ago
</tr>
<tr class="odd">
<td align="left">mobile</td>
<td align="left">2020-10-24 14:39:30</td>
<td align="left">2023-02-20 16:32:48</td>
2 years ago
<td align="right">590</td>
2 years ago
</tr>
<tr class="even">
<td align="left">unknown</td>
<td align="left">2022-03-01 07:04:31</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">19</td>
</tr>
</tbody>
</table>
</div>
</div>
<div id="and-grouptag" class="section level2">
<h2>…and grouptag</h2>
<p>We can try to find out where the increases in growth came from, by
analysing the box count by grouptag.</p>
<p>Caveats: Only a small subset of boxes has a grouptag, and we should
assume that these groups are actually bigger. Also, we can see that
grouptag naming is inconsistent (<code>Luftdaten</code>,
<code>luftdaten.info</code>, …)</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a>grouptag_counts <span class="ot">=</span> boxes <span class="sc">%&gt;%</span></span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">group_by</span>(grouptag) <span class="sc">%&gt;%</span></span>
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a> <span class="co"># only include grouptags with 8 or more members</span></span>
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">filter</span>(<span class="fu">length</span>(grouptag) <span class="sc">&gt;=</span> <span class="dv">8</span> <span class="sc">&amp;</span> <span class="sc">!</span><span class="fu">is.na</span>(grouptag)) <span class="sc">%&gt;%</span></span>
<span id="cb5-5"><a href="#cb5-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">mutate</span>(<span class="at">count =</span> <span class="fu">row_number</span>(createdAt))</span>
<span id="cb5-6"><a href="#cb5-6" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb5-7"><a href="#cb5-7" aria-hidden="true" tabindex="-1"></a><span class="co"># helper for sorting the grouptags by boxcount</span></span>
<span id="cb5-8"><a href="#cb5-8" aria-hidden="true" tabindex="-1"></a>sortLvls <span class="ot">=</span> <span class="cf">function</span>(oldFactor, <span class="at">ascending =</span> <span class="cn">TRUE</span>) {</span>
<span id="cb5-9"><a href="#cb5-9" aria-hidden="true" tabindex="-1"></a> lvls <span class="ot">=</span> <span class="fu">table</span>(oldFactor) <span class="sc">%&gt;%</span> <span class="fu">sort</span>(., <span class="at">decreasing =</span> <span class="sc">!</span>ascending) <span class="sc">%&gt;%</span> <span class="fu">names</span>()</span>
<span id="cb5-10"><a href="#cb5-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">factor</span>(oldFactor, <span class="at">levels =</span> lvls)</span>
<span id="cb5-11"><a href="#cb5-11" aria-hidden="true" tabindex="-1"></a>}</span>
<span id="cb5-12"><a href="#cb5-12" aria-hidden="true" tabindex="-1"></a>grouptag_counts<span class="sc">$</span>grouptag <span class="ot">=</span> <span class="fu">sortLvls</span>(grouptag_counts<span class="sc">$</span>grouptag, <span class="at">ascending =</span> <span class="cn">FALSE</span>)</span>
<span id="cb5-13"><a href="#cb5-13" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb5-14"><a href="#cb5-14" aria-hidden="true" tabindex="-1"></a><span class="fu">ggplot</span>(grouptag_counts, <span class="fu">aes</span>(<span class="at">x =</span> createdAt, <span class="at">y =</span> count, <span class="at">colour =</span> grouptag)) <span class="sc">+</span></span>
<span id="cb5-15"><a href="#cb5-15" aria-hidden="true" tabindex="-1"></a> <span class="fu">geom_line</span>(<span class="fu">aes</span>(<span class="at">group =</span> grouptag)) <span class="sc">+</span></span>
<span id="cb5-16"><a href="#cb5-16" aria-hidden="true" tabindex="-1"></a> <span class="fu">xlab</span>(<span class="st">&#39;Registration Date&#39;</span>) <span class="sc">+</span> <span class="fu">ylab</span>(<span class="st">&#39;senseBox count&#39;</span>)</span></code></pre></div>
2 years ago
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqAAAAHgCAMAAABNUi8GAAAB0VBMVEUAAAAAADoAAGYAOjoAOmYAOpAAZpAAZrYApv8Aqf8ArPsAr/cAsvMAte4At+kAuBsAuTIAueQAukMAut4AvFAAvNgAvVwAvdIAvmcAvnIAvssAv3sAv8QAwIUAwI4AwJYAwK4AwLYAwL0AwZ8AwacntwAsov86AAA6ADo6AGY6OgA6OmY6OpA6ZmY6ZpA6ZrY6kJA6kNtDtQBQn/9VswBksgBmAABmADpmAGZmOgBmOjpmOpBmZgBmZjpmZmZmZrZmkJBmtrZmtttmtv9om/9wsAB8lv98rgCGrACMkv+PqgCQOgCQOjqQOmaQZgCQZpCQkDqQkGaQtpCQ27aQ2/+YqACajv+gpgCnif+npACuogCzhf+1oAC2ZgC2Zjq2kDq2tma225C22/+2/7a2/9u2//+7nQC9gP/BmwDHfP/HmADNlgDQeP/SkwDXkADYdP3bjgDbkDrbkGbbtmbb25Db/7bb/9vb///fcPngiwDkiADlbfXohSPqafDsgjnvZ+vvf0jyfFby8vL0ZeX1eWL3Y+D4dm36Ytn6c3f8cYH9YdP+bov/YcX/Ycz/Yr3/Y7b/Za7/Z6X/aZ3/a5T/tmb/25D/27b/29v//7b//9v///9qBVXqAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nO19iX8cOXZek14tc9/3fVNcc63pHFrtaFbemLmpsXc0zGHHrYws0XHs2HE7M8PYcXx0HOe+uxyy/toUgAe8B6C6UNWo4wnzvt+MyK6urvce8BUK1cRX36oWCBhjtXQCAkEXhKAC1hCCClhDCCpgDSGogDVaCfpbPzF3GgJBO9oIWj2+mT0PgaAVQlABa6zOgJDNP9XjT1arR3fV+Wq1rtW/zY/6/unq5NXF7dJ5Cr6i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iBK9sciAELSA292xyIAQtIDb3bHIgBC0gNvdsciAELSA292xyIAQtIDb3bHIgBC0gNvdsciAELSA292xyIAQtIDb3bHIgBC0gNvdsciAELSA292xyIAQtIDb3bHJwDEH9xUB9rYNnQKIYUEuT9eRoPUy3qCWRncrqI2L7Wg99ZC/4yOjOZqHuOQopgm5hXeBhglaDrYMnQ3cxVi2NdCTWw7BFm8JsHt11K6uHx/bVcvrIfvCR8ZUhqGrJ+6frVoKaBcm9rYMXL6bytOhKq0Ksh2unckQ58KBVgn0I6qQmcfCRkWqJj3SnmC56ePnJarXeq+dITLqc/Dh0V4I6zdWv/3o7QXtbB89SzD+IgMVYtbQneKi9LS5T5wc8IPbuz0YIR1BLRzeO15Nd4n9bDKLqRKvAR3cP12f6CR3YaZyw2/2HCNinpsOUoeXBEbS3dfAsxXSOYqCWRoIS62Hz7/4s2He02Gbu2fASftZB8JGRGkGdDr7pJiWyVf83v6J4nA26K4EO26QJagRxXdbBixdjcn+MV9nKKm1jytp9R4tdkUeJaL/OIPjI6EXQykjAKUGdeJwN+hBUjYw9R9AO62AmxWyuzNSy4aKzHnZb3BzU7jtWbGgD0B1vT+3lZqrHM/UiaMsIymv0VOiuhMxBY4IOtA5evhjn8XtW6/tnZz2MW7y7+NFvkiwd1ayP+h6P3AzJbGynwBwUCTqpKPw4JNpVdZi6i997BNXzqLMh1sEsirFqaTUNMY9hBOthsoV+Dzr+HNQ+60bdpTjfY2jNUdGPoPYuHgnqxONskGhX3WHh96BskSqm1Njcs8lB30qEoIxjc88mB0LQAmJzzyYHQtACYnPPJgdC0AJic88mB0LQAmJzzyYHQtACYnPPJgdC0AJic88mB0LQAmJzzyYHQtACYnPPJgdC0AJi
2 years ago
<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a>grouptag_counts <span class="sc">%&gt;%</span></span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">summarise</span>(</span>
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a> <span class="at">oldest =</span> <span class="fu">min</span>(createdAt),</span>
<span id="cb6-4"><a href="#cb6-4" aria-hidden="true" tabindex="-1"></a> <span class="at">newest =</span> <span class="fu">max</span>(createdAt),</span>
<span id="cb6-5"><a href="#cb6-5" aria-hidden="true" tabindex="-1"></a> <span class="at">count =</span> <span class="fu">max</span>(count)</span>
<span id="cb6-6"><a href="#cb6-6" aria-hidden="true" tabindex="-1"></a> ) <span class="sc">%&gt;%</span></span>
<span id="cb6-7"><a href="#cb6-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">arrange</span>(<span class="fu">desc</span>(count))</span></code></pre></div>
<div class="kable-table">
<table style="width:100%;">
<colgroup>
<col width="36%" />
<col width="27%" />
<col width="27%" />
<col width="8%" />
</colgroup>
<thead>
<tr class="header">
<th align="left">grouptag</th>
<th align="left">oldest</th>
<th align="left">newest</th>
<th align="right">count</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td align="left">edu</td>
<td align="left">2022-03-30 11:25:43</td>
2 years ago
<td align="left">2023-02-28 09:47:17</td>
<td align="right">431</td>
2 years ago
</tr>
<tr class="even">
<td align="left">Save Dnipro</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">354</td>
</tr>
<tr class="odd">
<td align="left">Luftdaten</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2023-01-27 15:22:54</td>
<td align="right">244</td>
</tr>
<tr class="even">
2 years ago
<td align="left">CS:iDrop</td>
<td align="left">2023-01-10 10:22:33</td>
<td align="left">2023-02-27 09:53:33</td>
<td align="right">140</td>
</tr>
<tr class="odd">
2 years ago
<td align="left">HU Explorers</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-12-14 10:11:34</td>
<td align="right">124</td>
</tr>
<tr class="even">
<td align="left">#stropdeaer</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">101</td>
</tr>
<tr class="odd">
<td align="left">321heiss</td>
<td align="left">2022-06-27 14:12:25</td>
<td align="left">2022-08-08 10:22:21</td>
<td align="right">91</td>
</tr>
<tr class="even">
<td align="left">GIZ Clean Air Day Project</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">76</td>
</tr>
<tr class="odd">
<td align="left">Captographies</td>
<td align="left">2021-05-21 15:24:45</td>
<td align="left">2023-01-31 12:11:49</td>
<td align="right">62</td>
</tr>
<tr class="even">
<td align="left">Futurium</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
2 years ago
<td align="right">39</td>
2 years ago
</tr>
<tr class="odd">
<td align="left">Bad_Hersfeld</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">37</td>
</tr>
<tr class="even">
<td align="left">TKS Bonn</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">36</td>
</tr>
<tr class="odd">
2 years ago
<td align="left">kerekdomb_</td>
<td align="left">2022-03-30 11:25:43</td>
2 years ago
<td align="left">2022-03-30 11:25:43</td>
<td align="right">34</td>
</tr>
<tr class="even">
2 years ago
<td align="left">Mikroprojekt Mitmachklima</td>
2 years ago
<td align="left">2022-03-30 11:25:43</td>
2 years ago
<td align="left">2022-08-23 13:14:11</td>
2 years ago
<td align="right">34</td>
</tr>
<tr class="odd">
<td align="left">Bottrop-Feinstaub</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">33</td>
</tr>
<tr class="even">
<td align="left">Luchtwachters Delft</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">33</td>
</tr>
<tr class="odd">
<td align="left">Futurium 2021</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">32</td>
</tr>
<tr class="even">
<td align="left">Feinstaub</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-08-01 16:27:10</td>
<td align="right">29</td>
</tr>
<tr class="odd">
<td align="left">luftdaten.info</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">28</td>
</tr>
<tr class="even">
<td align="left">ifgi</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">26</td>
</tr>
<tr class="odd">
<td align="left">SUGUCS</td>
<td align="left">2022-11-30 15:25:32</td>
<td align="left">2023-01-23 13:17:54</td>
<td align="right">25</td>
</tr>
<tr class="even">
<td align="left">cleanairfrome</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-05-15 21:13:30</td>
<td align="right">24</td>
</tr>
<tr class="odd">
2 years ago
<td align="left">freshairbromley</td>
2 years ago
<td align="left">2022-03-30 11:25:43</td>
2 years ago
<td align="left">2023-01-31 10:18:57</td>
<td align="right">24</td>
2 years ago
</tr>
<tr class="even">
2 years ago
<td align="left">WAUW!denberg</td>
<td align="left">2022-03-30 11:25:43</td>
2 years ago
<td align="left">2022-03-30 11:25:43</td>
<td align="right">23</td>
</tr>
<tr class="odd">
<td align="left">Riga</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">22</td>
</tr>
<tr class="even">
2 years ago
<td align="left">bad_hersfeld</td>
2 years ago
<td align="left">2022-03-30 11:25:43</td>
2 years ago
<td align="left">2022-06-14 09:34:02</td>
2 years ago
<td align="right">21</td>
</tr>
<tr class="odd">
2 years ago
<td align="left">KJR-M</td>
<td align="left">2022-03-30 11:25:43</td>
2 years ago
<td align="left">2022-03-30 11:25:43</td>
<td align="right">21</td>
</tr>
<tr class="even">
2 years ago
<td align="left">Mikroklima</td>
2 years ago
<td align="left">2022-03-30 11:25:43</td>
2 years ago
<td align="left">2022-09-05 08:38:57</td>
2 years ago
<td align="right">21</td>
</tr>
<tr class="odd">
<td align="left">Smart City MS</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">20</td>
</tr>
<tr class="even">
<td align="left">SekSeeland</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">19</td>
</tr>
<tr class="odd">
<td align="left">Luftdaten.info</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">18</td>
</tr>
<tr class="even">
<td align="left">1</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-04-25 15:07:39</td>
<td align="right">17</td>
</tr>
<tr class="odd">
<td align="left">Apeldoorn</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">17</td>
</tr>
<tr class="even">
<td align="left">luftdaten</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">17</td>
</tr>
<tr class="odd">
<td align="left">BurgerMeetnet</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-05-10 21:22:35</td>
<td align="right">16</td>
</tr>
<tr class="even">
<td align="left">Haus C</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">16</td>
</tr>
<tr class="odd">
<td align="left">AGIN</td>
<td align="left">2022-11-28 17:33:12</td>
<td align="left">2022-11-28 17:42:18</td>
<td align="right">15</td>
</tr>
<tr class="even">
<td align="left">APPI</td>
<td align="left">2023-01-26 13:38:22</td>
<td align="left">2023-01-26 13:40:59</td>
<td align="right">15</td>
</tr>
<tr class="odd">
<td align="left">BRGL</td>
<td align="left">2022-11-06 19:23:43</td>
<td align="left">2022-11-06 22:08:36</td>
<td align="right">15</td>
</tr>
<tr class="even">
<td align="left">BRGW</td>
<td align="left">2022-11-02 10:28:52</td>
<td align="left">2022-11-02 13:32:12</td>
<td align="right">15</td>
</tr>
<tr class="odd">
<td align="left">Burgermeetnet</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">15</td>
</tr>
<tr class="even">
<td align="left">HTLJ</td>
<td align="left">2022-11-21 22:04:17</td>
<td align="left">2022-11-21 22:05:47</td>
<td align="right">15</td>
</tr>
<tr class="odd">
2 years ago
<td align="left">MakeLight</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">15</td>
</tr>
<tr class="even">
2 years ago
<td align="left">MSGB</td>
<td align="left">2022-11-14 09:08:57</td>
<td align="left">2022-11-14 10:19:24</td>
<td align="right">15</td>
</tr>
2 years ago
<tr class="odd">
2 years ago
<td align="left">MSHO</td>
<td align="left">2022-12-20 09:28:40</td>
<td align="left">2022-12-20 10:01:38</td>
<td align="right">15</td>
</tr>
2 years ago
<tr class="even">
2 years ago
<td align="left">MSIN</td>
<td align="left">2022-11-21 17:02:39</td>
<td align="left">2022-11-21 23:06:22</td>
<td align="right">15</td>
</tr>
2 years ago
<tr class="odd">
2 years ago
<td align="left">MSKE</td>
<td align="left">2023-01-05 15:40:58</td>
<td align="left">2023-01-05 15:52:02</td>
<td align="right">15</td>
</tr>
<tr class="even">
<td align="left">PMSI</td>
<td align="left">2023-01-20 14:22:03</td>
<td align="left">2023-01-20 14:31:52</td>
<td align="right">15</td>
</tr>
<tr class="odd">
<td align="left">Haus B</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">14</td>
</tr>
<tr class="even">
<td align="left">UrbanGarden</td>
<td align="left">2023-02-02 19:27:40</td>
<td align="left">2023-02-18 14:50:19</td>
<td align="right">14</td>
</tr>
<tr class="odd">
<td align="left">Соседи по воздуху</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2023-01-27 09:50:43</td>
<td align="right">14</td>
</tr>
<tr class="even">
<td align="left">PIE</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">13</td>
</tr>
<tr class="odd">
<td align="left">RB-DSJ</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">13</td>
</tr>
<tr class="even">
2 years ago
<td align="left">co2mofetten</td>
2 years ago
<td align="left">2022-03-30 11:25:43</td>
2 years ago
<td align="left">2023-01-17 07:38:21</td>
2 years ago
<td align="right">12</td>
</tr>
<tr class="odd">
2 years ago
<td align="left">Sofia</td>
<td align="left">2022-03-30 11:25:43</td>
2 years ago
<td align="left">2022-03-30 11:25:43</td>
<td align="right">12</td>
</tr>
<tr class="even">
<td align="left">Haus D</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">11</td>
</tr>
<tr class="odd">
2 years ago
<td align="left">home</td>
2 years ago
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">11</td>
</tr>
<tr class="even">
2 years ago
<td align="left">Netlight</td>
2 years ago
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">11</td>
</tr>
<tr class="odd">
<td align="left">#STROPDEAER</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2023-02-16 15:12:50</td>
<td align="right">10</td>
</tr>
<tr class="even">
<td align="left">AirAberdeen</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">10</td>
</tr>
<tr class="odd">
<td align="left">Balthasar-Neumann-Schule 1</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">10</td>
</tr>
<tr class="even">
<td align="left">Bestäuberprojekt</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">10</td>
</tr>
<tr class="odd">
<td align="left">Che Aria Tira?</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">10</td>
</tr>
<tr class="even">
2 years ago
<td align="left">dwih-sp</td>
2 years ago
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">10</td>
</tr>
<tr class="odd">
2 years ago
<td align="left">esri-de</td>
2 years ago
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">10</td>
</tr>
<tr class="even">
2 years ago
<td align="left">HBG Bonn</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
2 years ago
<td align="right">10</td>
</tr>
<tr class="odd">
2 years ago
<td align="left">IntegrA</td>
2 years ago
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">10</td>
</tr>
<tr class="even">
2 years ago
<td align="left">makerspace-partheland</td>
2 years ago
<td align="left">2022-03-30 11:25:43</td>
2 years ago
<td align="left">2023-02-20 18:34:50</td>
2 years ago
<td align="right">10</td>
</tr>
<tr class="odd">
2 years ago
<td align="left">Mikroklima H</td>
<td align="left">2022-05-07 17:29:00</td>
<td align="left">2022-05-07 17:47:42</td>
2 years ago
<td align="right">10</td>
</tr>
<tr class="even">
<td align="left">montorioveronese.it</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-12-29 07:45:57</td>
<td align="right">10</td>
</tr>
<tr class="odd">
<td align="left">ATSO</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">9</td>
</tr>
<tr class="even">
2 years ago
<td align="left">clevermint</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
2 years ago
<td align="right">9</td>
</tr>
<tr class="odd">
2 years ago
<td align="left">Fläming</td>
<td align="left">2022-08-15 19:16:48</td>
<td align="left">2022-12-13 06:29:22</td>
2 years ago
<td align="right">9</td>
</tr>
<tr class="even">
2 years ago
<td align="left">Mikroklima C-R</td>
2 years ago
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">9</td>
</tr>
<tr class="odd">
2 years ago
<td align="left">Ostroda</td>
2 years ago
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">9</td>
</tr>
<tr class="even">
2 years ago
<td align="left">RSS</td>
2 years ago
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">9</td>
</tr>
<tr class="odd">
<td align="left">test</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-12-18 22:20:34</td>
<td align="right">9</td>
</tr>
<tr class="even">
<td align="left">2</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2023-01-07 15:44:29</td>
<td align="right">8</td>
</tr>
<tr class="odd">
2 years ago
<td align="left">Data4City</td>
2 years ago
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">8</td>
</tr>
<tr class="even">
2 years ago
<td align="left">DBDS</td>
2 years ago
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">8</td>
</tr>
<tr class="odd">
<td align="left">IKG</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">8</td>
</tr>
<tr class="even">
<td align="left">IVKOWeek</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-07-05 09:42:31</td>
<td align="right">8</td>
</tr>
<tr class="odd">
<td align="left">Koerber-Stiftung</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">8</td>
</tr>
<tr class="even">
<td align="left">M7</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-11-28 13:00:44</td>
<td align="right">8</td>
</tr>
<tr class="odd">
<td align="left">Natlab Ökologie</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">8</td>
</tr>
<tr class="even">
<td align="left">PGKN</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">8</td>
</tr>
<tr class="odd">
<td align="left">Raumanmeri</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">8</td>
</tr>
<tr class="even">
<td align="left">stw</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="left">2022-03-30 11:25:43</td>
<td align="right">8</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div id="plot-rate-of-growth-and-inactivity-per-week" class="section level1">
<h1>Plot rate of growth and inactivity per week</h1>
<p>First we group the boxes by <code>createdAt</code> into bins of one
week:</p>
<div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a>bins <span class="ot">=</span> <span class="st">&#39;week&#39;</span></span>
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a>mvavg_bins <span class="ot">=</span> <span class="dv">6</span></span>
<span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb7-4"><a href="#cb7-4" aria-hidden="true" tabindex="-1"></a>growth <span class="ot">=</span> boxes <span class="sc">%&gt;%</span></span>
<span id="cb7-5"><a href="#cb7-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">mutate</span>(<span class="at">week =</span> <span class="fu">cut</span>(<span class="fu">as.Date</span>(createdAt), <span class="at">breaks =</span> bins)) <span class="sc">%&gt;%</span></span>
<span id="cb7-6"><a href="#cb7-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">group_by</span>(week) <span class="sc">%&gt;%</span></span>
<span id="cb7-7"><a href="#cb7-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">summarize</span>(<span class="at">count =</span> <span class="fu">length</span>(week)) <span class="sc">%&gt;%</span></span>
<span id="cb7-8"><a href="#cb7-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">mutate</span>(<span class="at">event =</span> <span class="st">&#39;registered&#39;</span>)</span></code></pre></div>
<p>We can do the same for <code>updatedAt</code>, which informs us about
the last change to a box, including uploaded measurements. This method
of determining inactive boxes is fairly inaccurate and should be
considered an approximation, because we have no information about
intermediate inactive phases. Also deleted boxes would probably have a
big impact here.</p>
<div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a>inactive <span class="ot">=</span> boxes <span class="sc">%&gt;%</span></span>
<span id="cb8-2"><a href="#cb8-2" aria-hidden="true" tabindex="-1"></a> <span class="co"># remove boxes that were updated in the last two days,</span></span>
<span id="cb8-3"><a href="#cb8-3" aria-hidden="true" tabindex="-1"></a> <span class="co"># b/c any box becomes inactive at some point by definition of updatedAt</span></span>
<span id="cb8-4"><a href="#cb8-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">filter</span>(updatedAt <span class="sc">&lt;</span> <span class="fu">now</span>() <span class="sc">-</span> <span class="fu">days</span>(<span class="dv">2</span>)) <span class="sc">%&gt;%</span></span>
<span id="cb8-5"><a href="#cb8-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">mutate</span>(<span class="at">week =</span> <span class="fu">cut</span>(<span class="fu">as.Date</span>(updatedAt), <span class="at">breaks =</span> bins)) <span class="sc">%&gt;%</span></span>
<span id="cb8-6"><a href="#cb8-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">group_by</span>(week) <span class="sc">%&gt;%</span></span>
<span id="cb8-7"><a href="#cb8-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">summarize</span>(<span class="at">count =</span> <span class="fu">length</span>(week)) <span class="sc">%&gt;%</span></span>
<span id="cb8-8"><a href="#cb8-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">mutate</span>(<span class="at">event =</span> <span class="st">&#39;inactive&#39;</span>)</span></code></pre></div>
<p>Now we can combine both datasets for plotting:</p>
<div class="sourceCode" id="cb9"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a>boxes_by_date <span class="ot">=</span> <span class="fu">bind_rows</span>(growth, inactive) <span class="sc">%&gt;%</span> <span class="fu">group_by</span>(event)</span>
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb9-3"><a href="#cb9-3" aria-hidden="true" tabindex="-1"></a><span class="fu">ggplot</span>(boxes_by_date, <span class="fu">aes</span>(<span class="at">x =</span> <span class="fu">as.Date</span>(week), <span class="at">colour =</span> event)) <span class="sc">+</span></span>
<span id="cb9-4"><a href="#cb9-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">xlab</span>(<span class="st">&#39;Time&#39;</span>) <span class="sc">+</span> <span class="fu">ylab</span>(<span class="fu">paste</span>(<span class="st">&#39;rate per &#39;</span>, bins)) <span class="sc">+</span></span>
<span id="cb9-5"><a href="#cb9-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">scale_x_date</span>(<span class="at">date_breaks=</span><span class="st">&quot;years&quot;</span>, <span class="at">date_labels=</span><span class="st">&quot;%Y&quot;</span>) <span class="sc">+</span></span>
<span id="cb9-6"><a href="#cb9-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">scale_colour_manual</span>(<span class="at">values =</span> <span class="fu">c</span>(<span class="at">registered =</span> <span class="st">&#39;lightgreen&#39;</span>, <span class="at">inactive =</span> <span class="st">&#39;grey&#39;</span>)) <span class="sc">+</span></span>
<span id="cb9-7"><a href="#cb9-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">geom_point</span>(<span class="fu">aes</span>(<span class="at">y =</span> count), <span class="at">size =</span> <span class="fl">0.5</span>) <span class="sc">+</span></span>
<span id="cb9-8"><a href="#cb9-8" aria-hidden="true" tabindex="-1"></a> <span class="co"># moving average, make first and last value NA (to ensure identical length of vectors)</span></span>
<span id="cb9-9"><a href="#cb9-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">geom_line</span>(<span class="fu">aes</span>(<span class="at">y =</span> <span class="fu">rollmean</span>(count, mvavg_bins, <span class="at">fill =</span> <span class="fu">list</span>(<span class="cn">NA</span>, <span class="cn">NULL</span>, <span class="cn">NA</span>))))</span></code></pre></div>
2 years ago
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqAAAAHgCAMAAABNUi8GAAAA8FBMVEUAAAAAADoAAGYAOmYAOpAAZpAAZrYzMzM6AAA6ADo6AGY6OmY6OpA6kNtNTU1NTW5NTY5NbqtNjshmAABmADpmAGZmOgBmOjpmtv9uTU1uTW5uTY5ubo5ubqtuq8huq+SOTU2OTW6OTY6Obk2ObquOyP+QOgCQOjqQOmaQZgCQkNuQtpCQ27aQ2/+Q7pCrbk2rbm6rjk2ryKur5OSr5P+2ZgC225C22/+2/9u2//++vr7Ijk3I///bkDrb25Db/7bb/9vb///kq27k///r6+vy8vL/tmb/yI7/25D/27b/5Kv//7b//8j//9v//+T///9ZxmD/AAAACXBIWXMAAA7DAAAOwwHHb6hkAAAX70lEQVR4nO2dDVvbaHqFmWyakGniGZLZKZk0zUcXpu00sG3JtCHQ3UAKrGPQ//831ZeNJcuP9Uq2n1vSOVeCsH14OTq+eSUZS+xEkgTWjncASbIkQCW0BKiElgCV0BKgEloCVEKrFaBfiyrfXlSPHJAYW1pZPwnQhg5IDAFqyaMrigMSQ4Ba8uiK4oDEGDKg45ejH8+iaPJ2tHdZXmTy6IrigMQYMKCTdyfRxd7l3fFBdPE8Ki5yeXRFcUBiDBjQ8evLaPL+LP4XjV+VFrnFoyuKAxJjwIDmM2jK6buT4iJ++HGs7cWUhipjHzTb3bzeS5EsLnKHxw8zxQGJMeAZdPzLSXT949myGTSRR1cUByTGgAHNJ0vtg6JjDBjQfAa9O36THb7PL3J5dEVxQGIMGNDoejT64USvg7JjDBnQ1fLoiuKAxBCgljy6ojggMQSoJY+uKA5IDAFqyaMrigMSQ4Ba8uiK4oDEEKCWPLqiOCAxyo6jo018l3XR1kACtKEDEkOAWlp/E91xQGJoE2/JoyuKAxJDgFry6IrigMQ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Tz5JH0fx82T33bjie5mN+RwZqn0MlNDBySGJ6DpVBZvcJNtbkzp9ObNbnw75nX9M6gADXBAYngCmoISE5OQGP+f3dzdT7fvG9jE63XQ+g5IDE9Az7N3Zz5LtvHJRJrfTMHcDKB6HbS+AxLDFdDp4fTVw79mjKa3NglooDy6ojggMVw38dPT17799Nv3n2Y3Nwdo4BlJAnQwjuqn//YwnjNTLD/uPLq/OQU0OZ5pr8IMmrxOEHDGhwAdimPJ85/wkk6bV+nMlt+cApph21aLm/jbQx3FdxfQ09NNfJf2nDVWGdD4MKn+xLz+JrrjgMQYFqDxHF3/95yRAB2MY83Qhaj0Qn3YF3t0RXFAYgwK0ORoTDNoTQckxsAATS7PpH3QWg5IjMEBGuujjuIFaMngp9LV7XaCftfp0RXFAYkxKEC/vQh8A59HVxQHJIYnoP9XreYwVkm/i2/ogMQQoJY8uqI4IDGGDejd8UEUTd6O9i7LCwEKiTFsQC9GBymkF89LCwFKiTFoQMf/+M8H0eT9WTR+dVZcCFBKjCEDevfn/4rny/Hry2jy7qS4iB99HGu9UaSOyRvQizfJBv16L0WyuMgdHj/MFAckxoBn0HiyvDNmUAE6IAcE0NvD+V/DX4wSvdE+KDoGF9Cb7yt/Yx7fveSR1YAuvN0umUHvjt9kh+/zCwFKicEFdImC6IwWzosvvtlOr4PiYzAAPT2tnEFvnv5reoJG8h6P/fRX6d/9+4udB79///vTL9Htrx/iO1a+Man0u3j9naS6DkgMX0BPF1QEdPdZdPXwy7efPiS3kj3Iq4f/m2zi/+fX+J6nXz4+i85XnVenX3U2dEBiMGbQJfugyeY836R/+2O+65ndfR6j+SwBN75fgG7EAYmxXkfFKXeZoSWgH5PNcjxlzu6+efrXdAu/
2 years ago
<p>We see a sudden rise in early 2017, which lines up with the fast
growing grouptag <code>Luftdaten</code>. This was enabled by an
integration of openSenseMap.org into the firmware of the air quality
monitoring project <a href="https://sensor.community/de/">luftdaten.info</a>. The dips in mid
2017 and early 2018 could possibly be explained by production/delivery
issues of the senseBox hardware, but I have no data on the exact time
frames to verify.</p>
</div>
<div id="plot-duration-of-boxes-being-active" class="section level1 tabset">
<h1 class="tabset">Plot duration of boxes being active</h1>
<p>While we are looking at <code>createdAt</code> and
<code>updatedAt</code>, we can also extract the duration of activity of
each box, and look at metrics by exposure and grouptag once more:</p>
<div id="by-exposure" class="section level2">
<h2>…by exposure</h2>
<div class="sourceCode" id="cb10"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a>duration <span class="ot">=</span> boxes <span class="sc">%&gt;%</span></span>
<span id="cb10-2"><a href="#cb10-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">group_by</span>(exposure) <span class="sc">%&gt;%</span></span>
<span id="cb10-3"><a href="#cb10-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">filter</span>(<span class="sc">!</span><span class="fu">is.na</span>(updatedAt)) <span class="sc">%&gt;%</span></span>
<span id="cb10-4"><a href="#cb10-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">mutate</span>(<span class="at">duration =</span> <span class="fu">difftime</span>(updatedAt, createdAt, <span class="at">units=</span><span class="st">&#39;days&#39;</span>))</span>
<span id="cb10-5"><a href="#cb10-5" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb10-6"><a href="#cb10-6" aria-hidden="true" tabindex="-1"></a><span class="fu">ggplot</span>(duration, <span class="fu">aes</span>(<span class="at">x =</span> exposure, <span class="at">y =</span> duration)) <span class="sc">+</span></span>
<span id="cb10-7"><a href="#cb10-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">geom_boxplot</span>() <span class="sc">+</span></span>
<span id="cb10-8"><a href="#cb10-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">coord_flip</span>() <span class="sc">+</span> <span class="fu">ylab</span>(<span class="st">&#39;Duration active in Days&#39;</span>)</span></code></pre></div>
2 years ago
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqAAAAHgCAMAAABNUi8G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etfdMc5tkBLNf3cnWCXuXf0tne20yYZwewXN/LNQgaviHJghKW63u5OkFvDncunnwIJ3oLGv1yfS9XJ2jy+cXW9trv01vQHmKRCKoZeVx/DjeOWdCH8saPMVJiytULetru98Vjnh3Acn0vVyvoabh+b/Eni2CeHcByfS9XJ2jxbcd+m4mwXN/LWVA1xkiJKVcnqE/x62CMlJhytYL6ImkNjJESU65eUMnI4/pzuHHMgj6UN36MkRJTrl7Q7BS/7k8Qk8f153DjWCSC+iJpDYyRElOuTlC/zbQOxkiJKWdB1RgjJaZcnaBJ+NugPsX3OiWmXJ2g5Q8PW/PnhzUuu8pPBRHV7BBjpMSUqxNUNI3LFj+AyYLysDgEvflfC/p4jJESU65O0OLV582/t3SRZEGxWByCJhdbz35Mf2vrKt6CYrFIBM0vk9b8pk4L2kMsFkHD93Wu+5eZLGgPsUgEvTnc2s5O8xY0+uX6Xq5O0KvX+Rv1fg0KWK7v5WoF/UV++0cLGv9yfS9XJ6hoGpe1oFgsFkFPt7b21v4HOxuXtaBYLBJBT579Nf8JjBY0+uX6Xq5O0OzHL+6199ftLCgWs6At1ewQY6TElKsTNDkNp/j2/j6oBcVikQiaXLT6ffEWFIvFIqhkGpe1oFjMgrZUs0OMkRJTzoKqMUZKTDkLqsYYKTHlLKgaY6TElLOgaoyRElPOgqoxRkpMOQuqxhgpMeUsqBpjpMSUs6BqjJESU86CqjFGSkw5C6rGGCkx5SyoGmOkxJSzoGqMkRJTzoKqMUZKTDkL
<p>The time of activity averages at only 158 days, though there are
boxes with 2394 days of activity, spanning a large chunk of
2 years ago
openSenseMaps existence.</p>
</div>
<div id="by-grouptag" class="section level2">
<h2>…by grouptag</h2>
<div class="sourceCode" id="cb11"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a>duration <span class="ot">=</span> boxes <span class="sc">%&gt;%</span></span>
<span id="cb11-2"><a href="#cb11-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">group_by</span>(grouptag) <span class="sc">%&gt;%</span></span>
<span id="cb11-3"><a href="#cb11-3" aria-hidden="true" tabindex="-1"></a> <span class="co"># only include grouptags with 8 or more members</span></span>
<span id="cb11-4"><a href="#cb11-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">filter</span>(<span class="fu">length</span>(grouptag) <span class="sc">&gt;=</span> <span class="dv">8</span> <span class="sc">&amp;</span> <span class="sc">!</span><span class="fu">is.na</span>(grouptag) <span class="sc">&amp;</span> <span class="sc">!</span><span class="fu">is.na</span>(updatedAt)) <span class="sc">%&gt;%</span></span>
<span id="cb11-5"><a href="#cb11-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">mutate</span>(<span class="at">duration =</span> <span class="fu">difftime</span>(updatedAt, createdAt, <span class="at">units=</span><span class="st">&#39;days&#39;</span>))</span>
<span id="cb11-6"><a href="#cb11-6" aria-hidden="true" tabindex="-1"></a> </span>
<span id="cb11-7"><a href="#cb11-7" aria-hidden="true" tabindex="-1"></a><span class="fu">ggplot</span>(duration, <span class="fu">aes</span>(<span class="at">x =</span> grouptag, <span class="at">y =</span> duration)) <span class="sc">+</span></span>
<span id="cb11-8"><a href="#cb11-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">geom_boxplot</span>() <span class="sc">+</span></span>
<span id="cb11-9"><a href="#cb11-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">coord_flip</span>() <span class="sc">+</span> <span class="fu">ylab</span>(<span class="st">&#39;Duration active in Days&#39;</span>)</span></code></pre></div>
2 years ago
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqAAAAHgCAIAAAD17khjAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAgAElEQVR4nOy9UYzbVprv+c9gbKBThTiFxNZgKI5FY9s9N6ndBIZjotTRNti4C/sa3Yy3QdfOCBsZHSSA6Xlg6yH1EAWYukAzD9ULsAXshgU4SNBsQHNRJrIOs8iUMReXuFdp1dI2CglQcXe7gVDdLDa2UglsBy43Y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F+oz3t5na3IXr4sMcsrsSbf3sbV9bxl8b6pyO+J9nNhLTzffF02bn8LEOeOkmVNBxn0Xg/eLapfqSRDfTwlTly8t7mkzbe3G1vqJibw4tEdP57NEEe+2XnThGJtoc+kh3R6mPQhU4advxr0AEYVPiu4xoIT/umbc42kry3YNQcA/KWqK2R54m2F7AvR+brnxy/3TfXyAwiv8AAY6SS3hnGELw4MewjY+NNa2Am/uZODz3PRCO2ySJgN1gx874tx+92fBUfFN0wfwNqfNhpZdW492P4z2Q4t4rvdvXlCoc+kh3R6mPQhU0YAOoPvF3zRKrVPn9OKABIU5wp6mXjtmYIiyzYAdU4QONdbBfaRa31Tkb0fFQ6GCj6cnin8X7IhRylrhDBlnTRTUOQwu80kt+atAmkA61/EisHtmwBuASngFjYAAGN3sX6XnBwPbwrA/YLVLYvBJz8T5+vfxAbfW5HdIzUsQyFy2eVB9ul2Q/Got2YbJnRqQqvJ7RBqxUCgDr6PtE+f06hGG1zDA8VisfWSKVORvXy5yKMIAP4kg1vXFdl1gd+z
2 years ago
<div class="sourceCode" id="cb12"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a>duration <span class="sc">%&gt;%</span></span>
<span id="cb12-2"><a href="#cb12-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">summarize</span>(</span>
<span id="cb12-3"><a href="#cb12-3" aria-hidden="true" tabindex="-1"></a> <span class="at">duration_avg =</span> <span class="fu">round</span>(<span class="fu">mean</span>(duration)),</span>
<span id="cb12-4"><a href="#cb12-4" aria-hidden="true" tabindex="-1"></a> <span class="at">duration_min =</span> <span class="fu">round</span>(<span class="fu">min</span>(duration)),</span>
<span id="cb12-5"><a href="#cb12-5" aria-hidden="true" tabindex="-1"></a> <span class="at">duration_max =</span> <span class="fu">round</span>(<span class="fu">max</span>(duration)),</span>
<span id="cb12-6"><a href="#cb12-6" aria-hidden="true" tabindex="-1"></a> <span class="at">oldest_box =</span> <span class="fu">round</span>(<span class="fu">max</span>(<span class="fu">difftime</span>(<span class="fu">now</span>(), createdAt, <span class="at">units=</span><span class="st">&#39;days&#39;</span>)))</span>
<span id="cb12-7"><a href="#cb12-7" aria-hidden="true" tabindex="-1"></a> ) <span class="sc">%&gt;%</span></span>
<span id="cb12-8"><a href="#cb12-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">arrange</span>(<span class="fu">desc</span>(duration_avg))</span></code></pre></div>
<div class="kable-table">
<table style="width:100%;">
<colgroup>
<col width="35%" />
<col width="16%" />
<col width="16%" />
<col width="16%" />
<col width="14%" />
</colgroup>
<thead>
<tr class="header">
<th align="left">grouptag</th>
<th align="left">duration_avg</th>
<th align="left">duration_min</th>
<th align="left">duration_max</th>
<th align="left">oldest_box</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td align="left">Ostroda</td>
2 years ago
<td align="left">335 days</td>
<td align="left">335 days</td>
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="even">
<td align="left">Mikroklima C-R</td>
2 years ago
<td align="left">332 days</td>
2 years ago
<td align="left">321 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="odd">
<td align="left">Apeldoorn</td>
2 years ago
<td align="left">331 days</td>
2 years ago
<td align="left">263 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="even">
<td align="left">freshairbromley</td>
2 years ago
<td align="left">304 days</td>
<td align="left">28 days</td>
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="odd">
<td align="left">Mikroklima</td>
2 years ago
<td align="left">283 days</td>
2 years ago
<td align="left">42 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="even">
<td align="left">Mikroklima H</td>
2 years ago
<td align="left">283 days</td>
2 years ago
<td align="left">229 days</td>
2 years ago
<td align="left">297 days</td>
<td align="left">305 days</td>
2 years ago
</tr>
<tr class="odd">
<td align="left">Smart City MS</td>
<td align="left">272 days</td>
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="even">
<td align="left">Feinstaub</td>
2 years ago
<td align="left">223 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="odd">
2 years ago
<td align="left">makerspace-partheland</td>
<td align="left">217 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="even">
2 years ago
<td align="left">co2mofetten</td>
<td align="left">213 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">334 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="odd">
<td align="left">Luftdaten</td>
2 years ago
<td align="left">211 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="even">
<td align="left">luftdaten.info</td>
2 years ago
<td align="left">200 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="odd">
<td align="left">Burgermeetnet</td>
2 years ago
<td align="left">190 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="even">
<td align="left">esri-de</td>
2 years ago
<td align="left">190 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="odd">
<td align="left">#stropdeaer</td>
2 years ago
<td align="left">187 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="even">
<td align="left">Sofia</td>
2 years ago
<td align="left">172 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="odd">
<td align="left">WAUW!denberg</td>
2 years ago
<td align="left">168 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="even">
<td align="left">KJR-M</td>
2 years ago
<td align="left">167 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="odd">
<td align="left">IKG</td>
2 years ago
<td align="left">163 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="even">
<td align="left">AirAberdeen</td>
2 years ago
<td align="left">155 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="odd">
<td align="left">M7</td>
2 years ago
<td align="left">155 days</td>
<td align="left">92 days</td>
2 years ago
<td align="left">243 days</td>
2 years ago
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="even">
<td align="left">1</td>
2 years ago
<td align="left">148 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="odd">
<td align="left">BurgerMeetnet</td>
2 years ago
<td align="left">141 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="even">
<td align="left">Luftdaten.info</td>
2 years ago
<td align="left">139 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="odd">
<td align="left">Bottrop-Feinstaub</td>
2 years ago
<td align="left">133 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="even">
2 years ago
<td align="left">cleanairfrome</td>
<td align="left">130 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="odd">
2 years ago
<td align="left">montorioveronese.it</td>
<td align="left">130 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="even">
2 years ago
<td align="left">stw</td>
<td align="left">130 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="odd">
<td align="left">RB-DSJ</td>
<td align="left">122 days</td>
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="even">
<td align="left">Mikroprojekt Mitmachklima</td>
2 years ago
<td align="left">118 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="odd">
2 years ago
<td align="left">BRGL</td>
<td align="left">113 days</td>
2 years ago
<td align="left">109 days</td>
2 years ago
<td align="left">114 days</td>
<td align="left">122 days</td>
2 years ago
</tr>
<tr class="even">
2 years ago
<td align="left">Luchtwachters Delft</td>
<td align="left">111 days</td>
<td align="left">0 days</td>
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="odd">
<td align="left">Fläming</td>
2 years ago
<td align="left">110 days</td>
2 years ago
<td align="left">23 days</td>
2 years ago
<td align="left">180 days</td>
<td align="left">205 days</td>
2 years ago
</tr>
<tr class="even">
<td align="left">BRGW</td>
2 years ago
<td align="left">109 days</td>
2 years ago
<td align="left">98 days</td>
2 years ago
<td align="left">118 days</td>
<td align="left">126 days</td>
2 years ago
</tr>
<tr class="odd">
<td align="left">PIE</td>
2 years ago
<td align="left">103 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="even">
<td align="left">Riga</td>
2 years ago
<td align="left">103 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="odd">
<td align="left">kerekdomb_</td>
<td align="left">100 days</td>
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="even">
<td align="left">luftdaten</td>
2 years ago
<td align="left">100 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="odd">
<td align="left">home</td>
2 years ago
<td align="left">95 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="even">
<td align="left">Bad_Hersfeld</td>
2 years ago
<td align="left">94 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="odd">
<td align="left">MSGB</td>
2 years ago
<td align="left">94 days</td>
2 years ago
<td align="left">50 days</td>
2 years ago
<td align="left">106 days</td>
<td align="left">114 days</td>
</tr>
<tr class="even">
<td align="left">dwih-sp</td>
<td align="left">92 days</td>
<td align="left">0 days</td>
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="odd">
<td align="left">AGIN</td>
2 years ago
<td align="left">91 days</td>
2 years ago
<td align="left">87 days</td>
2 years ago
<td align="left">92 days</td>
<td align="left">100 days</td>
2 years ago
</tr>
<tr class="even">
<td align="left">HTLJ</td>
2 years ago
<td align="left">91 days</td>
2 years ago
<td align="left">58 days</td>
2 years ago
<td align="left">99 days</td>
<td align="left">107 days</td>
2 years ago
</tr>
<tr class="odd">
2 years ago
<td align="left">Соседи по воздуху</td>
<td align="left">87 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="even">
2 years ago
<td align="left">bad_hersfeld</td>
2 years ago
<td align="left">84 days</td>
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="odd">
<td align="left">Captographies</td>
2 years ago
<td align="left">82 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">648 days</td>
<td align="left">656 days</td>
2 years ago
</tr>
<tr class="even">
<td align="left">Save Dnipro</td>
2 years ago
<td align="left">75 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="odd">
<td align="left">PGKN</td>
2 years ago
<td align="left">68 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="even">
<td align="left">MSHO</td>
2 years ago
<td align="left">61 days</td>
2 years ago
<td align="left">36 days</td>
2 years ago
<td align="left">70 days</td>
<td align="left">78 days</td>
</tr>
<tr class="odd">
<td align="left">Netlight</td>
<td align="left">61 days</td>
<td align="left">0 days</td>
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="even">
2 years ago
<td align="left">#STROPDEAER</td>
<td align="left">55 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="odd">
2 years ago
<td align="left">Futurium</td>
<td align="left">54 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="even">
<td align="left">test</td>
2 years ago
<td align="left">54 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="odd">
<td align="left">ifgi</td>
2 years ago
<td align="left">52 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="even">
2 years ago
<td align="left">MSIN</td>
<td align="left">52 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">79 days</td>
<td align="left">107 days</td>
2 years ago
</tr>
<tr class="odd">
2 years ago
<td align="left">2</td>
<td align="left">50 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">331 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="even">
2 years ago
<td align="left">ATSO</td>
<td align="left">48 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">279 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="odd">
<td align="left">MakeLight</td>
2 years ago
<td align="left">47 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="even">
<td align="left">Haus B</td>
<td align="left">44 days</td>
<td align="left">0 days</td>
<td align="left">239 days</td>
2 years ago
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="odd">
<td align="left">Futurium 2021</td>
<td align="left">43 days</td>
<td align="left">0 days</td>
<td align="left">329 days</td>
2 years ago
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="even">
2 years ago
<td align="left">DBDS</td>
2 years ago
<td align="left">42 days</td>
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="odd">
2 years ago
<td align="left">IVKOWeek</td>
<td align="left">42 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="even">
2 years ago
<td align="left">PMSI</td>
<td align="left">38 days</td>
<td align="left">38 days</td>
<td align="left">38 days</td>
<td align="left">47 days</td>
2 years ago
</tr>
<tr class="odd">
<td align="left">edu</td>
2 years ago
<td align="left">37 days</td>
2 years ago
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="even">
2 years ago
<td align="left">GIZ Clean Air Day Project</td>
<td align="left">37 days</td>
<td align="left">0 days</td>
<td align="left">335 days</td>
<td align="left">343 days</td>
</tr>
<tr class="odd">
2 years ago
<td align="left">TKS Bonn</td>
<td align="left">32 days</td>
<td align="left">0 days</td>
2 years ago
<td align="left">335 days</td>
<td align="left">343 days</td>
2 years ago
</tr>
2 years ago
<tr class="even">
2 years ago
<td align="left">HU Explorers</td>
<td align="left">28 days</td>
<td align="left">0 days</td>
<td align="left">319 days</td>
2 years ago
<td align="left">343 days</td>
2 years ago
</tr>
2 years ago
<tr class="odd">
2 years ago
<td align="left">321heiss</td>
<td align="left">24 days</td>
<td align="left">0 days</td>
<td align="left">43 days</td>
2 years ago
<td align="left">254 days</td>
2 years ago
</tr>
2 years ago
<tr class="even">
2 years ago
<td align="left">SUGUCS</td>
<td align="left">9 days</td>
<td align="left">0 days</td>
<td align="left">53 days</td>
2 years ago
<td align="left">98 days</td>
2 years ago
</tr>
2 years ago
<tr class="odd">
2 years ago
<td align="left">APPI</td>
<td align="left">3 days</td>
<td align="left">0 days</td>
<td align="left">7 days</td>
2 years ago
<td align="left">41 days</td>
2 years ago
</tr>
2 years ago
<tr class="even">
2 years ago
<td align="left">MSKE</td>
<td align="left">3 days</td>
<td align="left">0 days</td>
<td align="left">7 days</td>
2 years ago
<td align="left">62 days</td>
2 years ago
</tr>
<tr class="odd">
<td align="left">RSS</td>
<td align="left">3 days</td>
<td align="left">0 days</td>
<td align="left">28 days</td>
2 years ago
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="even">
<td align="left">CS:iDrop</td>
<td align="left">2 days</td>
<td align="left">0 days</td>
<td align="left">36 days</td>
2 years ago
<td align="left">57 days</td>
2 years ago
</tr>
<tr class="odd">
<td align="left">UrbanGarden</td>
<td align="left">2 days</td>
<td align="left">0 days</td>
2 years ago
<td align="left">16 days</td>
<td align="left">34 days</td>
2 years ago
</tr>
<tr class="even">
<td align="left">Balthasar-Neumann-Schule 1</td>
<td align="left">0 days</td>
<td align="left">0 days</td>
<td align="left">0 days</td>
2 years ago
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="odd">
<td align="left">Bestäuberprojekt</td>
<td align="left">0 days</td>
<td align="left">0 days</td>
<td align="left">0 days</td>
2 years ago
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="even">
<td align="left">Che Aria Tira?</td>
<td align="left">0 days</td>
<td align="left">0 days</td>
<td align="left">0 days</td>
2 years ago
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="odd">
2 years ago
<td align="left">clevermint</td>
2 years ago
<td align="left">0 days</td>
<td align="left">0 days</td>
<td align="left">0 days</td>
2 years ago
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="even">
2 years ago
<td align="left">Data4City</td>
2 years ago
<td align="left">0 days</td>
<td align="left">0 days</td>
<td align="left">0 days</td>
2 years ago
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="odd">
<td align="left">Haus C</td>
<td align="left">0 days</td>
<td align="left">0 days</td>
<td align="left">0 days</td>
2 years ago
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="even">
<td align="left">Haus D</td>
<td align="left">0 days</td>
<td align="left">0 days</td>
<td align="left">0 days</td>
2 years ago
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="odd">
2 years ago
<td align="left">HBG Bonn</td>
2 years ago
<td align="left">0 days</td>
<td align="left">0 days</td>
<td align="left">0 days</td>
2 years ago
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="even">
2 years ago
<td align="left">IntegrA</td>
2 years ago
<td align="left">0 days</td>
<td align="left">0 days</td>
<td align="left">0 days</td>
2 years ago
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="odd">
2 years ago
<td align="left">Koerber-Stiftung</td>
2 years ago
<td align="left">0 days</td>
<td align="left">0 days</td>
<td align="left">0 days</td>
2 years ago
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="even">
2 years ago
<td align="left">Natlab Ökologie</td>
2 years ago
<td align="left">0 days</td>
<td align="left">0 days</td>
<td align="left">0 days</td>
2 years ago
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="odd">
2 years ago
<td align="left">Raumanmeri</td>
2 years ago
<td align="left">0 days</td>
<td align="left">0 days</td>
<td align="left">0 days</td>
2 years ago
<td align="left">343 days</td>
2 years ago
</tr>
<tr class="even">
2 years ago
<td align="left">SekSeeland</td>
2 years ago
<td align="left">0 days</td>
<td align="left">0 days</td>
<td align="left">0 days</td>
2 years ago
<td align="left">343 days</td>
2 years ago
</tr>
</tbody>
</table>
</div>
2 years ago
<p>The time of activity averages at only 90 days, though there are boxes
with 648 days of activity, spanning a large chunk of openSenseMaps
2 years ago
existence.</p>
</div>
<div id="by-year-of-registration" class="section level2">
<h2>…by year of registration</h2>
<p>This is less useful, as older boxes are active for a longer time by
definition. If you have an idea how to compensate for that, please send
a <a href="https://github.com/sensebox/opensensmapr/pulls">Pull
Request</a>!</p>
<div class="sourceCode" id="cb13"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="co"># </span><span class="al">NOTE</span><span class="co">: boxes older than 2016 missing due to missing updatedAt in database</span></span>
<span id="cb13-2"><a href="#cb13-2" aria-hidden="true" tabindex="-1"></a>duration <span class="ot">=</span> boxes <span class="sc">%&gt;%</span></span>
<span id="cb13-3"><a href="#cb13-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">mutate</span>(<span class="at">year =</span> <span class="fu">cut</span>(<span class="fu">as.Date</span>(createdAt), <span class="at">breaks =</span> <span class="st">&#39;year&#39;</span>)) <span class="sc">%&gt;%</span></span>
<span id="cb13-4"><a href="#cb13-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">group_by</span>(year) <span class="sc">%&gt;%</span></span>
<span id="cb13-5"><a href="#cb13-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">filter</span>(<span class="sc">!</span><span class="fu">is.na</span>(updatedAt)) <span class="sc">%&gt;%</span></span>
<span id="cb13-6"><a href="#cb13-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">mutate</span>(<span class="at">duration =</span> <span class="fu">difftime</span>(updatedAt, createdAt, <span class="at">units=</span><span class="st">&#39;days&#39;</span>))</span>
<span id="cb13-7"><a href="#cb13-7" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb13-8"><a href="#cb13-8" aria-hidden="true" tabindex="-1"></a><span class="fu">ggplot</span>(duration, <span class="fu">aes</span>(<span class="at">x =</span> <span class="fu">substr</span>(<span class="fu">as.character</span>(year), <span class="dv">0</span>, <span class="dv">4</span>), <span class="at">y =</span> duration)) <span class="sc">+</span></span>
<span id="cb13-9"><a href="#cb13-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">geom_boxplot</span>() <span class="sc">+</span></span>
<span id="cb13-10"><a href="#cb13-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">coord_flip</span>() <span class="sc">+</span> <span class="fu">ylab</span>(<span class="st">&#39;Duration active in Days&#39;</span>) <span class="sc">+</span> <span class="fu">xlab</span>(<span class="st">&#39;Year of Registration&#39;</span>)</span></code></pre></div>
2 years ago
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqAAAAHgCAMAAABNUi8GAAAA0lBMVEUAAAAAADoAAGYAOpAAZrYzMzM6AAA6ADo6AGY6kNtNTU1NTW5NTY5NbqtNjshmAABmADpmOpBmkJBmtrZmtv9uTU1uTW5uTY5ubqtuq8huq+SOTU2OTW6OTY6ObquOyP+QOgCQkDqQtpCQ27aQ29uQ2/+rbk2rbm6rbo6rjk2ryKur5P+2ZgC2kDq22/+2/9u2///Ijk3I///bkDrbkJDb/7bb/9vb///kq27k///r6+v/tmb/yI7/25D/27b/29v/5Kv//7b//8j//9v//+T///8ZJaI/AAAACXBIWXMAAA7DAAAOwwHHb6hkAAAY4UlEQVR4nO2dC3vbOHqFncT2rpVksm3tbOrMVO628bRjt42jbiepla5ii///L5UgCd1J8IIPHyi859lNhraOziHwhhdZMk4yhCLWiXYBhJoEoChqASiKWgCKohaAoqgFoChqDQL0f+vV9L1m9XaOKZKuLiOAqkbS1WUEUNVIurqMAKoaSVeXEU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f/h0j/brVUKEgABU18obloQJQUSOADhWAihr9Ahru94PWUKEgABU1cgQdKgAVNQLoUAGoqFHgddCOv4CxX7caKhQEoKJG/0dQu06S+XlSG/XrVkOFggBU1Cj4huWWP0zq162GCgUBqKgRQIcKQEWNcqf4tp8/7tethgoFAaioUeAu/tHcIV1ms5a/nqlfN48fqBBSl4HsJwB1GQ8D2lES3cY2kIGNyXQFUNVIurqMhwGd5Sf4Dr//RqLb2AYysDGZrgcBvX/11/JN9QAaqzGZrocALd4vcin+
2 years ago
</div>
</div>
<div id="more-visualisations" class="section level1">
<h1>More Visualisations</h1>
<p>Other visualisations come to mind, and are left as an exercise to the
reader. If you implemented some, feel free to add them to this vignette
via a <a href="https://github.com/sensebox/opensensmapr/pulls">Pull
Request</a>.</p>
<ul>
<li>growth by phenomenon</li>
<li>growth by location -&gt; (interactive) map</li>
<li>set inactive rate in relation to total box count</li>
<li>filter timespans with big dips in growth rate, and extrapolate the
amount of senseBoxes that could be on the platform today, assuming there
were no production issues ;)</li>
</ul>
</div>
<!-- code folding -->
<!-- dynamically load mathjax for compatibility with self-contained -->
<script>
(function () {
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
document.getElementsByTagName("head")[0].appendChild(script);
})();
</script>
</body>
</html>