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_revised.html

2474 lines
1.3 MiB
HTML

1 year 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="author" content="Jan Stenkamp" />
<meta name="date" content="2023-03-08" />
1 year ago
<title>Visualising the Development of openSenseMap.org in 2022</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>
<script>/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}S.fn=S.prototype={jquery:f,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(n){return this.pushStack(S.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},S.extend=S.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[t]=S.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},S.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=v.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(p(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(p(Object(e))?S.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(p(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:y}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=t[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var d=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,S="sizzle"+1*new Date,p=n.document,k=0,r=0,m=ue(),x=ue(),A=ue(),N=ue(),j=function(e,t){return e===t&&(l=!0),0},D={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e
</script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type="text/css">@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 300;
src: url(data:font/ttf;base64,AAEAAAARAQAABAAQR0RFRgNEA3IAAG+kAAAAQEdQT1PXveeXAABv5AAAGWRHU1VC8WfWVwAAiUgAAADgT1MvMlpQkwsAAGZkAAAAYGNtYXDzMPm1AABmxAAAAeZjdnQgDXMAuAAAamwAAAAoZnBnbQZZnDcAAGisAAABc2dhc3D//wADAABvnAAAAAhnbHlm4G/pBAAAARwAAF8kaGVhZP4Fs/YAAGJEAAAANmhoZWEHlAOiAABmQAAAACRobXR4l6Yq6AAAYnwAAA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QAB9LgAABC5ABYAAfQwMRMzMh4CFRQGKwERIxMyNjU0LgIrARFhtDdXPSB8b4YuqWViGTFLMnsCkxMsRjNhX/7lAUJIUSo3Ig7+1gAAAgA3/2UCWAKfABMANABLALgAAEVYuAAkLxu5ACQAED5ZuAAARVi4ABovG7kAGgAEPlm7ADEAAQAXAAQruAAaELkABQAB9LgAJBC5AA8AAfS4ABoQuAAu0DAxExQeAjMyPgI1NC4CIyIOAgEOASMiJicuAzU0PgIzMh4CFRQOAgceATMyNjdnIDpTMjJSOyAgO1IyMlM6IAHxDSsZU28ZNlpBJChIZDs8ZEgoJEFbNxdXPhcfDQFMRXFPLCxPcUVEbk0qKk1u/eAEB1I+BTVZekpOfVkvL1l9Tkp6WTUFMjQFBAAAAgBhAAACAwKTAAgAGABUALgAAEVYuAAOLxu5AA4AED5ZuAAARVi4AAwvG7kADAAEPlm4AABFWLgACS8buQAJAAQ+WbsAAAABAAoAB
}
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 400;
src: url(data:font/ttf;base64,AAEAAAARAQAABAAQR0RFRgNEA3IAAG5oAAAAQEdQT1PUveN5AABuqAAAGXBHU1VC8WfWVwAAiBgAAADgT1MvMlq0lFsAAGUsAAAAYGNtYXDzMPm1AABljAAAAeZjdnQgDZkA+gAAaTQAAAAoZnBnbQZZnDcAAGd0AAABc2dhc3D//wADAABuYAAAAAhnbHlmIymUiAAAARwAAF3saGVhZP4Us+IAAGEMAAAANmhoZWEHowOhAABlCAAAACRobXR4pqgmOgAAYUQAAAPEbG9jYTiIUNQAAF8oAAAB5G1heHADCwJAAABfCAAAACBuYW1lIro8MAAAaVwAAAHGcG9zdGxQSG8AAGskAAADOXByZXCWBPrrAABo6AAAAEsABQBZAAACNQKUAAMABgAJAA8AFQBnALgAAEVYuAAALxu5AAAAED5ZuAAARVi4AAIvG7kAAgAEPlm6AAUAAgAAERI5ugAGAAIAABESOboABwACAAAREjm6AAgAAgAAERI5uQAKAAH0ugANAAIAABESOb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RywsRzMcAekPMh1beh02WD8iKUpnPj5nSykhPVY0F1Q2FiEOAUs/ZUgmJkhlPz1iRCUlRGL94wUKV0QHNlh3SE99Vy4vV31OR3VXNwksKgYEAAACAFoAAAIgApAACAAYAFQAuAAARVi4AA4vG7kADgAQPlm4AABFWLgADC8buQAMAAQ+WbgAAEVYuAAJLxu5AAkABD5ZuwABAAEACgAEK7gADhC5AAgAAfS6ABcAAQAKERI5MDETMzI2N
}
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 700;
src: url(data:font/ttf;base64,AAEAAAARAQAABAAQR0RFRgNEA3IAAG3kAAAAQEdQT1Pl+8B5AABuJAAAGVZHU1VC8WfWVwAAh3wAAADgT1MvMlvgllUAAGSUAAAAYGNtYXDzMPm1AABk9AAAAeZjdnQgDdkBaQAAaJwAAAAoZnBnbQZZnDcAAGbcAAABc2dhc3D//wADAABt3AAAAAhnbHlm8iwszwAAARwAAF1UaGVhZP4ts7AAAGB0AAAANmhoZWEHuwObAABkcAAAACRobXR4wFMeHQAAYKwAAAPEbG9jYRMoKywAAF6QAAAB5G1heHADCwJCAABecAAAACBuYW1lJBs+oAAAaMQAAAHccG9zdGxQSG8AAGqgAAADOXByZXBFzLadAABoUAAAAEsABQBQAAACYgKUAAMABgAJAA8AFQBnALgAAEVYuAAALxu5AAAAED5ZuAAARVi4AAIvG7kAAgAEPlm6AAUAAgAAERI5ugAGAAIAABESOboABwACAAAREjm6AAgAAgAAERI5uQAKAAH0ugANAAIAABESObgAABC5ABIAAfQwMRMhESETJxEhEQcXLwEjDwETPwEjHwFQAhL97sFfAU1eCicpBCknVCogmB8rApT9bAFUuv6NAXO6+U1iYk0BQ187O18AAv/6AAACQwKMAAkAEQBUALgAAEVYuAAOLxu5AA4AED5ZuAAARVi4AAwvG7kADAAEPlm4AABFWLgAES8buQARAAQ+WboABQAMAA4REjm6AAsADAAOERI5uAALL7kACQAB9DAxAScuAScjDgEPARcjByMTMxMjAWEPDhoNBAwZDhCpxy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
font-style: italic;
font-weight: 400;
src: url(data:font/ttf;base64,AAEAAAARAQAABAAQR0RFRgNEA3IAAG18AAAAQEdQT1Oz7r2nAABtvAAAFhxHU1VCjb2NzgAAg9gAAABwT1MvMlq1lDoAAGQ0AAAAYGNtYXDzMPm1AABklAAAAeZjdnQgDZkA+gAAaDwAAAAoZnBnbQZZnDcAAGZ8AAABc2dhc3D//wADAABtdAAAAAhnbHlmQB3ERQAAARwAAFz4aGVhZP3Ms+oAAGAYAAAANmhoZWEIGwb0AABkEAAAACRobXR4lfkiLwAAYFAAAAPAbG9jYezv1iYAAF40AAAB4m1heHADCgJaAABeFAAAACBuYW1lJDg+sQAAaGQAAAHccG9zdNT1lfMAAGpAAAADMXByZXCXBvrrAABn8AAAAEsABQAkAAACbgKUAAMABgAJAA8AFQBxALgAAEVYuAAALxu5AAAAED5ZuAAARVi4AAIvG7kAAgAEPlm6AAQAAgAAERI5ugAFAAIAABESOboABwACAAAREjm6AAgAAgAAERI5uQAKAAH0ugAOAAIAABESObgAABC5ABEAAfS6ABUAAgAAERI5MDETIQMhEwM3FxMHAzMvASMHEzcjHwEzpgHIgv44sl6poWCr4fksHwRHoFrlKBwEApT9bAI//irr6wHW6/7kiGVlAR1/f10AAv/LAAAB1QKQAAkAEQBUALgAAEVYuAAOLxu5AA4AED5ZuAAARVi4ABEvG7kAEQAEPlm4AABFWLgADC8buQAMAAQ+WboABQAMAA4REjm6AAsADAAOERI5uAALL7kACQAB9DAxAScuAScjDgEPARcjByMBMxMjAWwKBQkEBBozHDrJ6GlWAWRaTFEBCXA0aTk5ZzZwPM0CkP1wAAAAAwAjAAACIAKQABMAHAAlAFcAuAAARVi4AAAvG7kAAAAQPlm4AABFWLgAEy8buQATAAQ+WboAIwAAABMREjm4ACMvuQAcAAH0ugAJABwAIxESObgAABC5ABoAAfS4ABMQuQAdAAH0MDETMzIWFRQOAg8BHgEVFA4CKwETMjY1NCYrAQcTMjY1NCYrAQOmr19sGSo0GwEzRilKZDrS9l5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AAfS4AAAQuQAeAAH0MDEFIi4CNTQ+AjMyHgIVFA4CEyIOAhUUHgIzMj4CNTQmAR83VTkeL1R1RzdVOR4vVHYSNVc+IhIlOic1Vz4iSgwnSGY+S5FzRidIZT5LknNGAmU8YHY6ME84Hz1gdjlhdQACACMAAAItApAADgAXAEcAuAAARVi4AAAvG7kAAAAQPlm4AABFWLgADS8buQANAAQ+WboACwAAAA0REjm4AAsvuAAAELkAFQAB9LgACxC5ABcAAfQwMRMzMh4CFRQOAisBAyMTMjY1NCYrAQOmuS5MNh4rTGk/aTRO7mZpTEhlNQKQEic8KzxYORv++AFHUE85M/71AAAAAAIAPP9eAl4CnAARAC8ASwC4AABFWLgAHy8buQAfABA+WbgAAEVYuAAXLxu5ABcABD5ZuwAUAAEALAAEK7gAFxC5AAUAAfS4AB8QuQANAAH0uAAXELgAKdAwMRMUHgIzMj4CNTQmIyIOAgEGIyImJy4BNTQ+AjMyHgIVFA4CBx4BMzI2N4sSJTonNVc+IkpONVc+IgGBISBUeBlUVi9UdUc3VTkeK05tQhFUNQ8aDgENME84Hz1gdjlhdTxgdv4iC0tRE45sS5FzRidIZT5IjXBKBiwqBAMAAAIAIwAAAicCkAAIABoAVAC4AABFWLgAGi8buQAaABA+WbgAAEVYuAAYLxu5ABgABD5ZuAAARVi4ABUvG7kAFQAEPlm7AAAAAQAWAAQruAAaELkABwAB9LoAEwAWAAAREjkwMQEyNjU0JisBB
}
html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}@media print{*,*:before,*:after{background:transparent !important;color:#000 !important;-webkit-box-shadow:none !important;box-shadow:none !important;text-shadow:none !important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="#"]:after,a[href^="javascript:"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000 !important}.label{border:1px solid #000}.table{border-collapse:collapse !important}.table td,.table th{background-color:#fff !important}.table-bordered th,.table-bordered td{border:1px solid #ddd !important}}@font-face{font-family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nhvGw0aDN1OLAXGERsB7buFpFGGBAre4QEQR0HOIO5oYH305G+KspT/FupEGGa
</style>
<script>/*!
* Bootstrap v3.3.5 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Licensed under the MIT license
*/
if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.5",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.5",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==type
d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.5",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.5",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affi
<script>/**
* @preserve HTML5 Shiv 3.7.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
*/
// Only run this code in IE 8
if (!!window.navigator.userAgent.match("MSIE 8")) {
!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.2",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b)}(this,document);
};
</script>
<script>/*! Respond.js v1.4.2: min/max-width media query polyfill * Copyright 2013 Scott Jehl
* Licensed under https://github.com/scottjehl/Respond/blob/master/LICENSE-MIT
* */
// Only run this code in IE 8
if (!!window.navigator.userAgent.match("MSIE 8")) {
!function(a){"use strict";a.matchMedia=a.matchMedia||function(a){var b,c=a.documentElement,d=c.firstElementChild||c.firstChild,e=a.createElement("body"),f=a.createElement("div");return f.id="mq-test-1",f.style.cssText="position:absolute;top:-100em",e.style.background="none",e.appendChild(f),function(a){return f.innerHTML='&shy;<style media="'+a+'"> #mq-test-1 { width: 42px; }</style>',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){u(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))};if(c.ajax=f,c.queue=d,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,maxw:/\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var g,h,i,j=a.document,k=j.documentElement,l=[],m=[],n=[],o={},p=30,q=j.getElementsByTagName("head")[0]||k,r=j.getElementsByTagName("base")[0],s=q.getElementsByTagName("link"),t=function(){var a,b=j.createElement("div"),c=j.body,d=k.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=j.createElement("body"),c.style.background="none"),k.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&k.insertBefore(c,k.firstChild),a=b.offsetWidth,f?k.removeChild(c):c.removeChild(b),k.style.fontSize=d,e&&(c.style.fontSize=e),a=i=parseFloat(a)},u=function(b){var c="clientWidth",d=k[c],e="CSS1Compat"===j.compatMode&&d||j.body[c]||d,f={},o=s[s.length-1],r=(new Date).getTime();if(b&&g&&p>r-g)return a.clearTimeout(h),h=a.setTimeout(u,p),void 0;g=r;for(var v in l)if(l.hasOwnProperty(v)){var w=l[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?i||t():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?i||t():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(m[w.rules]))}for(var C in n)n.hasOwnProperty(C)&&n[C]&&n[C].parentNode===q&&q.removeChild(n[C]);n.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=j.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,q.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(j.createTextNode(F)),n.push(E)}},v=function(a,b,d){var e=a.replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var g=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},h=!f&&d;b.length&&(b+="/"),h&&(f=1);for(var i=0;f>i;i++){var j,k,n,o;h?(j=d,m.push(g(a))):(j=e[i].match(c.regex.findStyles)&&RegExp.$1,m.push(RegExp.$2&&g(RegExp.$2))),n=j.split(","),o=n.length;for(var p=0;o>p;p++)k=n[p],l.push({media:k.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:m.length-1,hasquery:k.indexOf("(")>-1,minw:k.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:k.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},w=function(){if(d.length){var b=d.shift();f(b.href,function(c){v(c,b.href,b.media),o[b.href]=!0,a.setTimeout(function(){w()},0)})}},x=function(){for(var b=0;b<s.length;b++){var c=s[b],e=c.href,f=c.media,g=c.rel&&"stylesheet"===c.rel.toLowerCase();e&&g&&!o[e]&&(c.styleSheet&&c.styleSheet.rawCssText?(v(c.styleSheet.rawCssText,e,f),o[e]=!0):(!/^([a-zA-Z:]*\/\/)/.test(e)&&!r||e.replace(RegExp.$1,"").split("/")[0]===a.location.host)&&("//"===e.substring(0,2)&&(e=a.location.protocol+e),d.push({href:e,media:f})))}w()};x(),c.update=x,c.getEmVal
};
</script>
<style>h1 {font-size: 34px;}
h1.title {font-size: 38px;}
h2 {font-size: 30px;}
h3 {font-size: 24px;}
h4 {font-size: 18px;}
h5 {font-size: 16px;}
h6 {font-size: 12px;}
code {color: inherit; background-color: rgba(0, 0, 0, 0.04);}
pre:not([class]) { background-color: white }</style>
<script>/*! jQuery UI - v1.11.4 - 2016-01-05
* http://jqueryui.com
* Includes: core.js, widget.js, mouse.js, position.js, draggable.js, droppable.js, resizable.js, selectable.js, sortable.js, accordion.js, autocomplete.js, button.js, dialog.js, menu.js, progressbar.js, selectmenu.js, slider.js, spinner.js, tabs.js, tooltip.js, effect.js, effect-blind.js, effect-bounce.js, effect-clip.js, effect-drop.js, effect-explode.js, effect-fade.js, effect-fold.js, effect-highlight.js, effect-puff.js, effect-pulsate.js, effect-scale.js, effect-shake.js, effect-size.js, effect-slide.js, effect-transfer.js
* Copyright jQuery Foundation and other contributors; Licensed MIT */
(function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)})(function(e){function t(t,s){var n,a,o,r=t.nodeName.toLowerCase();return"area"===r?(n=t.parentNode,a=n.name,t.href&&a&&"map"===n.nodeName.toLowerCase()?(o=e("img[usemap='#"+a+"']")[0],!!o&&i(o)):!1):(/^(input|select|textarea|button|object)$/.test(r)?!t.disabled:"a"===r?t.href||s:s)&&i(t)}function i(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}function s(e){return function(){var t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger("change")}}e.ui=e.ui||{},e.extend(e.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({scrollParent:function(t){var i=this.css("position"),s="absolute"===i,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,a=this.parents().filter(function(){var t=e(this);return s&&"static"===t.css("position")?!1:n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==i&&a.length?a:e(this[0].ownerDocument||document)},uniqueId:function(){var e=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,s){return!!e.data(t,s[3])},focusable:function(i){return t(i,!isNaN(e.attr(i,"tabindex")))},tabbable:function(i){var s=e.attr(i,"tabindex"),n=isNaN(s);return(n||s>=0)&&t(i,!n)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(t,i){function s(t,i,s,a){return e.each(n,function(){i-=parseFloat(e.css(t,"padding"+this))||0,s&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),a&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],a=i.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+i]=function(t){return void 0===t?o["inner"+i].call(this):this.each(function(){e(this).css(a,s(this,t)+"px")})},e.fn["outer"+i]=function(t,n){return"number"!=typeof t?o["outer"+i].call(this,t):this.each(function(){e(this).css(a,s(this,t,!0,n)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.fn.extend({focus:function(t){return function(i,s){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),s&&s.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),disableSelection:function(){var e="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(e+".ui-disableSelection",function(e){e.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(t){if(void 0!==t)return this.css("zIndex",t);if(this.length)for(var i,s,n=e(this[0]);n.length&&n[0]!==document;){if(i=n.css("position"),("absolute"===i||"relative"===i||"fixed"===i)&&(s=parseInt(n.css("zIndex"),10),!isNaN(s)&&0!==s))return s;n=n.parent()}return 0}}),e.ui.plugin={add:function(t,i,s){var n,a=e.ui[t].prototype;for(n in s)a.plugins[n]=a.plugins[n]||[],a.plugins[n].push([i,s[n]])},call:function(e,t,i,s){var n,a=e.plugins[t];if(a&&(s||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(n=0;a.length>n;n++)e.options[a[n][0]]&&a[n][1].apply(e.element,i)}};var n=0,a=Array.prototype.slice;e.cleanData=function(t){return function(i){var s,n,a;for(a=0;null!=(n=i[a]);a++)try{s=e._data(n,"events"),s&&s.remove&&e(n).triggerHandler("remove
})),n?(a.isOver||(a.isOver=1,s._parent=i.helper.parent(),a.currentItem=i.helper.appendTo(a.element).data("ui-sortable-item",!0),a.options._helper=a.options.helper,a.options.helper=function(){return i.helper[0]},t.target=a.currentItem[0],a._mouseCapture(t,!0),a._mouseStart(t,!0,!0),a.offset.click.top=s.offset.click.top,a.offset.click.left=s.offset.click.left,a.offset.parent.left-=s.offset.parent.left-a.offset.parent.left,a.offset.parent.top-=s.offset.parent.top-a.offset.parent.top,s._trigger("toSortable",t),s.dropped=a.element,e.each(s.sortables,function(){this.refreshPositions()}),s.currentItem=s.element,a.fromOutside=s),a.currentItem&&(a._mouseDrag(t),i.position=a.position)):a.isOver&&(a.isOver=0,a.cancelHelperRemoval=!0,a.options._revert=a.options.revert,a.options.revert=!1,a._trigger("out",t,a._uiHash(a)),a._mouseStop(t,!0),a.options.revert=a.options._revert,a.options.helper=a.options._helper,a.placeholder&&a.placeholder.remove(),i.helper.appendTo(s._parent),s._refreshOffsets(t),i.position=s._generatePosition(t,!0),s._trigger("fromSortable",t),s.dropped=!1,e.each(s.sortables,function(){this.refreshPositions()}))})}}),e.ui.plugin.add("draggable","cursor",{start:function(t,i,s){var n=e("body"),a=s.options;n.css("cursor")&&(a._cursor=n.css("cursor")),n.css("cursor",a.cursor)},stop:function(t,i,s){var n=s.options;n._cursor&&e("body").css("cursor",n._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,i,s){var n=e(i.helper),a=s.options;n.css("opacity")&&(a._opacity=n.css("opacity")),n.css("opacity",a.opacity)},stop:function(t,i,s){var n=s.options;n._opacity&&e(i.helper).css("opacity",n._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(e,t,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(t,i,s){var n=s.options,a=!1,o=s.scrollParentNotHidden[0],r=s.document[0];o!==r&&"HTML"!==o.tagName?(n.axis&&"x"===n.axis||(s.overflowOffset.top+o.offsetHeight-t.pageY<n.scrollSensitivity?o.scrollTop=a=o.scrollTop+n.scrollSpeed:t.pageY-s.overflowOffset.top<n.scrollSensitivity&&(o.scrollTop=a=o.scrollTop-n.scrollSpeed)),n.axis&&"y"===n.axis||(s.overflowOffset.left+o.offsetWidth-t.pageX<n.scrollSensitivity?o.scrollLeft=a=o.scrollLeft+n.scrollSpeed:t.pageX-s.overflowOffset.left<n.scrollSensitivity&&(o.scrollLeft=a=o.scrollLeft-n.scrollSpeed))):(n.axis&&"x"===n.axis||(t.pageY-e(r).scrollTop()<n.scrollSensitivity?a=e(r).scrollTop(e(r).scrollTop()-n.scrollSpeed):e(window).height()-(t.pageY-e(r).scrollTop())<n.scrollSensitivity&&(a=e(r).scrollTop(e(r).scrollTop()+n.scrollSpeed))),n.axis&&"y"===n.axis||(t.pageX-e(r).scrollLeft()<n.scrollSensitivity?a=e(r).scrollLeft(e(r).scrollLeft()-n.scrollSpeed):e(window).width()-(t.pageX-e(r).scrollLeft())<n.scrollSensitivity&&(a=e(r).scrollLeft(e(r).scrollLeft()+n.scrollSpeed)))),a!==!1&&e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(s,t)}}),e.ui.plugin.add("draggable","snap",{start:function(t,i,s){var n=s.options;s.snapElements=[],e(n.snap.constructor!==String?n.snap.items||":data(ui-draggable)":n.snap).each(function(){var t=e(this),i=t.offset();this!==s.element[0]&&s.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:i.top,left:i.left})})},drag:function(t,i,s){var n,a,o,r,h,l,u,d,c,p,f=s.options,m=f.snapTolerance,g=i.offset.left,v=g+s.helperProportions.width,y=i.offset.top,b=y+s.helperProportions.height;for(c=s.snapElements.length-1;c>=0;c--)h=s.snapElements[c].left-s.margins.left,l=h+s.snapElements[c].width,u=s.snapElements[c].top-s.margins.top,d=u+s.snapElements[c].height,h-m>v||g>l+m||u-m>b||y>d+m||!e.contains(s.snapElements[c].item.ownerDocument,s.snapElements[c].item)?(s.snapElements[c].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,t,e.extend(s._uiHash(),{snapItem:s.snapElements[c].item})),s.snapElements[c].snapping=!1):("inner"!==f.snapMode&&(n=m>=Math.abs(u-b),a=m>=Math.abs(d-y),o=m>=Math.abs(h-v),r=m>=Math.abs(l-g),n&&
i&&i.element!==s.element[0]&&("touch"===n.tolerance?l=!(i.left>r||a>i.right||i.top>h||o>i.bottom):"fit"===n.tolerance&&(l=i.left>a&&r>i.right&&i.top>o&&h>i.bottom),l?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,s._trigger("selecting",t,{selecting:i.element}))):(i.selecting&&((t.metaKey||t.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",t,{unselecting:i.element}))),i.selected&&(t.metaKey||t.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",t,{unselecting:i.element})))))}),!1}},_mouseStop:function(t){var i=this;return this.dragged=!1,e(".ui-unselecting",this.element[0]).each(function(){var s=e.data(this,"selectable-item");s.$element.removeClass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",t,{unselected:s.element})}),e(".ui-selecting",this.element[0]).each(function(){var s=e.data(this,"selectable-item");s.$element.removeClass("ui-selecting").addClass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",t,{selected:s.element})}),this._trigger("stop",t),this.helper.remove(),!1}}),e.widget("ui.sortable",e.ui.mouse,{version:"1.11.4",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(e,t,i){return e>=t&&t+i>e},_isFloating:function(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))},_create:function(){this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(e,t){this._super(e,t),"handle"===e&&this._setHandleClassName()},_setHandleClassName:function(){this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle"),e.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle"),this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,i){var s=null,n=!1,a=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(t),e(t.target).parents().each(function(){return e.data(this,a.widgetName+"-item")===a?(s=e(this),!1):void 0}),e.data(t.target,a.widgetName+"-item")===a&&(s=e(t.target)),s?!this.options.handle||i||(e(this.options.handle,s).find("*").addBack().each(function(){this===t.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(t,i,s){var n,a,o=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffse
t.preventDefault(),a&&!i.collapsible||this._trigger("beforeActivate",t,l)===!1||(i.active=o?!1:this.headers.index(n),this.active=a?e():n,this._toggle(l),s.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),a||(n.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),n.next().addClass("ui-accordion-content-active")))},_toggle:function(t){var i=t.newPanel,s=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,t):(s.hide(),i.show(),this._toggleComplete(t)),s.attr({"aria-hidden":"true"}),s.prev().attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&s.length?s.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===parseInt(e(this).attr("tabIndex"),10)}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(e,t,i){var s,n,a,o=this,r=0,h=e.css("box-sizing"),l=e.length&&(!t.length||e.index()<t.index()),u=this.options.animate||{},d=l&&u.down||u,c=function(){o._toggleComplete(i)};return"number"==typeof d&&(a=d),"string"==typeof d&&(n=d),n=n||d.easing||u.easing,a=a||d.duration||u.duration,t.length?e.length?(s=e.show().outerHeight(),t.animate(this.hideProps,{duration:a,easing:n,step:function(e,t){t.now=Math.round(e)}}),e.hide().animate(this.showProps,{duration:a,easing:n,complete:c,step:function(e,i){i.now=Math.round(e),"height"!==i.prop?"content-box"===h&&(r+=i.now):"content"!==o.options.heightStyle&&(i.now=Math.round(s-t.outerHeight()-r),r=0)}}),void 0):t.animate(this.hideProps,a,n,c):e.animate(this.showProps,a,n,c)},_toggleComplete:function(e){var t=e.oldPanel;t.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),t.length&&(t.parent()[0].className=t.parent()[0].className),this._trigger("activate",null,e)}}),e.widget("ui.menu",{version:"1.11.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item":function(e){e.preventDefault()},"click .ui-menu-item":function(t){var i=e(t.target);!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&e(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){if(!this.previousFilter){var i=e(t.currentTarget);i.siblings(".ui-state-active").removeClass("ui-state-active"),this.focus(t,i)}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var i=this.active||this.element.find(this.options.items).eq(0);t||this.focus(e,i)},blur:function(t){this._delay(function(){e.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){this._closeOnDocumentClick(e)&&this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAt
},_createButtonPane:function(){this.uiDialogButtonPane=e("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=e("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var t=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),e.isEmptyObject(i)||e.isArray(i)&&!i.length?(this.uiDialog.removeClass("ui-dialog-buttons"),void 0):(e.each(i,function(i,s){var n,a;s=e.isFunction(s)?{click:s,text:i}:s,s=e.extend({type:"button"},s),n=s.click,s.click=function(){n.apply(t.element[0],arguments)},a={icons:s.icons,text:s.showText},delete s.icons,delete s.showText,e("<button></button>",s).button(a).appendTo(t.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),void 0)},_makeDraggable:function(){function t(e){return{position:e.position,offset:e.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){e(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,t(n))},drag:function(e,s){i._trigger("drag",e,t(s))},stop:function(n,a){var o=a.offset.left-i.document.scrollLeft(),r=a.offset.top-i.document.scrollTop();s.position={my:"left top",at:"left"+(o>=0?"+":"")+o+" "+"top"+(r>=0?"+":"")+r,of:i.window},e(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,t(a))}})},_makeResizable:function(){function t(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}var i=this,s=this.options,n=s.resizable,a=this.uiDialog.css("position"),o="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:o,start:function(s,n){e(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,t(n))},resize:function(e,s){i._trigger("resize",e,t(s))},stop:function(n,a){var o=i.uiDialog.offset(),r=o.left-i.document.scrollLeft(),h=o.top-i.document.scrollTop();s.height=i.uiDialog.height(),s.width=i.uiDialog.width(),s.position={my:"left top",at:"left"+(r>=0?"+":"")+r+" "+"top"+(h>=0?"+":"")+h,of:i.window},e(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,t(a))}}).css("position",a)},_trackFocus:function(){this._on(this.widget(),{focusin:function(t){this._makeFocusTarget(),this._focusedElement=e(t.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var t=this._trackingInstances(),i=e.inArray(this,t);-1!==i&&t.splice(i,1)},_trackingInstances:function(){var e=this.document.data("ui-dialog-instances");return e||(e=[],this.document.data("ui-dialog-instances",e)),e},_minHeight:function(){var e=this.options;return"auto"===e.height?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(){var e=this.uiDialog.is(":visible");e||this.uiDialog.show(),this.uiDialog.position(this.options.position),e||this.uiDialog.hide()},_setOptions:function(t){var i=this,s=!1,n={};e.each(t,function(e,t){i._setOption(e,t),e in i.sizeRelatedOptions&&(s=!0),e in i.resizableRelatedOptions&&(n[e]=t)}),s&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",n)},_setOption:function(e,t){var i,s,n=this.uiDialog;"dialogClass"===e&&n.removeClass(this.options.dialogClass).addClass(t),"disabled"!==e&&(this._super(e,t),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:""+t}),"draggable"===e&&(i=n.is(":data(ui-draggable)"),i&&!t&&n.draggable("destroy"),!i&&t&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&(s=n.is(":data(ui-resizable)"),s&&!t&&n.resizable("destroy"),s&&"string"==typeo
},_format:function(e){return""===e?"":window.Globalize&&this.options.numberFormat?Globalize.format(e,this.options.numberFormat,this.options.culture):e},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var e=this.value();return null===e?!1:e===this._adjustValue(e)},_value:function(e,t){var i;""!==e&&(i=this._parse(e),null!==i&&(t||(i=this._adjustValue(i)),e=this._format(i))),this.element.val(e),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:s(function(e){this._stepUp(e)}),_stepUp:function(e){this._start()&&(this._spin((e||1)*this.options.step),this._stop())},stepDown:s(function(e){this._stepDown(e)}),_stepDown:function(e){this._start()&&(this._spin((e||1)*-this.options.step),this._stop())},pageUp:s(function(e){this._stepUp((e||1)*this.options.page)}),pageDown:s(function(e){this._stepDown((e||1)*this.options.page)}),value:function(e){return arguments.length?(s(this._value).call(this,e),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}),e.widget("ui.tabs",{version:"1.11.4",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var e=/#.*$/;return function(t){var i,s;t=t.cloneNode(!1),i=t.href.replace(e,""),s=location.href.replace(e,"");try{i=decodeURIComponent(i)}catch(n){}try{s=decodeURIComponent(s)}catch(n){}return t.hash.length>1&&i===s}}(),_create:function(){var t=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible),this._processTabs(),i.active=this._initialActive(),e.isArray(i.disabled)&&(i.disabled=e.unique(i.disabled.concat(e.map(this.tabs.filter(".ui-state-disabled"),function(e){return t.tabs.index(e)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):e(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var t=this.options.active,i=this.options.collapsible,s=location.hash.substring(1);return null===t&&(s&&this.tabs.each(function(i,n){return e(n).attr("aria-controls")===s?(t=i,!1):void 0}),null===t&&(t=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===t||-1===t)&&(t=this.tabs.length?0:!1)),t!==!1&&(t=this.tabs.index(this.tabs.eq(t)),-1===t&&(t=i?!1:0)),!i&&t===!1&&this.anchors.length&&(t=0),t},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):e()}},_tabKeydown:function(t){var i=e(this.document[0].activeElement).closest("li"),s=this.tabs.index(i),n=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:s++;break;case e.ui.keyCode.UP:case e.ui.keyCode.LEFT:n=!1,s--;break;case e.ui.keyCode.END:s=this.anchors.length-1;break;case e.ui.keyCode.HOME:s=0;break;case e.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),this._activate(s),void 0;case e.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),this._activate(s===this.options.active?!1:s),void 0;default:return}t.preventDefault(),clearTimeout(this.activating),s=this._focusNextTab(s,n),t.ctrlKey||t.metaKey||(i.attr("aria-selected","false"),this.tabs.eq(s).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",s)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===e.ui.keyCode.UP&&(t.preventDefault(),this.active.focus())},_handlePageNav:function(t){return t.altKey&&t.keyCode===e.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===e.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options
}})},e.effects.effect.bounce=function(t,i){var s,n,a,o=e(this),r=["position","top","bottom","left","right","height","width"],h=e.effects.setMode(o,t.mode||"effect"),l="hide"===h,u="show"===h,d=t.direction||"up",c=t.distance,p=t.times||5,f=2*p+(u||l?1:0),m=t.duration/f,g=t.easing,v="up"===d||"down"===d?"top":"left",y="up"===d||"left"===d,b=o.queue(),_=b.length;for((u||l)&&r.push("opacity"),e.effects.save(o,r),o.show(),e.effects.createWrapper(o),c||(c=o["top"===v?"outerHeight":"outerWidth"]()/3),u&&(a={opacity:1},a[v]=0,o.css("opacity",0).css(v,y?2*-c:2*c).animate(a,m,g)),l&&(c/=Math.pow(2,p-1)),a={},a[v]=0,s=0;p>s;s++)n={},n[v]=(y?"-=":"+=")+c,o.animate(n,m,g).animate(a,m,g),c=l?2*c:c/2;l&&(n={opacity:0},n[v]=(y?"-=":"+=")+c,o.animate(n,m,g)),o.queue(function(){l&&o.hide(),e.effects.restore(o,r),e.effects.removeWrapper(o),i()}),_>1&&b.splice.apply(b,[1,0].concat(b.splice(_,f+1))),o.dequeue()},e.effects.effect.clip=function(t,i){var s,n,a,o=e(this),r=["position","top","bottom","left","right","height","width"],h=e.effects.setMode(o,t.mode||"hide"),l="show"===h,u=t.direction||"vertical",d="vertical"===u,c=d?"height":"width",p=d?"top":"left",f={};e.effects.save(o,r),o.show(),s=e.effects.createWrapper(o).css({overflow:"hidden"}),n="IMG"===o[0].tagName?s:o,a=n[c](),l&&(n.css(c,0),n.css(p,a/2)),f[c]=l?a:0,f[p]=l?0:a/2,n.animate(f,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){l||o.hide(),e.effects.restore(o,r),e.effects.removeWrapper(o),i()}})},e.effects.effect.drop=function(t,i){var s,n=e(this),a=["position","top","bottom","left","right","opacity","height","width"],o=e.effects.setMode(n,t.mode||"hide"),r="show"===o,h=t.direction||"left",l="up"===h||"down"===h?"top":"left",u="up"===h||"left"===h?"pos":"neg",d={opacity:r?1:0};e.effects.save(n,a),n.show(),e.effects.createWrapper(n),s=t.distance||n["top"===l?"outerHeight":"outerWidth"](!0)/2,r&&n.css("opacity",0).css(l,"pos"===u?-s:s),d[l]=(r?"pos"===u?"+=":"-=":"pos"===u?"-=":"+=")+s,n.animate(d,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===o&&n.hide(),e.effects.restore(n,a),e.effects.removeWrapper(n),i()}})},e.effects.effect.explode=function(t,i){function s(){b.push(this),b.length===d*c&&n()}function n(){p.css({visibility:"visible"}),e(b).remove(),m||p.hide(),i()}var a,o,r,h,l,u,d=t.pieces?Math.round(Math.sqrt(t.pieces)):3,c=d,p=e(this),f=e.effects.setMode(p,t.mode||"hide"),m="show"===f,g=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/c),y=Math.ceil(p.outerHeight()/d),b=[];for(a=0;d>a;a++)for(h=g.top+a*y,u=a-(d-1)/2,o=0;c>o;o++)r=g.left+o*v,l=o-(c-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-o*v,top:-a*y}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:y,left:r+(m?l*v:0),top:h+(m?u*y:0),opacity:m?0:1}).animate({left:r+(m?0:l*v),top:h+(m?0:u*y),opacity:m?1:0},t.duration||500,t.easing,s)},e.effects.effect.fade=function(t,i){var s=e(this),n=e.effects.setMode(s,t.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:t.duration,easing:t.easing,complete:i})},e.effects.effect.fold=function(t,i){var s,n,a=e(this),o=["position","top","bottom","left","right","height","width"],r=e.effects.setMode(a,t.mode||"hide"),h="show"===r,l="hide"===r,u=t.size||15,d=/([0-9]+)%/.exec(u),c=!!t.horizFirst,p=h!==c,f=p?["width","height"]:["height","width"],m=t.duration/2,g={},v={};e.effects.save(a,o),a.show(),s=e.effects.createWrapper(a).css({overflow:"hidden"}),n=p?[s.width(),s.height()]:[s.height(),s.width()],d&&(u=parseInt(d[1],10)/100*n[l?0:1]),h&&s.css(c?{height:0,width:u}:{height:u,width:0}),g[f[0]]=h?n[0]:u,v[f[1]]=h?n[1]:0,s.animate(g,m,t.easing).animate(v,m,t.easing,function(){l&&a.hide(),e.effects.restore(a,o),e.effects.removeWrapper(a),i()})},e.effects.effect.highlight=function(t,i){var s=e(this),n=["backgroundImage","backgroundColor","opacity"],a=e.effects.setMode(s,t.mode||"show"),o={backgroundColor:s.css("backgroundColor")};"hide"===a&&(o.opacity=0),e.effects.save(s,n),s.show().css({backgroundImage:"none",back
<style type="text/css">
.tocify {
width: 20%;
max-height: 90%;
overflow: auto;
margin-left: 2%;
position: fixed;
border: 1px solid #ccc;
border-radius: 6px;
}
.tocify ul, .tocify li {
list-style: none;
margin: 0;
padding: 0;
border: none;
line-height: 30px;
}
.tocify-header {
text-indent: 10px;
}
.tocify-subheader {
text-indent: 20px;
display: none;
}
.tocify-subheader li {
font-size: 12px;
}
.tocify-subheader .tocify-subheader {
text-indent: 30px;
}
.tocify-subheader .tocify-subheader .tocify-subheader {
text-indent: 40px;
}
.tocify-subheader .tocify-subheader .tocify-subheader .tocify-subheader {
text-indent: 50px;
}
.tocify-subheader .tocify-subheader .tocify-subheader .tocify-subheader .tocify-subheader {
text-indent: 60px;
}
.tocify .tocify-item > a, .tocify .nav-list .nav-header {
margin: 0px;
}
.tocify .tocify-item a, .tocify .list-group-item {
padding: 5px;
}
.tocify .nav-pills > li {
float: none;
}
</style>
<script>/* jquery Tocify - v1.9.1 - 2013-10-22
* http://www.gregfranko.com/jquery.tocify.js/
* Copyright (c) 2013 Greg Franko; Licensed MIT */
// Immediately-Invoked Function Expression (IIFE) [Ben Alman Blog Post](http://benalman.com/news/2010/11/immediately-invoked-function-expression/) that calls another IIFE that contains all of the plugin logic. I used this pattern so that anyone viewing this code would not have to scroll to the bottom of the page to view the local parameters that were passed to the main IIFE.
(function(tocify) {
// ECMAScript 5 Strict Mode: [John Resig Blog Post](http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/)
"use strict";
// Calls the second IIFE and locally passes in the global jQuery, window, and document objects
tocify(window.jQuery, window, document);
}
// Locally passes in `jQuery`, the `window` object, the `document` object, and an `undefined` variable. The `jQuery`, `window` and `document` objects are passed in locally, to improve performance, since javascript first searches for a variable match within the local variables set before searching the global variables set. All of the global variables are also passed in locally to be minifier friendly. `undefined` can be passed in locally, because it is not a reserved word in JavaScript.
(function($, window, document, undefined) {
// ECMAScript 5 Strict Mode: [John Resig Blog Post](http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/)
"use strict";
var tocClassName = "tocify",
tocClass = "." + tocClassName,
tocFocusClassName = "tocify-focus",
tocHoverClassName = "tocify-hover",
hideTocClassName = "tocify-hide",
hideTocClass = "." + hideTocClassName,
headerClassName = "tocify-header",
headerClass = "." + headerClassName,
subheaderClassName = "tocify-subheader",
subheaderClass = "." + subheaderClassName,
itemClassName = "tocify-item",
itemClass = "." + itemClassName,
extendPageClassName = "tocify-extend-page",
extendPageClass = "." + extendPageClassName;
// Calling the jQueryUI Widget Factory Method
$.widget("toc.tocify", {
//Plugin version
version: "1.9.1",
// These options will be used as defaults
options: {
// **context**: Accepts String: Any jQuery selector
// The container element that holds all of the elements used to generate the table of contents
context: "body",
// **ignoreSelector**: Accepts String: Any jQuery selector
// A selector to any element that would be matched by selectors that you wish to be ignored
ignoreSelector: null,
// **selectors**: Accepts an Array of Strings: Any jQuery selectors
// The element's used to generate the table of contents. The order is very important since it will determine the table of content's nesting structure
selectors: "h1, h2, h3",
// **showAndHide**: Accepts a boolean: true or false
// Used to determine if elements should be shown and hidden
showAndHide: true,
// **showEffect**: Accepts String: "none", "fadeIn", "show", or "slideDown"
// Used to display any of the table of contents nested items
showEffect: "slideDown",
// **showEffectSpeed**: Accepts Number (milliseconds) or String: "slow", "medium", or "fast"
// The time duration of the show animation
showEffectSpeed: "medium",
// **hideEffect**: Accepts String: "none", "fadeOut", "hide", or "slideUp"
// Used to hide any of the table of contents nested items
hideEffect: "slideUp",
// **hideEffectSpeed**: Accepts Number (milliseconds) or String: "slow", "medium", or "fast"
// The time duration of the hide animation
hideEffectSpeed: "medium",
// **smoothScroll**: Accepts a boolean: true or false
// Determines if a jQuery animation should be used to scroll to specific table of contents items on the page
smoothScroll: true,
// **smoothScrollSpeed**: Accepts Number (milliseconds) or String: "slow", "medium", or "fast"
// The time duration of the smoothScroll animation
smoothScrollSpeed: "medium",
// **scrollTo**: Accepts Number (pixels)
// The amount of space between the top of page and the selected table of contents item after the page has been scrolled
scrollTo: 0,
// **showAndHideOnScroll**: Accepts a boolean: true or false
// Determines if table of contents nested items should be shown and hidden while scrolling
showAndHideOnScroll: true,
// **highlightOnScroll**: Accepts a boolean: true or false
// Determines if table of contents nested items should be highlighted (set to a different color) while scrolling
highlightOnScroll: true,
// **highlightOffset**: Accepts a number
// The offset distance in pixels to trigger the next active table of contents item
highlightOffset: 40,
// **theme**: Accepts a string: "bootstrap", "jqueryui", or "none"
// Determines if Twitter Bootstrap, jQueryUI, or Tocify classes should be added to the table of contents
theme: "bootstrap",
// **extendPage**: Accepts a boolean: true or false
// If a user scrolls to the bottom of the page and the page is not tall enough to scroll to the last table of contents item, then the page height is increased
extendPage: true,
// **extendPageOffset**: Accepts a number: pixels
// How close to the bottom of the page a user must scroll before the page is extended
extendPageOffset: 100,
// **history**: Accepts a boolean: true or false
// Adds a hash to the page url to maintain history
history: true,
// **scrollHistory**: Accepts a boolean: true or false
// Adds a hash to the page url, to maintain history, when scrolling to a TOC item
scrollHistory: false,
// **hashGenerator**: How the hash value (the anchor segment of the URL, following the
// # character) will be generated.
//
// "compact" (default) - #CompressesEverythingTogether
// "pretty" - #looks-like-a-nice-url-and-is-easily-readable
// function(text, element){} - Your own hash generation function that accepts the text as an
// argument, and returns the hash value.
hashGenerator: "compact",
// **highlightDefault**: Accepts a boolean: true or false
// Set's the first TOC item as active if no other TOC item is active.
highlightDefault: true
},
// _Create
// -------
// Constructs the plugin. Only called once.
_create: function() {
var self = this;
self.extendPageScroll = true;
// Internal array that keeps track of all TOC items (Helps to recognize if there are duplicate TOC item strings)
self.items = [];
// Generates the HTML for the dynamic table of contents
self._generateToc();
// Adds CSS classes to the newly generated table of contents HTML
self._addCSSClasses();
self.webkit = (function() {
for (var prop in window) {
if (prop) {
if (prop.toLowerCase().indexOf("webkit") !== -1) {
return true;
}
}
}
return false;
}());
// Adds jQuery event handlers to the newly generated table of contents
self._setEventHandlers();
// Binding to the Window load event to make sure the correct scrollTop is calculated
$(window).on("load", function() {
// Sets the active TOC item
self._setActiveElement(true);
// Once all animations on the page are complete, this callback function will be called
$("html, body").promise().done(function() {
setTimeout(function() {
self.extendPageScroll = false;
}, 0);
});
});
},
// _generateToc
// ------------
// Generates the HTML for the dynamic table of contents
_generateToc: function() {
// _Local variables_
// Stores the plugin context in the self variable
var self = this,
// All of the HTML tags found within the context provided (i.e. body) that match the top level jQuery selector above
firstElem,
// Instantiated variable that will store the top level newly created unordered list DOM element
ul,
ignoreSelector = self.options.ignoreSelector;
// Determine the element to start the toc with
// get all the top level selectors
firstElem = [];
var selectors = this.options.selectors.replace(/ /g, "").split(",");
// find the first set that have at least one non-ignored element
for(var i = 0; i < selectors.length; i++) {
var foundSelectors = $(this.options.context).find(selectors[i]);
for (var s = 0; s < foundSelectors.length; s++) {
if (!$(foundSelectors[s]).is(ignoreSelector)) {
firstElem = foundSelectors;
break;
}
}
if (firstElem.length> 0)
break;
}
if (!firstElem.length) {
self.element.addClass(hideTocClassName);
return;
}
self.element.addClass(tocClassName);
// Loops through each top level selector
firstElem.each(function(index) {
//If the element matches the ignoreSelector then we skip it
if ($(this).is(ignoreSelector)) {
return;
}
// Creates an unordered list HTML element and adds a dynamic ID and standard class name
ul = $("<ul/>", {
"id": headerClassName + index,
"class": headerClassName
}).
// Appends a top level list item HTML element to the previously created HTML header
append(self._nestElements($(this), index));
// Add the created unordered list element to the HTML element calling the plugin
self.element.append(ul);
// Finds all of the HTML tags between the header and subheader elements
$(this).nextUntil(this.nodeName.toLowerCase()).each(function() {
// If there are no nested subheader elemements
if ($(this).find(self.options.selectors).length === 0) {
// Loops through all of the subheader elements
$(this).filter(self.options.selectors).each(function() {
//If the element matches the ignoreSelector then we skip it
if ($(this).is(ignoreSelector)) {
return;
}
self._appendSubheaders.call(this, self, ul);
});
}
// If there are nested subheader elements
else {
// Loops through all of the subheader elements
$(this).find(self.options.selectors).each(function() {
//If the element matches the ignoreSelector then we skip it
if ($(this).is(ignoreSelector)) {
return;
}
self._appendSubheaders.call(this, self, ul);
});
}
});
});
},
_setActiveElement: function(pageload) {
var self = this,
hash = window.location.hash.substring(1),
elem = self.element.find('li[data-unique="' + hash + '"]');
if (hash.length) {
// Removes highlighting from all of the list item's
self.element.find("." + self.focusClass).removeClass(self.focusClass);
// Highlights the current list item that was clicked
elem.addClass(self.focusClass);
// Triggers the click event on the currently focused TOC item
elem.click();
} else {
// Removes highlighting from all of the list item's
self.element.find("." + self.focusClass).removeClass(self.focusClass);
if (!hash.length && pageload && self.options.highlightDefault) {
// Highlights the first TOC item if no other items are highlighted
self.element.find(itemClass).first().addClass(self.focusClass);
}
}
return self;
},
// _nestElements
// -------------
// Helps create the table of contents list by appending nested list items
_nestElements: function(self, index) {
var arr, item, hashValue;
arr = $.grep(this.items, function(item) {
return item === self.text();
});
// If there is already a duplicate TOC item
if (arr.length) {
// Adds the current TOC item text and index (for slight randomization) to the internal array
this.items.push(self.text() + index);
}
// If there not a duplicate TOC item
else {
// Adds the current TOC item text to the internal array
this.items.push(self.text());
}
hashValue = this._generateHashValue(arr, self, index);
// Appends a list item HTML element to the last unordered list HTML element found within the HTML element calling the plugin
item = $("<li/>", {
// Sets a common class name to the list item
"class": itemClassName,
"data-unique": hashValue
});
if (this.options.theme !== "bootstrap3") {
item.append($("<a/>", {
"html": self.html()
}));
} else {
item.html(self.html());
}
// Adds an HTML anchor tag before the currently traversed HTML element
self.before($("<div/>", {
// Sets a name attribute on the anchor tag to the text of the currently traversed HTML element (also making sure that all whitespace is replaced with an underscore)
"name": hashValue,
"data-unique": hashValue
}));
return item;
},
// _generateHashValue
// ------------------
// Generates the hash value that will be used to refer to each item.
_generateHashValue: function(arr, self, index) {
var hashValue = "",
hashGeneratorOption = this.options.hashGenerator;
if (hashGeneratorOption === "pretty") {
// prettify the text
hashValue = self.text().toLowerCase().replace(/\s/g, "-");
// fix double hyphens
while (hashValue.indexOf("--") > -1) {
hashValue = hashValue.replace(/--/g, "-");
}
// fix colon-space instances
while (hashValue.indexOf(":-") > -1) {
hashValue = hashValue.replace(/:-/g, "-");
}
} else if (typeof hashGeneratorOption === "function") {
// call the function
hashValue = hashGeneratorOption(self.text(), self);
} else {
// compact - the default
hashValue = self.text().replace(/\s/g, "");
}
// add the index if we need to
if (arr.length) {
hashValue += "" + index;
}
// return the value
return hashValue;
},
// _appendElements
// ---------------
// Helps create the table of contents list by appending subheader elements
_appendSubheaders: function(self, ul) {
// The current element index
var index = $(this).index(self.options.selectors),
// Finds the previous header DOM element
previousHeader = $(self.options.selectors).eq(index - 1),
currentTagName = +$(this).prop("tagName").charAt(1),
previousTagName = +previousHeader.prop("tagName").charAt(1),
lastSubheader;
// If the current header DOM element is smaller than the previous header DOM element or the first subheader
if (currentTagName < previousTagName) {
// Selects the last unordered list HTML found within the HTML element calling the plugin
self.element.find(subheaderClass + "[data-tag=" + currentTagName + "]").last().append(self._nestElements($(this), index));
}
// If the current header DOM element is the same type of header(eg. h4) as the previous header DOM element
else if (currentTagName === previousTagName) {
ul.find(itemClass).last().after(self._nestElements($(this), index));
} else {
// Selects the last unordered list HTML found within the HTML element calling the plugin
ul.find(itemClass).last().
// Appends an unorderedList HTML element to the dynamic `unorderedList` variable and sets a common class name
after($("<ul/>", {
"class": subheaderClassName,
"data-tag": currentTagName
})).next(subheaderClass).
// Appends a list item HTML element to the last unordered list HTML element found within the HTML element calling the plugin
append(self._nestElements($(this), index));
}
},
// _setEventHandlers
// ----------------
// Adds jQuery event handlers to the newly generated table of contents
_setEventHandlers: function() {
// _Local variables_
// Stores the plugin context in the self variable
var self = this,
// Instantiates a new variable that will be used to hold a specific element's context
$self,
// Instantiates a new variable that will be used to determine the smoothScroll animation time duration
duration;
// Event delegation that looks for any clicks on list item elements inside of the HTML element calling the plugin
this.element.on("click.tocify", "li", function(event) {
if (self.options.history) {
window.location.hash = $(this).attr("data-unique");
}
// Removes highlighting from all of the list item's
self.element.find("." + self.focusClass).removeClass(self.focusClass);
// Highlights the current list item that was clicked
$(this).addClass(self.focusClass);
// If the showAndHide option is true
if (self.options.showAndHide) {
var elem = $('li[data-unique="' + $(this).attr("data-unique") + '"]');
self._triggerShow(elem);
}
self._scrollTo($(this));
});
// Mouseenter and Mouseleave event handlers for the list item's within the HTML element calling the plugin
this.element.find("li").on({
// Mouseenter event handler
"mouseenter.tocify": function() {
// Adds a hover CSS class to the current list item
$(this).addClass(self.hoverClass);
// Makes sure the cursor is set to the pointer icon
$(this).css("cursor", "pointer");
},
// Mouseleave event handler
"mouseleave.tocify": function() {
if (self.options.theme !== "bootstrap") {
// Removes the hover CSS class from the current list item
$(this).removeClass(self.hoverClass);
}
}
});
// only attach handler if needed (expensive in IE)
if (self.options.extendPage || self.options.highlightOnScroll || self.options.scrollHistory || self.options.showAndHideOnScroll) {
// Window scroll event handler
$(window).on("scroll.tocify", function() {
// Once all animations on the page are complete, this callback function will be called
$("html, body").promise().done(function() {
// Local variables
// Stores how far the user has scrolled
var winScrollTop = $(window).scrollTop(),
// Stores the height of the window
winHeight = $(window).height(),
// Stores the height of the document
docHeight = $(document).height(),
scrollHeight = $("body")[0].scrollHeight,
// Instantiates a variable that will be used to hold a selected HTML element
elem,
lastElem,
lastElemOffset,
currentElem;
if (self.options.extendPage) {
// If the user has scrolled to the bottom of the page and the last toc item is not focused
if ((self.webkit && winScrollTop >= scrollHeight - winHeight - self.options.extendPageOffset) || (!self.webkit && winHeight + winScrollTop > docHeight - self.options.extendPageOffset)) {
if (!$(extendPageClass).length) {
lastElem = $('div[data-unique="' + $(itemClass).last().attr("data-unique") + '"]');
if (!lastElem.length) return;
// Gets the top offset of the page header that is linked to the last toc item
lastElemOffset = lastElem.offset().top;
// Appends a div to the bottom of the page and sets the height to the difference of the window scrollTop and the last element's position top offset
$(self.options.context).append($("<div/>", {
"class": extendPageClassName,
"height": Math.abs(lastElemOffset - winScrollTop) + "px",
"data-unique": extendPageClassName
}));
if (self.extendPageScroll) {
currentElem = self.element.find('li.' + self.focusClass);
self._scrollTo($('div[data-unique="' + currentElem.attr("data-unique") + '"]'));
}
}
}
}
// The zero timeout ensures the following code is run after the scroll events
setTimeout(function() {
// _Local variables_
// Stores the distance to the closest anchor
var closestAnchorDistance = null,
// Stores the index of the closest anchor
closestAnchorIdx = null,
// Keeps a reference to all anchors
anchors = $(self.options.context).find("div[data-unique]"),
anchorText;
// Determines the index of the closest anchor
anchors.each(function(idx) {
var distance = Math.abs(($(this).next().length ? $(this).next() : $(this)).offset().top - winScrollTop - self.options.highlightOffset);
if (closestAnchorDistance == null || distance < closestAnchorDistance) {
closestAnchorDistance = distance;
closestAnchorIdx = idx;
} else {
return false;
}
});
anchorText = $(anchors[closestAnchorIdx]).attr("data-unique");
// Stores the list item HTML element that corresponds to the currently traversed anchor tag
elem = $('li[data-unique="' + anchorText + '"]');
// If the `highlightOnScroll` option is true and a next element is found
if (self.options.highlightOnScroll && elem.length) {
// Removes highlighting from all of the list item's
self.element.find("." + self.focusClass).removeClass(self.focusClass);
// Highlights the corresponding list item
elem.addClass(self.focusClass);
}
if (self.options.scrollHistory) {
if (window.location.hash !== "#" + anchorText) {
window.location.replace("#" + anchorText);
}
}
// If the `showAndHideOnScroll` option is true
if (self.options.showAndHideOnScroll && self.options.showAndHide) {
self._triggerShow(elem, true);
}
}, 0);
});
});
}
},
// Show
// ----
// Opens the current sub-header
show: function(elem, scroll) {
// Stores the plugin context in the `self` variable
var self = this,
element = elem;
// If the sub-header is not already visible
if (!elem.is(":visible")) {
// If the current element does not have any nested subheaders, is not a header, and its parent is not visible
if (!elem.find(subheaderClass).length && !elem.parent().is(headerClass) && !elem.parent().is(":visible")) {
// Sets the current element to all of the subheaders within the current header
elem = elem.parents(subheaderClass).add(elem);
}
// If the current element does not have any nested subheaders and is not a header
else if (!elem.children(subheaderClass).length && !elem.parent().is(headerClass)) {
// Sets the current element to the closest subheader
elem = elem.closest(subheaderClass);
}
//Determines what jQuery effect to use
switch (self.options.showEffect) {
//Uses `no effect`
case "none":
elem.show();
break;
//Uses the jQuery `show` special effect
case "show":
elem.show(self.options.showEffectSpeed);
break;
//Uses the jQuery `slideDown` special effect
case "slideDown":
elem.slideDown(self.options.showEffectSpeed);
break;
//Uses the jQuery `fadeIn` special effect
case "fadeIn":
elem.fadeIn(self.options.showEffectSpeed);
break;
//If none of the above options were passed, then a `jQueryUI show effect` is expected
default:
elem.show();
break;
}
}
// If the current subheader parent element is a header
if (elem.parent().is(headerClass)) {
// Hides all non-active sub-headers
self.hide($(subheaderClass).not(elem));
}
// If the current subheader parent element is not a header
else {
// Hides all non-active sub-headers
self.hide($(subheaderClass).not(elem.closest(headerClass).find(subheaderClass).not(elem.siblings())));
}
// Maintains chainablity
return self;
},
// Hide
// ----
// Closes the current sub-header
hide: function(elem) {
// Stores the plugin context in the `self` variable
var self = this;
//Determines what jQuery effect to use
switch (self.options.hideEffect) {
// Uses `no effect`
case "none":
elem.hide();
break;
// Uses the jQuery `hide` special effect
case "hide":
elem.hide(self.options.hideEffectSpeed);
break;
// Uses the jQuery `slideUp` special effect
case "slideUp":
elem.slideUp(self.options.hideEffectSpeed);
break;
// Uses the jQuery `fadeOut` special effect
case "fadeOut":
elem.fadeOut(self.options.hideEffectSpeed);
break;
// If none of the above options were passed, then a `jqueryUI hide effect` is expected
default:
elem.hide();
break;
}
// Maintains chainablity
return self;
},
// _triggerShow
// ------------
// Determines what elements get shown on scroll and click
_triggerShow: function(elem, scroll) {
var self = this;
// If the current element's parent is a header element or the next element is a nested subheader element
if (elem.parent().is(headerClass) || elem.next().is(subheaderClass)) {
// Shows the next sub-header element
self.show(elem.next(subheaderClass), scroll);
}
// If the current element's parent is a subheader element
else if (elem.parent().is(subheaderClass)) {
// Shows the parent sub-header element
self.show(elem.parent(), scroll);
}
// Maintains chainability
return self;
},
// _addCSSClasses
// --------------
// Adds CSS classes to the newly generated table of contents HTML
_addCSSClasses: function() {
// If the user wants a jqueryUI theme
if (this.options.theme === "jqueryui") {
this.focusClass = "ui-state-default";
this.hoverClass = "ui-state-hover";
//Adds the default styling to the dropdown list
this.element.addClass("ui-widget").find(".toc-title").addClass("ui-widget-header").end().find("li").addClass("ui-widget-content");
}
// If the user wants a twitterBootstrap theme
else if (this.options.theme === "bootstrap") {
this.element.find(headerClass + "," + subheaderClass).addClass("nav nav-list");
this.focusClass = "active";
}
// If the user wants a twitterBootstrap theme
else if (this.options.theme === "bootstrap3") {
this.element.find(headerClass + "," + subheaderClass).addClass("list-group");
this.element.find(itemClass).addClass("list-group-item");
this.focusClass = "active";
}
// If a user does not want a prebuilt theme
else {
// Adds more neutral classes (instead of jqueryui)
this.focusClass = tocFocusClassName;
this.hoverClass = tocHoverClassName;
}
//Maintains chainability
return this;
},
// setOption
// ---------
// Sets a single Tocify option after the plugin is invoked
setOption: function() {
// Calls the jQueryUI Widget Factory setOption method
$.Widget.prototype._setOption.apply(this, arguments);
},
// setOptions
// ----------
// Sets a single or multiple Tocify options after the plugin is invoked
setOptions: function() {
// Calls the jQueryUI Widget Factory setOptions method
$.Widget.prototype._setOptions.apply(this, arguments);
},
// _scrollTo
// ---------
// Scrolls to a specific element
_scrollTo: function(elem) {
var self = this,
duration = self.options.smoothScroll || 0,
scrollTo = self.options.scrollTo,
currentDiv = $('div[data-unique="' + elem.attr("data-unique") + '"]');
if (!currentDiv.length) {
return self;
}
// Once all animations on the page are complete, this callback function will be called
$("html, body").promise().done(function() {
// Animates the html and body element scrolltops
$("html, body").animate({
// Sets the jQuery `scrollTop` to the top offset of the HTML div tag that matches the current list item's `data-unique` tag
"scrollTop": currentDiv.offset().top - ($.isFunction(scrollTo) ? scrollTo.call() : scrollTo) + "px"
}, {
// Sets the smoothScroll animation time duration to the smoothScrollSpeed option
"duration": duration
});
});
// Maintains chainability
return self;
}
});
})); //end of plugin
</script>
<script>
/**
* jQuery Plugin: Sticky Tabs
*
* @author Aidan Lister <aidan@php.net>
* adapted by Ruben Arslan to activate parent tabs too
* http://www.aidanlister.com/2014/03/persisting-the-tab-state-in-bootstrap/
*/
(function($) {
"use strict";
$.fn.rmarkdownStickyTabs = function() {
var context = this;
// Show the tab corresponding with the hash in the URL, or the first tab
var showStuffFromHash = function() {
var hash = window.location.hash;
var selector = hash ? 'a[href="' + hash + '"]' : 'li.active > a';
var $selector = $(selector, context);
if($selector.data('toggle') === "tab") {
$selector.tab('show');
// walk up the ancestors of this element, show any hidden tabs
$selector.parents('.section.tabset').each(function(i, elm) {
var link = $('a[href="#' + $(elm).attr('id') + '"]');
if(link.data('toggle') === "tab") {
link.tab("show");
}
});
}
};
// Set the correct tab when the page loads
showStuffFromHash(context);
// Set the correct tab when a user uses their back/forward button
$(window).on('hashchange', function() {
showStuffFromHash(context);
});
// Change the URL when tabs are clicked
$('a', context).on('click', function(e) {
history.pushState(null, null, this.href);
showStuffFromHash(context);
});
return this;
};
}(jQuery));
window.buildTabsets = function(tocID) {
// build a tabset from a section div with the .tabset class
function buildTabset(tabset) {
// check for fade and pills options
var fade = tabset.hasClass("tabset-fade");
var pills = tabset.hasClass("tabset-pills");
var navClass = pills ? "nav-pills" : "nav-tabs";
// determine the heading level of the tabset and tabs
var match = tabset.attr('class').match(/level(\d) /);
if (match === null)
return;
var tabsetLevel = Number(match[1]);
var tabLevel = tabsetLevel + 1;
// find all subheadings immediately below
var tabs = tabset.find("div.section.level" + tabLevel);
if (!tabs.length)
return;
// create tablist and tab-content elements
var tabList = $('<ul class="nav ' + navClass + '" role="tablist"></ul>');
$(tabs[0]).before(tabList);
var tabContent = $('<div class="tab-content"></div>');
$(tabs[0]).before(tabContent);
// build the tabset
var activeTab = 0;
tabs.each(function(i) {
// get the tab div
var tab = $(tabs[i]);
// get the id then sanitize it for use with bootstrap tabs
var id = tab.attr('id');
// see if this is marked as the active tab
if (tab.hasClass('active'))
activeTab = i;
// remove any table of contents entries associated with
// this ID (since we'll be removing the heading element)
$("div#" + tocID + " li a[href='#" + id + "']").parent().remove();
// sanitize the id for use with bootstrap tabs
id = id.replace(/[.\/?&!#<>]/g, '').replace(/\s/g, '_');
tab.attr('id', id);
// get the heading element within it, grab it's text, then remove it
var heading = tab.find('h' + tabLevel + ':first');
var headingText = heading.html();
heading.remove();
// build and append the tab list item
var a = $('<a role="tab" data-toggle="tab">' + headingText + '</a>');
a.attr('href', '#' + id);
a.attr('aria-controls', id);
var li = $('<li role="presentation"></li>');
li.append(a);
tabList.append(li);
// set it's attributes
tab.attr('role', 'tabpanel');
tab.addClass('tab-pane');
tab.addClass('tabbed-pane');
if (fade)
tab.addClass('fade');
// move it into the tab content div
tab.detach().appendTo(tabContent);
});
// set active tab
$(tabList.children('li')[activeTab]).addClass('active');
var active = $(tabContent.children('div.section')[activeTab]);
active.addClass('active');
if (fade)
active.addClass('in');
if (tabset.hasClass("tabset-sticky"))
tabset.rmarkdownStickyTabs();
}
// convert section divs with the .tabset class to tabsets
var tabsets = $("div.section.tabset");
tabsets.each(function(i) {
buildTabset($(tabsets[i]));
});
};
</script>
<script>
window.initializeCodeFolding = function(show) {
// handlers for show-all and hide all
$("#rmd-show-all-code").click(function() {
$('div.r-code-collapse').each(function() {
$(this).collapse('show');
});
});
$("#rmd-hide-all-code").click(function() {
$('div.r-code-collapse').each(function() {
$(this).collapse('hide');
});
});
// index for unique code element ids
var currentIndex = 1;
// select all R code blocks
var rCodeBlocks = $('pre.r, pre.python, pre.bash, pre.sql, pre.cpp, pre.stan, pre.julia, pre.foldable');
rCodeBlocks.each(function() {
// skip if the block has fold-none class
if ($(this).hasClass('fold-none')) return;
// create a collapsable div to wrap the code in
var div = $('<div class="collapse r-code-collapse"></div>');
var showThis = (show || $(this).hasClass('fold-show')) && !$(this).hasClass('fold-hide');
var id = 'rcode-643E0F36' + currentIndex++;
div.attr('id', id);
$(this).before(div);
$(this).detach().appendTo(div);
// add a show code button right above
var showCodeText = $('<span>' + (showThis ? 'Hide' : 'Code') + '</span>');
var showCodeButton = $('<button type="button" class="btn btn-default btn-xs btn-secondary btn-sm code-folding-btn pull-right float-right"></button>');
showCodeButton.append(showCodeText);
showCodeButton
.attr('data-toggle', 'collapse')
.attr('data-bs-toggle', 'collapse') // BS5
.attr('data-target', '#' + id)
.attr('data-bs-target', '#' + id) // BS5
.attr('aria-expanded', showThis)
.attr('aria-controls', id);
var buttonRow = $('<div class="row"></div>');
var buttonCol = $('<div class="col-md-12"></div>');
buttonCol.append(showCodeButton);
buttonRow.append(buttonCol);
div.before(buttonRow);
// show the div if necessary
if (showThis) div.collapse('show');
// update state of button on show/hide
// * Change text
// * add a class for intermediate states styling
div.on('hide.bs.collapse', function () {
showCodeText.text('Code');
showCodeButton.addClass('btn-collapsing');
});
div.on('hidden.bs.collapse', function () {
showCodeButton.removeClass('btn-collapsing');
});
div.on('show.bs.collapse', function () {
showCodeText.text('Hide');
showCodeButton.addClass('btn-expanding');
});
div.on('shown.bs.collapse', function () {
showCodeButton.removeClass('btn-expanding');
});
});
}
</script>
<style type="text/css">.hljs-literal {
color: #990073;
}
.hljs-number {
color: #099;
}
.hljs-comment {
color: #998;
font-style: italic;
}
.hljs-keyword {
color: #900;
font-weight: bold;
}
.hljs-string {
color: #d14;
}
</style>
<script src="data:application/javascript;base64,LyohIGhpZ2hsaWdodC5qcyB2OS4xMi4wIHwgQlNEMyBMaWNlbnNlIHwgZ2l0LmlvL2hsanNsaWNlbnNlICovCiFmdW5jdGlvbihlKXt2YXIgbj0ib2JqZWN0Ij09dHlwZW9mIHdpbmRvdyYmd2luZG93fHwib2JqZWN0Ij09dHlwZW9mIHNlbGYmJnNlbGY7InVuZGVmaW5lZCIhPXR5cGVvZiBleHBvcnRzP2UoZXhwb3J0cyk6biYmKG4uaGxqcz1lKHt9KSwiZnVuY3Rpb24iPT10eXBlb2YgZGVmaW5lJiZkZWZpbmUuYW1kJiZkZWZpbmUoW10sZnVuY3Rpb24oKXtyZXR1cm4gbi5obGpzfSkpfShmdW5jdGlvbihlKXtmdW5jdGlvbiBuKGUpe3JldHVybiBlLnJlcGxhY2UoLyYvZywiJmFtcDsiKS5yZXBsYWNlKC88L2csIiZsdDsiKS5yZXBsYWNlKC8+L2csIiZndDsiKX1mdW5jdGlvbiB0KGUpe3JldHVybiBlLm5vZGVOYW1lLnRvTG93ZXJDYXNlKCl9ZnVuY3Rpb24gcihlLG4pe3ZhciB0PWUmJmUuZXhlYyhuKTtyZXR1cm4gdCYmMD09PXQuaW5kZXh9ZnVuY3Rpb24gYShlK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bGVhbik7YS50PWMubGVuZ3RoP3QoYy5qb2luKCJ8IiksITApOntleGVjOmZ1bmN0aW9uKCl7cmV0dXJuIG51bGx9fX19cihlKX1mdW5jdGlvbiBmKGUsdCxhLGkpe2Z1bmN0aW9uIG8oZSxuKXt2YXIgdCxhO2Zvcih0PTAsYT1uLmMubGVuZ3RoO2E+dDt0Kys
<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;}</style>
<script type="text/javascript">
if (window.hljs) {
hljs.configure({languages: []});
hljs.initHighlightingOnLoad();
if (document.readyState && document.readyState === "complete") {
window.setTimeout(function() { hljs.initHighlighting(); }, 0);
}
}
</script>
<style type="text/css">
.main-container {
max-width: 940px;
margin-left: auto;
margin-right: auto;
}
img {
max-width:100%;
}
.tabbed-pane {
padding-top: 12px;
}
.html-widget {
margin-bottom: 20px;
}
button.code-folding-btn:focus {
outline: none;
}
summary {
display: list-item;
}
details > summary > p:only-child {
display: inline;
}
pre code {
padding: 0;
}
</style>
<!-- tabsets -->
<style type="text/css">
.tabset-dropdown > .nav-tabs {
display: inline-table;
max-height: 500px;
min-height: 44px;
overflow-y: auto;
border: 1px solid #ddd;
border-radius: 4px;
}
.tabset-dropdown > .nav-tabs > li.active:before, .tabset-dropdown > .nav-tabs.nav-tabs-open:before {
content: "\e259";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}
.tabset-dropdown > .nav-tabs.nav-tabs-open > li.active:before {
content: "\e258";
font-family: 'Glyphicons Halflings';
border: none;
}
.tabset-dropdown > .nav-tabs > li.active {
display: block;
}
.tabset-dropdown > .nav-tabs > li > a,
.tabset-dropdown > .nav-tabs > li > a:focus,
.tabset-dropdown > .nav-tabs > li > a:hover {
border: none;
display: inline-block;
border-radius: 4px;
background-color: transparent;
}
.tabset-dropdown > .nav-tabs.nav-tabs-open > li {
display: block;
float: none;
}
.tabset-dropdown > .nav-tabs > li {
display: none;
}
</style>
<!-- code folding -->
<style type="text/css">
.code-folding-btn { margin-bottom: 4px; }
</style>
<style type="text/css">
#TOC {
margin: 25px 0px 20px 0px;
}
@media (max-width: 768px) {
#TOC {
position: relative;
width: 100%;
}
}
@media print {
.toc-content {
float: right;
}
}
.toc-content {
padding-left: 30px;
padding-right: 40px;
}
div.main-container {
max-width: 1200px;
}
div.tocify {
width: 20%;
max-width: 260px;
max-height: 85%;
}
@media (min-width: 768px) and (max-width: 991px) {
div.tocify {
width: 25%;
}
}
@media (max-width: 767px) {
div.tocify {
width: 100%;
max-width: none;
}
}
.tocify ul, .tocify li {
line-height: 20px;
}
.tocify-subheader .tocify-item {
font-size: 0.90em;
}
.tocify .list-group-item {
border-radius: 0px;
}
</style>
</head>
<body>
<div class="container-fluid main-container">
<!-- setup 3col/9col grid for toc_float and main content -->
<div class="row">
<div class="col-xs-12 col-sm-4 col-md-3">
<div id="TOC" class="tocify">
</div>
</div>
<div class="toc-content col-xs-12 col-sm-8 col-md-9">
<div id="header">
<div class="btn-group pull-right float-right">
<button type="button" class="btn btn-default btn-xs btn-secondary btn-sm dropdown-toggle" data-toggle="dropdown" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span>Code</span> <span class="caret"></span></button>
<ul class="dropdown-menu dropdown-menu-right" style="min-width: 50px;">
<li><a id="rmd-show-all-code" href="#">Show All Code</a></li>
<li><a id="rmd-hide-all-code" href="#">Hide All Code</a></li>
</ul>
</div>
<h1 class="title toc-ignore">Visualising the Development of
openSenseMap.org in 2022</h1>
<h4 class="author">Jan Stenkamp</h4>
<h4 class="date">2023-03-08</h4>
1 year ago
</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>
<pre class="r"><code># required packages:
library(opensensmapr) # data download
library(dplyr) # data wrangling
library(ggplot2) # plotting
library(lubridate) # date arithmetic
library(zoo) # rollmean()</code></pre>
<p>openSenseMap.org has grown quite a bit in the last years; it would be
interesting to see how we got to the current 11448 sensor stations,
1 year 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.</p>
<p>So the first step is to retrieve <em>all the boxes</em>.</p>
<pre class="r"><code># if you want to see results for a specific subset of boxes,
# just specify a filter such as grouptag=&#39;ifgi&#39; here
# boxes = osem_boxes(cache = &#39;.&#39;)
boxes = readRDS(&#39;boxes_precomputed.rds&#39;) # read precomputed file to save resources </code></pre>
1 year ago
<div id="introduction" class="section level1">
<h1>Introduction</h1>
<p>In the following we just want to have a look at the boxes created in
2022, so we filter for them.</p>
<pre class="r"><code>boxes = filter(boxes, locationtimestamp &gt;= &quot;2022-01-01&quot; &amp; locationtimestamp &lt;=&quot;2022-12-31&quot;)
summary(boxes) -&gt; summary.data.frame</code></pre>
<pre><code>## boxes total: 2107
1 year ago
##
## boxes by exposure:
## indoor mobile outdoor unknown
## 524 200 1382 1
1 year ago
##
## boxes by model:
## custom hackair_home_v2 homeEthernet
## 931 5 5
1 year ago
## homeEthernetFeinstaub homeV2Ethernet homeV2EthernetFeinstaub
## 2 5 5
## homeV2Lora homeV2Wifi homeV2WifiFeinstaub
## 58 220 114
## homeWifi homeWifiFeinstaub luftdaten_pms1003
## 14 17 0
## luftdaten_pms1003_bme280 luftdaten_pms3003 luftdaten_pms3003_bme280
## 1 0 0
## luftdaten_pms5003 luftdaten_pms5003_bme280 luftdaten_pms7003
## 2 8 0
## luftdaten_pms7003_bme280 luftdaten_sds011 luftdaten_sds011_bme280
## 8 28 462
## luftdaten_sds011_bmp180 luftdaten_sds011_dht11 luftdaten_sds011_dht22
## 27 7 188
##
## $last_measurement_within
## 1h 1d 30d 365d never
## 0 0 851 1542 497
1 year ago
##
## oldest box: 2020-02-29 23:00:31 (Kirchardt 1)
## newest box: 2022-12-30 09:19:46 (Balkon)
##
## sensors per box:
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 1.000 3.000 5.000 4.978 6.000 29.000</code></pre>
<!-- This gives a good overview already: As of writing this, there are more than 11,000 -->
<!-- sensor stations, of which ~30% are currently running. Most of them are placed -->
<!-- outdoors and have around 5 sensors each. -->
<!-- The oldest station is from August 2016, while the latest station was registered a -->
<!-- couple of minutes ago. -->
<p>Another feature of interest is the spatial distribution of the boxes:
<code>plot()</code> can help us out here. This function requires a bunch
of optional dependencies though.</p>
<pre class="r"><code>plot(boxes)</code></pre>
1 year ago
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABUAAAAPACAMAAADDuCPrAAAA5FBMVEUAAAAAADoAAGYAOjoAOmYAOpAAZmYAZrYil+Y6AAA6OgA6Ojo6OmY6ZmY6ZpA6ZrY6kJA6kLY6kNth0E9mAABmAGZmOgBmOjpmZjpmZmZmZpBmkJBmkLZmkNtmtrZmtttmtv+QOgCQZgCQZjqQZmaQZpCQkGaQtraQttuQtv+Q29uQ2/+2ZgC2Zjq2kGa2kLa2tpC2tra2ttu225C229u22/+2/7a2//++vr7bkDrbkGbbtmbbtpDbtrbb27bb29vb2//b/7bb/9vb///fU2v/tmb/25D/27b/29v//7b//9v///+eieL0AAAACXBIWXMAAB2HAAAdhwGP5fFlAAAgAElEQVR4nOy9DdMkt3HniZEl0yPvSbts2j56GSvKcoR9qxHP0lKh5pGWvKcZ0pr+/t9nu7vwkplIAAkUUIWqzn9MzNNdhcJLIvErvFW1ualUKpWqSWbvDKhUKtVRpQBVqVSqRilAVSqVqlEKUJVKpWqUAlSlUqkapQBVqVSqRilAVSqVqlEKUJVKpWqUAlSlUqkapQBVqVSqRilAVSqVqlEKUJVKpWqUAlSlUqkapQBVqVSqRilAVSqVqlEKUJVKpWqUAlSlUqkapQBVqVSqRilAVSqVqlEKUJVKpWqUAlSlUqkapQBVqV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oSb31jXppqR0nr55bm3Mp9Dqv1ydMr7A3lYUotfWW2Z5BjINZM5TdU1WtswGUcw7gULEHEXdiuZZurblAiTxw
<p>But what do these sensor stations actually measure? Lets find out.
<code>osem_phenomena()</code> gives us a named list of of the counts of
each observed phenomenon for the given set of sensor stations:</p>
<pre class="r"><code>phenoms = osem_phenomena(boxes)
str(phenoms)</code></pre>
<pre><code>## List of 966
## $ Temperatur : int 1520
## $ rel. Luftfeuchte : int 1289
## $ PM10 : int 1069
## $ PM2.5 : int 1068
1 year ago
## $ Luftdruck : int 994
## $ Beleuchtungsstärke : int 282
## $ UV-Intensität : int 282
## $ VOC : int 224
## $ Lufttemperatur : int 208
## $ CO₂ : int 178
## $ Bodenfeuchte : int 170
## $ Temperature : int 167
1 year ago
## $ Luftfeuchte : int 134
## $ Lautstärke : int 131
## $ Humidity : int 123
1 year ago
## $ atm. Luftdruck : int 114
## $ Kalibrierungswert : int 108
## $ CO2eq : int 107
## $ IAQ : int 107
## $ Temperatur SCD30 : int 107
## $ rel. Luftfeuchte SCD30 : int 107
## $ Pressure : int 97
1 year ago
## $ Luftfeuchtigkeit : int 62
## $ PM01 : int 57
1 year ago
## $ Bodentemperatur : int 55
## $ Windgeschwindigkeit : int 46
## $ Feinstaub PM10 : int 41
## $ Feinstaub PM2.5 : int 32
## $ Feinstaub PM1.0 : int 28
## $ Batterie : int 22
## $ Taupunkt : int 19
## $ Windrichtung : int 19
## $ rel. Luftfeuchte (HECA) : int 16
## $ Temperatur (HECA) : int 15
## $ Temperatura : int 15
## $ Durchschnitt Umgebungslautstärke : int 14
## $ Helligkeit : int 14
## $ Latitude : int 14
## $ Longtitude : int 14
## $ Minimum Umgebungslautstärke : int 14
## $ RSSI : int 14
## $ UV-Index : int 11
## $ CO2 : int 10
## $ PM1 : int 10
## $ rel-. Luftfeuchte : int 10
## $ temperature : int 10
## $ Abstand nach links : int 9
## $ Abstand nach rechts : int 9
## $ Beschleunigung X-Achse : int 9
## $ Beschleunigung Y-Achse : int 9
## $ Beschleunigung Z-Achse : int 9
## $ Feinstaub PM25 : int 9
## $ Luftdruck absolut : int 9
## $ Luftdruck relativ : int 9
## $ Regenrate : int 9
## $ Sonnenstrahlung : int 9
## $ gefühlte Temperatur : int 9
## $ Geschwindigkeit : int 8
## $ humidity : int 8
## $ Bodenfeuchtigkeit : int 7
## $ Baterie : int 6
## $ Bodenfeuchte 10cm : int 6
## $ Bodenfeuchte 30cm : int 6
## $ Bodentemperatur 10cm : int 6
## $ Bodentemperatur 30cm : int 6
## $ Lumina : int 6
## $ Taupunktdifferenz (Spread) : int 6
## $ UV : int 6
## $ Umiditate : int 6
## $ Air pressure : int 5
## $ Battery : int 5
## $ PM4 : int 5
## $ Pegel : int 5
## $ Prezenta-foc : int 5
## $ Regenmenge : int 5
## $ W-LAN : int 5
## $ Bodenfeuchte 1 : int 4
## $ Bodenfeuchte 2 : int 4
## $ Bodentemperatur 1 : int 4
## $ Bodentemperatur 2 : int 4
## $ CO2 Konzentration : int 4
## $ Gesamt Gewicht : int 4
## $ PM 2.5 : int 4
## $ Température : int 4
## $ Wilgotność : int 4
## $ Windspeed : int 4
## $ absolute Luftfeuchtigkeit : int 4
## $ Battery Voltage : int 3
## $ Befehl : int 3
## $ Bodenfeuchte 50cm : int 3
## $ Bodentemperatur 60cm : int 3
## $ Ciśnienie : int 3
## $ Feinstaub : int 3
## $ Humedad : int 3
## $ Höhe : int 3
## $ Laufzeit : int 3
## $ LuftfeuchteBME : int 3
## $ Luftfeuchtigkeit_01 : int 3
## $ LufttemperaturBME : int 3
## [list output truncated]</code></pre>
<p>Thats quite some noise there, with many phenomena being measured by a
single sensor only, or many duplicated phenomena due to slightly
different spellings. We should clean that up, but for now lets just
filter out the noise and find those phenomena with high sensor
numbers:</p>
<pre class="r"><code>phenoms[phenoms &gt; 50]</code></pre>
<pre><code>## $Temperatur
## [1] 1520
##
## $`rel. Luftfeuchte`
## [1] 1289
##
## $PM10
## [1] 1069
1 year ago
##
## $PM2.5
## [1] 1068
1 year ago
##
## $Luftdruck
## [1] 994
##
## $Beleuchtungsstärke
## [1] 282
##
## $`UV-Intensität`
## [1] 282
##
## $VOC
## [1] 224
##
## $Lufttemperatur
## [1] 208
##
## $`CO₂`
## [1] 178
##
## $Bodenfeuchte
## [1] 170
##
## $Temperature
## [1] 167
1 year ago
##
## $Luftfeuchte
## [1] 134
##
## $Lautstärke
## [1] 131
##
## $Humidity
## [1] 123
1 year ago
##
## $`atm. Luftdruck`
## [1] 114
##
## $Kalibrierungswert
## [1] 108
##
## $CO2eq
## [1] 107
##
## $IAQ
## [1] 107
##
## $`Temperatur SCD30`
## [1] 107
##
## $`rel. Luftfeuchte SCD30`
## [1] 107
##
## $Pressure
## [1] 97
1 year ago
##
## $Luftfeuchtigkeit
## [1] 62
##
## $PM01
## [1] 57
1 year ago
##
## $Bodentemperatur
## [1] 55</code></pre>
</div>
<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. Because of some database
migration issues the <code>createdAt</code> values are mostly wrong
(~80% of boxes created 2022-03-30), so we are using the
<code>timestamp</code> attribute of the <code>currentlocation</code>
which should in most cases correspond to the creation date.</p>
<p>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>
<pre class="r"><code>exposure_counts = boxes %&gt;%
group_by(exposure) %&gt;%
mutate(count = row_number(locationtimestamp))
exposure_colors = c(indoor = &#39;red&#39;, outdoor = &#39;lightgreen&#39;, mobile = &#39;blue&#39;, unknown = &#39;darkgrey&#39;)
ggplot(exposure_counts, aes(x = locationtimestamp, y = count, colour = exposure)) +
geom_line() +
scale_colour_manual(values = exposure_colors) +
xlab(&#39;Registration Date&#39;) + ylab(&#39;senseBox count&#39;)</code></pre>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABUAAAAPACAMAAADDuCPrAAABpF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86+uz5spKAOgioUFr7CKiaNIZzsoOOv/qooiSgDgIqlNY+AqomjeGc6qAB4+mUBNRBQIXS2kdA1aQxnFMdNGg+CWgBARVKax8BVZPGcE5x0KA777mSgDoIqFBa+wiomjSGc4KDKvSTgOYQUKG09hFQNWkM5wQHDR1PpySgDgIqlNY+AqomjeGc4KAEVA8CKpTWPgKqJo3hnNyg4XffnZKAOgioUFr7CKiaNIZzWoOGPfmzrCSgDgIqlNY+AqomjeGc1KBK9VwT0IIYAQUAE87OYv8ES4ctUKG09rEFqiaN4ZzSoFqbn2u2QAsIqFBa+wiomjSGc0KDKvaTgOYQUKG09hFQNWkM53QG1ewnAc0hoEJp7SOgatIYzqkMqnf8yCsJqIOACqW1j4CqSWM4JzKobj4JaAEBFUprHwFVk8ZwTmRQ3XwS0AICKpTWPgKqJo3hnMSg2tufBLSAgAqltY+AqkljOKcwqH4/CWgOARVKax8BVZPGcE5hUPV8EtACAiqU1j4CqiaN4ZzCoATUDAIqlNY+AqomjeGcwKD6O/AEtICACqW1j4CqSWM4JzCoQT8JaA4BFUprHwFVk8Zwxh/UYgOUgOYQUKG09hFQNWkMZ/xBLfpJQHMIqFBa+wiomjSGM/6gBNQQAiqU1j4CqiaN4Yw+qMkePAHNIaBCae0joGrSGM6og2p9gEeNkoA6CKhQWvsIqJo0hjPmoHb9JKA5BFQorX0EVE0a
1 year ago
<p>Outdoor boxes are growing <em>fast</em>! We can also see the
introduction of <code>mobile</code> sensor “stations” in 2017.</p>
<p>Lets have a quick summary:</p>
<pre class="r"><code>exposure_counts %&gt;%
summarise(
oldest = min(locationtimestamp),
newest = max(locationtimestamp),
count = max(count)
) %&gt;%
arrange(desc(count))</code></pre>
<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">2022-01-01 11:59:16</td>
<td align="left">2022-12-30 09:19:46</td>
<td align="right">1382</td>
1 year ago
</tr>
<tr class="even">
<td align="left">indoor</td>
<td align="left">2022-01-02 11:06:08</td>
<td align="left">2022-12-23 20:46:45</td>
<td align="right">524</td>
</tr>
<tr class="odd">
<td align="left">mobile</td>
<td align="left">2022-01-06 13:20:00</td>
<td align="left">2022-12-21 21:35:16</td>
<td align="right">200</td>
</tr>
<tr class="even">
<td align="left">unknown</td>
<td align="left">2022-03-01 07:04:30</td>
<td align="left">2022-03-01 07:04:30</td>
<td align="right">1</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>
<pre class="r"><code>grouptag_counts = boxes %&gt;%
group_by(grouptag) %&gt;%
# only include grouptags with 15 or more members
filter(length(grouptag) &gt;= 15 &amp; !is.na(grouptag) &amp; grouptag != &#39;&#39;) %&gt;%
mutate(count = row_number(locationtimestamp))
# helper for sorting the grouptags by boxcount
sortLvls = function(oldFactor, ascending = TRUE) {
lvls = table(oldFactor) %&gt;% sort(., decreasing = !ascending) %&gt;% names()
factor(oldFactor, levels = lvls)
}
grouptag_counts$grouptag = sortLvls(grouptag_counts$grouptag, ascending = FALSE)
ggplot(grouptag_counts, aes(x = locationtimestamp, y = count, colour = grouptag)) +
geom_line(aes(group = grouptag)) +
xlab(&#39;Registration Date&#39;) + ylab(&#39;senseBox count&#39;)</code></pre>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABUAAAAPACAMAAADDuCPrAAAB11BMVEUAAAAAADoAAGYAOjoAOmYAOpAAZpAAZrYAqf8AuOcAvmcAv8QAwZoMtwIzMzM6AAA6AGY6OgA6Ojo6OmY6OpA6ZmY6ZpA6ZrY6kJA6kLY6kNtNTU1NTW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jCMAlLMAgJJLOqjwdDnUCUwdARq+eSTu/XH9ge3xHfpBpKYN4wgA5SwAoOSSDio8XQ51AmhXgCJuA0A5CwAouaSDCj+X4wyAjikAlLMAgJJLOqjwczn0FUgAdBwBoJwFAJRc0kGFl8txBkBHFQDKWQBAySUdVPi3HGdnySXwAHQcAaCcBQCUXNJBhW/LcXaWAvoagI4jAJSzAICSSzqo8Go5TD3t/ASgPgeAchYAUHJJBxX+LMdZlk+rDXgA6nUAKGcBACWXdFDhyXKs6GnpJwD1OQCUswCAkks6qPBiOVb1tNyAB6BeB4ByFgBQckkHFf0vR5Ge1n4CUJ8DQDkLACi5pIOK3pejkE9rP1sA+p+t4uqXf9QBoJwFAJRc0kFFz8tRqOep7Q7QUwDqdQAoZwEAJZd0UNHvcpT5CUBHFQDKWQBAySUdVPS6HGV8AtBxBYByFgBQckkHFT0uR+nw8xSAjisAlLMAgJJLOqjobzmq/ASgowoA5SwAoOSSDip6W44qPgHouAJAOQsAKLmkg4qelqNy+HkKQMcVAMpZAEDJJR1U9LMcdX4C0FEFgHIWAFBySQcVvSxHHZ8AdFwBoJwFAJRc0kFFD8tRO/w8BaDjCgDlLACg5JIOKrpfDoqfAHRUAaCcBQCUXNJBRafLUXDTupIA0DEFgHIWAFBySQcV
1 year ago
<pre class="r"><code>grouptag_counts %&gt;%
summarise(
oldest = min(locationtimestamp),
newest = max(locationtimestamp),
count = max(count)
) %&gt;%
arrange(desc(count))</code></pre>
<div class="kable-table">
<table>
<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-01-02 11:06:08</td>
<td align="left">2022-12-18 12:38:27</td>
<td align="right">127</td>
</tr>
<tr class="even">
<td align="left">HU Explorers</td>
<td align="left">2022-04-01 09:07:41</td>
<td align="left">2022-12-14 10:11:34</td>
<td align="right">123</td>
</tr>
<tr class="odd">
<td align="left">321heiss</td>
<td align="left">2022-07-09 01:29:37</td>
<td align="left">2022-09-01 06:27:35</td>
<td align="right">91</td>
</tr>
<tr class="even">
<td align="left">Captographies</td>
<td align="left">2022-06-03 11:25:27</td>
<td align="left">2022-11-16 13:26:39</td>
<td align="right">57</td>
1 year ago
</tr>
<tr class="odd">
<td align="left">SUGUCS</td>
<td align="left">2022-11-30 15:25:32</td>
<td align="left">2022-12-03 10:11:41</td>
<td align="right">23</td>
</tr>
<tr class="even">
<td align="left">SekSeeland</td>
<td align="left">2022-03-14 13:17:17</td>
<td align="left">2022-03-22 20:23:58</td>
<td align="right">19</td>
</tr>
<tr class="odd">
<td align="left">BurgerMeetnet</td>
<td align="left">2022-01-24 15:33:19</td>
<td align="left">2022-05-10 21:22:35</td>
<td align="right">16</td>
</tr>
<tr class="even">
<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="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-01-15 20:43:16</td>
<td align="left">2022-02-11 17:59:05</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">
<td align="left">Mikroprojekt Mitmachklima</td>
<td align="left">2022-02-09 10:28:40</td>
<td align="left">2022-08-23 13:14:11</td>
<td align="right">15</td>
</tr>
<tr class="even">
1 year 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>
<tr class="odd">
1 year 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>
<tr class="even">
1 year 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>
</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>locationtimestamp</code> into bins
of one week:</p>
<pre class="r"><code>bins = &#39;week&#39;
mvavg_bins = 6
growth = boxes %&gt;%
mutate(week = cut(as.Date(locationtimestamp), breaks = bins)) %&gt;%
group_by(week) %&gt;%
summarize(count = length(week)) %&gt;%
mutate(event = &#39;registered&#39;)</code></pre>
<p>We can do the same for <code>updatedAt</code>, which informs us about
the last change to a box, including uploaded measurements. As a lot of
boxes were “updated” by the database migration, many of them are updated
at 2022-03-30, so we try to use the <code>lastMeasurement</code>
attribute instead of <code>updatedAt</code>. This leads to fewer boxes
but also automatically excludes boxes which were created but never made
a measurement.</p>
<p>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>
<pre class="r"><code>inactive = boxes %&gt;%
# remove boxes that were updated in the last two days,
# b/c any box becomes inactive at some point by definition of updatedAt
filter(lastMeasurement &lt; now() - days(2)) %&gt;%
mutate(week = cut(as.Date(lastMeasurement), breaks = bins)) %&gt;%
filter(as.Date(week) &gt; as.Date(&quot;2021-12-31&quot;)) %&gt;%
group_by(week) %&gt;%
summarize(count = length(week)) %&gt;%
mutate(event = &#39;inactive&#39;)</code></pre>
<p>Now we can combine both datasets for plotting:</p>
<pre class="r"><code>boxes_by_date = bind_rows(growth, inactive) %&gt;% group_by(event)
ggplot(boxes_by_date, aes(x = as.Date(week), colour = event)) +
xlab(&#39;Time&#39;) + ylab(paste(&#39;rate per &#39;, bins)) +
scale_x_date(date_breaks=&quot;years&quot;, date_labels=&quot;%Y&quot;) +
scale_colour_manual(values = c(registered = &#39;lightgreen&#39;, inactive = &#39;grey&#39;)) +
geom_point(aes(y = count), size = 0.5) +
# moving average, make first and last value NA (to ensure identical length of vectors)
geom_line(aes(y = rollmean(count, mvavg_bins, fill = list(NA, NULL, NA))))</code></pre>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABUAAAAPACAMAAADDuCPrAAABdFBMVEUAAAAAADoAAGYAOjoAOmYAOpAAZpAAZrYzMzM6AAA6OgA6Ojo6OmY6OpA6ZmY6ZpA6ZrY6kJA6kLY6kNtNTU1NTW5NTY5Nbm5Nbo5NbqtNjshmAABmADpmOgBmOjpmOmZmOpBmZgBmZjpmZmZmZpBmkGZmkJBmkLZmkNtmtttmtv9uTU1ubk1ubm5ubo5ujqtujshuq+SOTU2Obk2Obm6Oq6uOq8iOq+SOyOSOyP+QOgCQOjqQZjqQZmaQkGaQkLaQtraQttuQ29uQ2/+Q7pCrbk2rbm6rjm6ryOSr5P+2ZgC2Zjq2Zma2kDq2kGa2kJC2kLa2tpC2tra2ttu2tv+229u22/+2//++vr7Ijk3Ijm7Iq27I5P/I///bkDrbkGbbtmbbtpDbtrbbttvb25Db27bb29vb2//b///kq27kyI7kyKvk5Mjk///r6+vy8vL/tmb/yI7/25D/27b/29v/5Kv/5Mj//7b//8j//9v//+T///89rGHCAAAACXBIWXMAAB2HAAAdhwGP5fFlAAAgAElEQVR4nO3d/4NbdXafcQ3YMQMboEWmGJZtu2xCYNoQnLRdWHYTurhkTSFt2t31UOOFtMna2Zr6CzYe65+vrnQ1oyvp6uie+9GZ95Ge1w/Y8mgk2WfOg75rMAIAuAzO+wIAQFYEFACcCCgAOBFQAHAioADgREABwImAAoATAQUAJwIKAE4EFACcCCgAOBFQAHAioADgFBTQb33c34iiGIOCNNsQ0xQNroA+/qvhcPjez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GAwsYYFKTZhpimaCCgsDEGBWm2IaYpGggobIxBQZptiGmKBgIKG2NQkGYbYpqigYDCxhgUpNmGmKZoIKCwMQYFabYhpikaCChsjEFBmm2IaYoGAgobY1CQZhtimqKBgMLGGBSk2YaYpmggoLAxBgVptiGmKRoIKGyMQUGabYhpigYCChtjUJBmG2KaooGAwsYYFKTZhpimaCCgsDEGBWm2IaYpGggobIxBQZptiGmKBgIKG2NQkGYbYpqigYDCxhgUpNmGmKZoIKCwMQYFabYhpikaCChsjEFBmm2IaYoGAgobY1CQZhtimqKBgMLGGBSk2YaYpmggoLAxBgVptiGmKRoIKGyMQUGabYhpigYCChtjUJBmG2KaooGAwsYYFKTZhpimaCCgsDEGBWm2IaYpGggobIxBQZptiGmKBgIKG2NQkGYbYpqigYDCxhgUpNmGmKZoIKCwMQYFabYhpikaCChsjEFBmm2IaYoGAgobY1CQZhtimqKBgMLGGBSk2YaYpmggoLAxBgVptiGmKRoIKGyMQUGabYhpigYCChtjUJBmG2KaooGAwsYYFKTZhpimaCCgsDEGBWm2IaYpGggobIxBQZptiGmKBgIKG2NQkGYbYpqigYDCxhgUpNmGmKZoIKCwMQYFabYhpikaCChsjEFBmm2IaYoGAgobY1CQZhtimqKBgMLGGBSk2YaYpmggoLAxBgVptiGmKRoIKGyMQUGabYhpigYCChtjUJBmG2KaooGAwsYYFKTZhpimaCCgsDEGBWm2IaYpGggobIxBQZptiGmKBgIKG2NQkGYbYpqigYDCxhgUpNmGmKZoIKCwMQYFabYhpikaCChsjEFBmm2IaYoGAgobY1CQZhtimqKBgMLGGBSk2YaYpmggoLAxBgVptiGmKRoIKGyMQUGabYhpigYCChtjUJBmG2KaooGAwsYYFKTZhpimaCCgsDEGBWm2IaYpGggobIxBQZptiGmKBgIKG2NQkGYbYpqigYDCxhgUpNmGmKZoIKCwMQYFabYh
1 year ago
<p>And see in which weeks the most boxes become (in)active:</p>
<pre class="r"><code>boxes_by_date %&gt;%
filter(count &gt; 50) %&gt;%
arrange(desc(count))</code></pre>
<div class="kable-table">
<table>
<thead>
<tr class="header">
<th align="left">week</th>
<th align="right">count</th>
<th align="left">event</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td align="left">2023-02-27</td>
<td align="right">769</td>
<td align="left">inactive</td>
</tr>
<tr class="even">
1 year ago
<td align="left">2022-11-21</td>
<td align="right">92</td>
<td align="left">registered</td>
</tr>
<tr class="odd">
1 year ago
<td align="left">2022-06-06</td>
<td align="right">76</td>
1 year ago
<td align="left">registered</td>
</tr>
<tr class="even">
1 year ago
<td align="left">2022-08-29</td>
<td align="right">76</td>
<td align="left">registered</td>
</tr>
<tr class="odd">
1 year ago
<td align="left">2022-10-31</td>
<td align="right">71</td>
<td align="left">registered</td>
</tr>
<tr class="even">
1 year ago
<td align="left">2022-11-14</td>
<td align="right">67</td>
<td align="left">registered</td>
</tr>
<tr class="odd">
1 year ago
<td align="left">2022-11-28</td>
<td align="right">65</td>
<td align="left">registered</td>
</tr>
<tr class="even">
1 year ago
<td align="left">2022-08-22</td>
<td align="right">61</td>
<td align="left">registered</td>
</tr>
<tr class="odd">
1 year ago
<td align="left">2022-02-28</td>
<td align="right">57</td>
<td align="left">registered</td>
</tr>
<tr class="even">
1 year ago
<td align="left">2022-08-29</td>
<td align="right">55</td>
<td align="left">inactive</td>
</tr>
<tr class="odd">
1 year ago
<td align="left">2022-03-21</td>
<td align="right">54</td>
<td align="left">registered</td>
</tr>
<tr class="even">
1 year ago
<td align="left">2022-12-12</td>
<td align="right">54</td>
<td align="left">registered</td>
</tr>
<tr class="odd">
1 year ago
<td align="left">2022-01-24</td>
<td align="right">51</td>
<td align="left">registered</td>
</tr>
</tbody>
</table>
</div>
</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>locationtimestamp</code> and
<code>lastMeasurement</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>
<pre class="r"><code>durations = boxes %&gt;%
group_by(exposure) %&gt;%
filter(!is.na(lastMeasurement)) %&gt;%
mutate(duration = difftime(lastMeasurement, locationtimestamp, units=&#39;days&#39;)) %&gt;%
filter(duration &gt;= 0)
ggplot(durations, aes(x = exposure, y = duration)) +
geom_boxplot() +
coord_flip() + ylab(&#39;Duration active in Days&#39;)</code></pre>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABUAAAAPACAMAAADDuCPrAAABa1BMVEUAAAAAADoAAGYAOjoAOmYAOpAAZrYzMzM6AAA6AGY6OgA6Ojo6OmY6OpA6ZmY6ZpA6ZrY6kJA6kLY6kNtNTU1NTW5NTY5Nbm5Nbo5NbqtNjshmAABmADpmOgBmOjpmZgBmZjpmZmZmZpBmkGZmkLZmkNtmtttmtv9uTU1ubk1ubm5ubo5ujo5ujqtujshuq+SOTU2Obk2Obm6Ojo6Oq6uOq8iOq+SOyOSOyP+QOgCQOjqQZjqQZmaQZpCQZraQkGaQkLaQtraQttuQ2/+rbk2rbm6rjm6ryOSr5P+2ZgC2Zjq2kDq2kGa2kJC2tpC2tra2ttu229u22/+2///Ijk3Ijm7Iq27Iq47IyI7I5P/I///bkDrbkGbbkJDbtmbbtpDbtrbb27bb29vb2//b///kq27kq47kyI7kyKvk5P/k///r6+v/tmb/yI7/25D/27b/29v/5Kv/5Mj/5OT//7b//8j//9v//+T///+WihKMAAAACXBIWXMAAB2HAAAdhwGP5fFlAAAgAElEQVR4nO29/4Nc1ZmfWRiMtCZrs+OWY8MwO544RpONDZNJYsh4N5uxl7HG3nXGljfBZCGOIcwQBIYB6f75W9+69Z7q6r593vv2faq7ns8PRkeqPs/5vDp6XK2qbi0GY4wxqSzoAxhjzE2NAjXGmGQUqDHGJKNAjTEmGQVqjDHJKFBjjElGgRpjTDIK1BhjklGgxhiTjAI1xphkFKgxxiSjQI0xJhkFaowxyRyUQP9HJskPKwuNh/n2h/E0H8bPzt9xlgKdGhqvQOADwHia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AySjQmYlNFOjUKNBBgZJRoDMTm1QK9Ml/+uHTxaOTl7o3SBYqnlAv/8qP
<p>The time of activity averages at only 148 days, though there are
boxes with 423 days of activity, spanning a large chunk of
1 year ago
openSenseMaps existence.</p>
</div>
<div id="by-grouptag" class="section level2">
<h2>…by grouptag</h2>
<pre class="r"><code>durations = boxes %&gt;%
filter(!is.na(lastMeasurement)) %&gt;%
group_by(grouptag) %&gt;%
# only include grouptags with 20 or more members
filter(length(grouptag) &gt;= 15 &amp; !is.na(grouptag) &amp; !is.na(lastMeasurement)) %&gt;%
mutate(duration = difftime(lastMeasurement, locationtimestamp, units=&#39;days&#39;)) %&gt;%
filter(duration &gt;= 0)
ggplot(durations, aes(x = grouptag, y = duration)) +
geom_boxplot() +
coord_flip() + ylab(&#39;Duration active in Days&#39;)</code></pre>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABUAAAAPACAMAAADDuCPrAAABlVBMVEUAAAAAADoAAGYAOjoAOmYAOpAAZrYzMzM6AAA6OgA6Ojo6OmY6OpA6ZmY6ZpA6ZrY6kJA6kLY6kNtNTU1NTW5NTY5Nbm5Nbo5NbqtNjshmAABmOgBmOjpmOpBmZgBmZjpmZmZmZpBmkJBmkLZmkNtmtttmtv9uTU1uTY5ubk1ubm5ubo5ujo5ujqtujshuq6tuq8huq+SOTU2Obk2Obm6Ojk2Ojm6Ojo6Oq6uOq8iOq+SOyOSOyP+QOgCQZjqQZmaQkGaQkLaQtraQttuQ2/+rbk2rbm6rjm6rq46rq8iryOSr5Mir5P+2ZgC2Zjq2Zma2kDq2kGa2kJC2tpC2tra2ttu229u22/+2///Ijk3Ijm7Iq27Iq47Iq6vIyI7IyKvI5KvI5OTI5P/I/8jI///bkDrbkGbbtmbbtpDbtrbbttvb27bb29vb2//b///kq27kq47kyI7kyKvkyMjk5Kvk5Mjk5P/k/+Tk///r6+v/tmb/yI7/25D/27b/29v/5Kv/5Mj/5OT//7b//8j//9v//+T////519j9AAAACXBIWXMA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AgCTTVoPTs1AIFK8pAf681kWsdaUgSBphq0np0agEAleciP9WYyrWMtKYJAUw1az04NQKCSPOTHejOZ1rGWFEGgqQatZ6cGIFBJHvJjvZlM61hLiiDQVIPWs1MDEKgkD/mx3kymdawlRRBoqkHr2akBCFSSh/xYbybTOtaSIgg01aD17NQABCrJQ36sN5NpHWtJEQSaatB6
1 year ago
<pre class="r"><code>durations %&gt;%
summarize(
duration_avg = round(mean(duration)),
duration_min = round(min(duration)),
duration_max = round(max(duration)),
oldest_box = round(max(difftime(now(), locationtimestamp, units=&#39;days&#39;)))
) %&gt;%
arrange(desc(duration_avg))</code></pre>
<div class="kable-table">
<table>
<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">Burgermeetnet</td>
<td align="left">238 days</td>
1 year ago
<td align="left">0 days</td>
<td align="left">409 days</td>
<td align="left">417 days</td>
1 year ago
</tr>
<tr class="even">
<td align="left">BurgerMeetnet</td>
<td align="left">171 days</td>
1 year ago
<td align="left">0 days</td>
<td align="left">400 days</td>
<td align="left">408 days</td>
1 year ago
</tr>
<tr class="odd">
<td align="left">Captographies</td>
<td align="left">125 days</td>
1 year ago
<td align="left">0 days</td>
<td align="left">266 days</td>
<td align="left">276 days</td>
1 year ago
</tr>
<tr class="even">
<td align="left">BRGL</td>
<td align="left">113 days</td>
1 year ago
<td align="left">109 days</td>
<td align="left">114 days</td>
<td align="left">122 days</td>
1 year ago
</tr>
<tr class="odd">
<td align="left">MSGB</td>
<td align="left">92 days</td>
1 year ago
<td align="left">39 days</td>
<td align="left">106 days</td>
<td align="left">114 days</td>
1 year ago
</tr>
<tr class="even">
<td align="left">AGIN</td>
<td align="left">91 days</td>
1 year ago
<td align="left">87 days</td>
<td align="left">92 days</td>
<td align="left">100 days</td>
1 year ago
</tr>
<tr class="odd">
1 year ago
<td align="left">HTLJ</td>
<td align="left">91 days</td>
1 year ago
<td align="left">58 days</td>
<td align="left">99 days</td>
<td align="left">107 days</td>
</tr>
<tr class="even">
<td align="left">edu</td>
<td align="left">89 days</td>
<td align="left">0 days</td>
<td align="left">413 days</td>
<td align="left">421 days</td>
1 year ago
</tr>
<tr class="odd">
<td align="left">MSHO</td>
<td align="left">61 days</td>
1 year ago
<td align="left">36 days</td>
<td align="left">70 days</td>
<td align="left">78 days</td>
1 year ago
</tr>
<tr class="even">
<td align="left">HU Explorers</td>
<td align="left">44 days</td>
<td align="left">0 days</td>
<td align="left">319 days</td>
<td align="left">341 days</td>
1 year ago
</tr>
<tr class="odd">
<td align="left">321heiss</td>
<td align="left">0 days</td>
<td align="left">0 days</td>
<td align="left">0 days</td>
<td align="left">243 days</td>
1 year ago
</tr>
</tbody>
</table>
</div>
<p>The time of activity averages at only 72 days, though there are boxes
with 413 days of activity, spanning a large chunk of openSenseMaps
1 year 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>
<pre class="r"><code># NOTE: boxes older than 2016 missing due to missing updatedAt in database
duration = boxes %&gt;%
mutate(year = cut(as.Date(locationtimestamp), breaks = &#39;year&#39;)) %&gt;%
group_by(year) %&gt;%
filter(!is.na(lastMeasurement)) %&gt;%
mutate(duration = difftime(lastMeasurement, locationtimestamp, units=&#39;days&#39;)) %&gt;%
filter(duration &gt;= 0)
ggplot(duration, aes(x = substr(as.character(year), 0, 4), y = duration)) +
geom_boxplot() +
coord_flip() + ylab(&#39;Duration active in Days&#39;) + xlab(&#39;Year of Registration&#39;)</code></pre>
<p><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABUAAAAPACAMAAADDuCPrAAABTVBMVEUAAAAAADoAAGYAOjoAOmYAOpAAZrYzMzM6AAA6OgA6Ojo6OmY6O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OwQEQQ1ACMYQQEENQAjGAEC9YCPHSKCoAZgBCMogKAGYAQjQKAe8LFDRBDUAIxgBAUQ1ACMYAQI1AM+dogIghqAEYygAIIagBGMAIF6wMcOEUFQAzCCERRAUAMwghEgUA/42CEiCGoARjCCAghqAEYwAgTqAR87RARBDcAIRlAAQQ3ACEaAQD3gY4eIIKgBGMEICiCoARjBCBCoB3zsEBEENQAjGEEBBDUAIxgBAvWAjx0igqAGYAQjKICgBmAEI0CgHvCxQ0QQ1ACMYAQFENQAjGAECNQDPnaICIIagBGMoACCGoARjACBesDHDhFBUAMwghEUQFADMIIRIFAP+NghIghqAEYwggIIagBGMAIE6gEfO0QEQQ3ACEZQAEENwAhGgEA94GOHiCCoARjBCAogqAEYwQgQqAd87BARBDUAIxhBAQQ1ACMYAQL1gI8dIoKgBmAEIyiAoAZgBCNAoB7wsUNEENQAjGAEBRDUAIxgBAjUAz52iAiCGoARjKAAghqAEYwAgXrAxw4RQVADMIIRFEBQAzCCESBQD/jYISIIagBGMIICCGoARjACBOoBHztEBEENwAhGUABBDcAIRoBAPeBjh4ggqAEYwQgKIKgBGMEIEKgHfOwQEQQ1ACMYQQEENQAjGAEC9YCP
1 year 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>
</div>
</div>
</div>
<script>
// add bootstrap table styles to pandoc tables
function bootstrapStylePandocTables() {
$('tr.odd').parent('tbody').parent('table').addClass('table table-condensed');
}
$(document).ready(function () {
bootstrapStylePandocTables();
});
</script>
<!-- tabsets -->
<script>
$(document).ready(function () {
window.buildTabsets("TOC");
});
$(document).ready(function () {
$('.tabset-dropdown > .nav-tabs > li').click(function () {
$(this).parent().toggleClass('nav-tabs-open');
});
});
</script>
<!-- code folding -->
<script>
$(document).ready(function () {
window.initializeCodeFolding("hide" === "show");
});
</script>
<script>
$(document).ready(function () {
// temporarily add toc-ignore selector to headers for the consistency with Pandoc
$('.unlisted.unnumbered').addClass('toc-ignore')
// move toc-ignore selectors from section div to header
$('div.section.toc-ignore')
.removeClass('toc-ignore')
.children('h1,h2,h3,h4,h5').addClass('toc-ignore');
// establish options
var options = {
selectors: "h1,h2,h3",
theme: "bootstrap3",
context: '.toc-content',
hashGenerator: function (text) {
return text.replace(/[.\\/?&!#<>]/g, '').replace(/\s/g, '_');
},
ignoreSelector: ".toc-ignore",
scrollTo: 0
};
options.showAndHide = true;
options.smoothScroll = true;
// tocify
var toc = $("#TOC").tocify(options).data("toc-tocify");
});
</script>
<!-- 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>