1<!DOCTYPE html> 2<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head> 3 4<meta charset="utf-8"> 5<meta name="generator" content="quarto-1.5.5"> 6 7<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> 8 9 10<title>Ist es heute zu heiÃ? â Is it hot right now?</title> 11<style> 12code{white-space: pre-wrap;} 13span.smallcaps{font-variant: small-caps;} 14div.columns{display: flex; gap: min(4vw, 1.5em);} 15div.column{flex: auto; overflow-x: auto;} 16div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} 17ul.task-list{list-style: none;} 18ul.task-list li input[type="checkbox"] { 19 width: 0.8em; 20 margin: 0 0.8em 0.2em -1em; /* quarto-specific, see https://github.com/quarto-dev/quarto-cli/issues/4556 */ 21 vertical-align: middle; 22} 23/* CSS for syntax highlighting */ 24pre > code.sourceCode { white-space: pre; position: relative; } 25pre > code.sourceCode > span { line-height: 1.25; } 26pre > code.sourceCode > span:empty { height: 1.2em; } 27.sourceCode { overflow: visible; } 28code.sourceCode > span { color: inherit; text-decoration: inherit; } 29div.sourceCode { margin: 1em 0; } 30pre.sourceCode { margin: 0; } 31@media screen { 32div.sourceCode { overflow: auto; } 33} 34@media print { 35pre > code.sourceCode { white-space: pre-wrap; } 36pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; } 37} 38pre.numberSource code 39 { counter-reset: source-line 0; } 40pre.numberSource code > span 41 { position: relative; left: -4em; counter-increment: source-line; } 42pre.numberSource code > span > a:first-child::before 43 { content: counter(source-line); 44 position: relative; left: -1em; text-align: right; vertical-align: baseline; 45 border: none; display: inline-block; 46 -webkit-touch-callout: none; -webkit-user-select: none; 47 -khtml-user-select: none; -moz-user-select: none; 48 -ms-user-select: none; user-select: none; 49 padding: 0 4px; width: 4em; 50 } 51pre.numberSource { margin-left: 3em; padding-left: 4px; } 52div.sourceCode 53 { } 54@media screen { 55pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; } 56} 57</style> 58 59
60<script src="site_libs/quarto-nav/quarto-nav.js"></script>
vendor: 1 bytes, line 60
60
61<script src="site_libs/quarto-nav/headroom.min.js"></script>
vendor: 1 bytes, line 61
61
62<script src="site_libs/clipboard/clipboard.min.js"></script>
vendor: 1 bytes, line 62
62
63<script src="site_libs/quarto-search/autocomplete.umd.js"></script>
vendor: 1 bytes, line 63
63
64<script src="site_libs/quarto-search/fuse.min.js"></script>
vendor: 1 bytes, line 64
64
65<script src="site_libs/quarto-search/quarto-search.js"></script>
65 66<meta name="quarto:offset" content="./"> 67<link href=".//assets/iihrn-favicon-96p.png" rel="icon" type="image/png">
68<script src="site_libs/quarto-html/quarto.js"></script>
vendor: 1 bytes, line 68
68
69<script src="site_libs/quarto-html/popper.min.js"></script>
vendor: 1 bytes, line 69
69
70<script src="site_libs/quarto-html/tippy.umd.min.js"></script>
vendor: 1 bytes, line 70
70
71<script src="site_libs/quarto-html/anchor.min.js"></script>
71 72<link href="site_libs/quarto-html/tippy.css" rel="stylesheet"> 73<link href="site_libs/quarto-html/quarto-syntax-highlighting.css" rel="stylesheet" id="quarto-text-highlighting-styles">
74<script src="site_libs/bootstrap/bootstrap.min.js"></script>
74 75<link href="site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet"> 76<link href="site_libs/bootstrap/bootstrap.min.css" rel="stylesheet" id="quarto-bootstrap" data-mode="light">
77<script id="quarto-search-options" type="application/json">{ 78 "location": "navbar", 79 "copy-button": false, 80 "collapse-after": 3, 81 "panel-placement": "end", 82 "type": "textbox", 83 "limit": 50, 84 "keyboard-shortcut": [ 85 "f", 86 "/", 87 "s" 88 ], 89 "language": { 90 "search-no-results-text": "No results", 91 "search-matching-documents-text": "matching documents", 92 "search-copy-link-title": "Copy link to search", 93 "search-hide-matches-text": "Hide additional matches", 94 "search-more-match-text": "more match in this document", 95 "search-more-matches-text": "more matches in this document", 96 "search-clear-button-title": "Clear", 97 "search-text-placeholder": "", 98 "search-detached-cancel-button-title": "Cancel", 99 "search-submit-button-title": "Submit", 100 "search-label": "Search" 101 } 102}</script>
vendor: 67 bytes, lines 102-103
102 103<script async="" src="https://www.googletagmanager.com/gtag/js?id=
103G-BDLC6Q8R79
vendor: 13 bytes, lines 103-104
103"></script> 104
105<script type="text/javascript"> 106
vendor: 127 bytes, lines 107-110
107window.dataLayer = window.dataLayer || []; 108function gtag(){dataLayer.push(arguments);} 109gtag('js', new Date()); 110gtag('config', '
110G-BDLC6Q8R79
vendor: 29 bytes, line 110
110', { 'anonymize_ip': true});
111</script>
vendor: 1 bytes, line 111
111
112<script type="module" src="site_libs/quarto-ojs/quarto-ojs-runtime.js"></script>
112 113<link href="site_libs/quarto-ojs/quarto-ojs.css" rel="stylesheet"> 114 115 116</head> 117 118<body class="nav-fixed fullcontent"> 119 120<div id="quarto-search-results"></div> 121 <header id="quarto-header" class="headroom fixed-top"> 122 <nav class="navbar navbar-expand " data-bs-theme="dark"> 123 <div class="navbar-container container-fluid"> 124 <div class="navbar-brand-container mx-auto"> 125 <a class='navbar-brand' href='/'> 126 <span class="navbar-title">Ist es heute zu heiÃ?</span> 127 </a> 128 </div> 129 <div class="quarto-navbar-tools"> 130</div> 131 <div id="quarto-search" class="" title="Search"></div> 132 </div> <!-- /container-fluid --> 133 </nav> 134</header> 135<!-- content --> 136<div id="quarto-content" class="quarto-container page-columns page-rows-contents page-layout-article page-navbar"> 137<!-- sidebar --> 138<!-- margin-sidebar --> 139 140<!-- main --> 141<main class="content page-columns page-full" id="quarto-document-content"> 142 143 144 145 146<div id="import-infra" class="cell"> 147<div class="sourceCode cell-code" id="cb1" data-startfrom="12" data-source-offset="-0"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript" style="counter-reset: source-line 11;"><span id="cb1-12"><a href="#cb1-12" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> { aq<span class="op">,</span> op } <span class="im">from</span> <span class="st">"@uwdata/arquero"</span></span> 148<span id="cb1-13"><a href="#cb1-13" aria-hidden="true" tabindex="-1"></a></span> 149<span id="cb1-14"><a href="#cb1-14" aria-hidden="true" tabindex="-1"></a>bucket_base <span class="op">=</span> <span class="st">"https://isithot-data.s3.fr-par.scw.cloud/www/"</span></span> 150<span id="cb1-15"><a href="#cb1-15" aria-hidden="true" tabindex="-1"></a></span> 151<span id="cb1-16"><a href="#cb1-16" aria-hidden="true" tabindex="-1"></a>FA <span class="op">=</span> FileAttachment</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> 152<div class="cell-output cell-output-display"> 153<div id="import-infra-1"> 154<div id="ojs-cell-1-1" data-nodetype="declaration"> 155 156</div> 157</div> 158</div> 159<div class="cell-output cell-output-display"> 160<div id="import-infra-2"> 161<div id="ojs-cell-1-2" data-nodetype="declaration"> 162 163</div> 164</div> 165</div> 166<div class="cell-output cell-output-display"> 167<div id="import-infra-3"> 168<div id="ojs-cell-1-3" data-nodetype="declaration"> 169 170</div> 171</div> 172</div> 173</div> 174<div id="watch-position" class="cell"> 175<div class="sourceCode cell-code" id="cb2" data-startfrom="8" data-source-offset="-145"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript" style="counter-reset: source-line 7;"><span id="cb2-8"><a href="#cb2-8" aria-hidden="true" tabindex="-1"></a>mutable myLocation <span class="op">=</span> <span class="kw">null</span></span> 176<span id="cb2-9"><a href="#cb2-9" aria-hidden="true" tabindex="-1"></a>mutable geolocateStatus <span class="op">=</span> <span class="st">"default"</span></span> 177<span id="cb2-10"><a href="#cb2-10" aria-hidden="true" tabindex="-1"></a></span> 178<span id="cb2-11"><a href="#cb2-11" aria-hidden="true" tabindex="-1"></a>getLocation <span class="op">=</span> {</span> 179<span id="cb2-12"><a href="#cb2-12" aria-hidden="true" tabindex="-1"></a> <span class="kw">yield</span> <span class="kw">null</span></span> 180<span id="cb2-13"><a href="#cb2-13" aria-hidden="true" tabindex="-1"></a></span> 181<span id="cb2-14"><a href="#cb2-14" aria-hidden="true" tabindex="-1"></a> <span class="kw">yield</span> <span class="bu">navigator</span><span class="op">.</span><span class="at">geolocation</span><span class="op">.</span><span class="fu">getCurrentPosition</span>(</span> 182<span id="cb2-15"><a href="#cb2-15" aria-hidden="true" tabindex="-1"></a> pos <span class="kw">=></span> {</span> 183<span id="cb2-16"><a href="#cb2-16" aria-hidden="true" tabindex="-1"></a> mutable myLocation <span class="op">=</span> {</span> 184<span id="cb2-17"><a href="#cb2-17" aria-hidden="true" tabindex="-1"></a> <span class="dt">lat</span><span class="op">:</span> pos<span class="op">.</span><span class="at">coords</span><span class="op">.</span><span class="at">latitude</span><span class="op">,</span></span> 185<span id="cb2-18"><a href="#cb2-18" aria-hidden="true" tabindex="-1"></a>
185 <span class="dt">lon</span><span class="op">:</span> pos<span class="op">.</span><span class="at">coords</span><span class="op">.</span><span class="at">longitude</span></span> 186<span id="cb2-19"><a href="#cb2-19" aria-hidden="true" tabindex="-1"></a> }</span> 187<span id="cb2-20"><a href="#cb2-20" aria-hidden="true" tabindex="-1"></a> mutable geolocateStatus <span class="op">=</span> <span class="st">"granted"</span></span> 188<span id="cb2-21"><a href="#cb2-21" aria-hidden="true" tabindex="-1"></a> }<span class="op">,</span></span> 189<span id="cb2-22"><a href="#cb2-22" aria-hidden="true" tabindex="-1"></a> e <span class="kw">=></span> {</span> 190<span id="cb2-23"><a href="#cb2-23" aria-hidden="true" tabindex="-1"></a> <span class="bu">console</span><span class="op">.</span><span class="fu">log</span>(<span class="st">"Geolocation error"</span><span class="op">,</span> e)<span class="op">,</span></span> 191<span id="cb2-24"><a href="#cb2-24" aria-hidden="true" tabindex="-1"></a> mutable geolocateStatus <span class="op">=</span> <span class="st">"error"</span></span> 192<span id="cb2-25"><a href="#cb2-25" aria-hidden="true" tabindex="-1"></a> }<span class="op">,</span></span> 193<span id="cb2-26"><a href="#cb2-26" aria-hidden="true" tabindex="-1"></a> {</span> 194<span id="cb2-27"><a href="#cb2-27" aria-hidden="true" tabindex="-1"></a>
194 <span class="dt">enableHighAccuracy</span><span class="op">:</span> <span class="kw">false</span></span> 195<span id="cb2-28"><a href="#cb2-28" aria-hidden="true" tabindex="-1"></a> })</span> 196<span id="cb2-29"><a href="#cb2-29" aria-hidden="true" tabindex="-1"></a>}</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> 197<div class="cell-output cell-output-display"> 198<div id="watch-position-1"> 199<div id="ojs-cell-2-1" data-nodetype="declaration"> 200 201</div> 202</div> 203</div> 204<div class="cell-output cell-output-display"> 205<div id="watch-position-2"> 206<div id="ojs-cell-2-2" data-nodetype="declaration"> 207 208</div> 209</div> 210</div> 211<div class="cell-output cell-output-display"> 212<div id="watch-position-3"> 213<div id="ojs-cell-2-3" data-nodetype="declaration"> 214 215</div> 216</div> 217</div> 218</div> 219<div id="geolocate-debug" class="cell hidden"> 220<div class="sourceCode cell-code" id="cb3" data-startfrom="3" data-source-offset="-1"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript" style="counter-reset: source-line 2;"><span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a>geolocateStatus <span class="op">==</span> <span class="st">"default"</span> <span class="op">?</span></span> 221<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">md</span><span class="vs">`Allow location to see local station`</span> <span class="op">:</span></span> 222<span id="cb3-5"><a href="#cb3-5" aria-hidden="true" tabindex="-1"></a> geolocateStatus <span class="op">==</span> <span class="st">"error"</span> <span class="op">?</span></span> 223<span id="cb3-6"><a href="#cb3-6" aria-hidden="true" tabindex="-1"></a>
223 <span class="fu">md</span><span class="vs">`Problem getting location`</span> <span class="op">:</span></span> 224<span id="cb3-7"><a href="#cb3-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">md</span><span class="vs">``</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> 225<div class="cell-output cell-output-display hidden"> 226<div id="geolocate-debug-1"> 227<div id="ojs-cell-3-1" data-nodetype="expression"> 228 229</div> 230</div> 231</div> 232<div class="sourceCode cell-code" id="cb4" data-startfrom="9" data-source-offset="-158"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript" style="counter-reset: source-line 8;"><span id="cb4-9"><a href="#cb4-9" aria-hidden="true" tabindex="-1"></a>myLocation <span class="op">!=</span> <span class="kw">null</span> <span class="op">?</span></span> 233<span id="cb4-10"><a href="#cb4-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">md</span><span class="vs">`Location is lat: </span><span class="sc">${</span>myLocation<span class="op">.</span><span class="at">lat</span><span class="sc">}</span><span class="vs">, lon: </span><span class="sc">${</span>myLocation<span class="op">.</span><span class="at">lon</span><span class="sc">}</span><span class="vs">`</span> <span class="op">:</span></span> 234<span id="cb4-11"><a href="#cb4-11" aria-hidden="true" tabindex="-1"></a> <span class="fu">md</span><span class="vs">`Location permission not granted`</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> 235<div class="cell-output cell-output-display hidden"> 236<div id="geolocate-debug-2"> 237<div id="ojs-cell-3-2" data-nodetype="expression"> 238 239</div> 240</div> 241</div> 242</div> 243<div class="cell"> 244<div class="sourceCode cell-code hidden" id="cb5" data-startfrom="1" data-source-offset="0"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="co">// on the home page, get station id from:</span></span> 245<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="co">// * _geolocator.qmd's myLocation, plus</span></span> 246<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a><span class="co">// * _map.qmd's statsAll</span></span> 247<span id="cb5-4"><a href="#cb5-4" aria-hidden="true" tabindex="-1"></a></span> 248<span id="cb5-5"><a href="#cb5-5" aria-hidden="true" tabindex="-1"></a>stationId <span class="op">=</span> {</span> 249<span id="cb5-6"><a href="#cb5-6" aria-hidden="true" tabindex="-1"></a> </span> 250<span id="cb5-7"><a href="#cb5-7" aria-hidden="true" tabindex="-1"></a> <span class="co">// fallback to berlin?</span></span> 251<span id="cb5-8"><a href="#cb5-8" aria-hidden="true" tabindex="-1"></a> <span class="cf">if</span> (myLocation <span class="op">==</span> <span class="kw">null</span>) {</span> 252<span id="cb5-9"><a href="#cb5-9" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> <span class="st">"00400"</span></span> 253<span id="cb5-10"><a href="#cb5-10" aria-hidden="true" tabindex="-1"></a> }</span> 254<span id="cb5-11"><a href="#cb5-11" aria-hidden="true" tabindex="-1"></a></span> 255<span id="cb5-12"><a href="#cb5-12" aria-hidden="true" tabindex="-1"></a> <span class="co">// otherwise, find closest station on statsAll</span></span> 256<span id="cb5-13"><a href="#cb5-13" aria-hidden="true" tabindex="-1"></a> <span class="kw">const</span> closestStation <span class="op">=</span> aq<span class="op">.</span><span class="fu">from</span>(statsAll)</span> 257<span id="cb5-14"><a href="#cb5-14" aria-hidden="true" tabindex="-1"></a> <span class="op">.</span><span class="fu">params</span>({</span> 258<span id="cb5-15"><a href="#cb5-15" aria-hidden="true" tabindex="-1"></a>
258 <span class="dt">currentLat</span><span class="op">:</span> myLocation<span class="op">.</span><span class="at">lat</span><span class="op">,</span></span> 259<span id="cb5-16"><a href="#cb5-16" aria-hidden="true" tabindex="-1"></a> <span class="dt">currentLon</span><span class="op">:</span> myLocation<span class="op">.</span><span class="at">lon</span><span class="op">,</span></span> 260<span id="cb5-17"><a href="#cb5-17" aria-hidden="true" tabindex="-1"></a> })</span> 261<span id="cb5-18"><a href="#cb5-18" aria-hidden="true" tabindex="-1"></a> <span class="op">.</span><span class="fu">derive</span>({</span> 262<span id="cb5-19"><a href="#cb5-19" aria-hidden="true" tabindex="-1"></a> <span class="dt">dist</span><span class="op">:</span> (d<span class="op">,</span> $) <span class="kw">=></span> <span class="bu">Math</span><span class="op">.</span><span class="fu">sqrt</span>(</span> 263<span id="cb5-20"><a href="#cb5-20" aria-hidden="true" tabindex="-1"></a> ($<span class="op">.</span><span class="at">currentLat</span> <span class="op">-</span> d<span class="op">.</span><span class="at">isit_lat</span>) <span class="op">**</span> <span class="dv">2</span> <span class="op">+</span> ($<span class="op">.</span><span class="at">currentLon</span> <span class="op">-</span> d<span class="op">.</span><span class="at">isit_lon</span>) <span class="op">**</span> <span class="dv">2</span>)</span> 264<span id="cb5-21"><a href="#cb5-21" aria-hidden="true" tabindex="-1"></a> })</span> 265<span id="cb5-22"><a href="#cb5-22" aria-hidden="true" tabindex="-1"></a> <span class="op">.</span><span class="fu">orderby</span>(<span class="st">"dist"</span>)</span> 266<span id="cb5-23"><a href="#cb5-23" aria-hidden="true" tabindex="-1"></a> <span class="op">.</span><span class="fu">slice</span>(<span class="dv">0</span><span class="op">,</span> <span class="dv">1</span>)</span> 267<span id="cb5-24"><a href="#cb5-24" aria-hidden="true" tabindex="-1"></a> <span class="op">.</span><span class="fu">array</span>(<span class="st">"id"</span>)</span> 268<span id="cb5-25"><a href="#cb5-25" aria-hidden="true" tabindex="-1"></a></span> 269<span id="cb5-26"><a href="#cb5-26" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span> closestStation[<span class="dv">0</span>]</span> 270<span id="cb5-27"><a href="#cb5-27" aria-hidden="true" tabindex="-1"></a>}</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> 271<div id="get-station-name" class="cell-output cell-output-display"> 272<div id="ojs-cell-4" data-nodetype="declaration"> 273 274</div> 275</div> 276</div> 277<div class="cell"> 278<div class="sourceCode cell-code hidden" id="cb6" data-startfrom="1" data-source-offset="0"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a>statsPlace <span class="op">=</span> <span class="fu">FA</span>(bucket_base <span class="op">+</span> <span class="st">"stats/stats_"</span> <span class="op">+</span> stationId <span class="op">+</span> <span class="st">".json"</span>)<span class="op">.</span><span class="fu">json</span>()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> 279<div id="load-data" class="cell-output cell-output-display"> 280<div id="ojs-cell-5" data-nodetype="declaration"> 281 282</div> 283</div> 284</div> 285<div class="column-screen page-columns page-full" style="height: 95svh;"> 286<div class="iihrn-headlines column-body" style="display: flex; flex-flow: column nowrap; justify-content: space-around; text-align: center; font-weight: bold;"> 287<p>Ist es heute zu heià in <span><span id="ojs-element-id-1"></span></span> ?</p> 288<div id="answer" class="cell"> 289<div class="sourceCode cell-code" id="cb7" data-startfrom="3" data-source-offset="-55"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript" style="counter-reset: source-line 2;"><span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a>answers <span class="op">=</span> ({</span> 290<span id="cb7-4"><a href="#cb7-4" aria-hidden="true" tabindex="-1"></a> <span class="st">"Auf gar keinen Fall!"</span><span class="op">:</span> {<span class="dt">color</span><span class="op">:</span> <span class="st">"white"</span><span class="op">,</span> <span class="dt">fill1</span><span class="op">:</span> <span class="st">"#5287d1"</span><span class="op">,</span> <span class="dt">fill2</span><span class="op">:</span> <span class="st">"#2166ac"</span> }<span class="op">,</span></span> 291<span id="cb7-5"><a href="#cb7-5" aria-hidden="true" tabindex="-1"></a> <span class="st">"Nein!"</span><span class="op">:</span> {<span class="dt">color</span><span class="op">:</span> <span class="st">"white"</span><span class="op">,</span> <span class="dt">fill1</span><span class="op">:</span> <span class="st">"#a2cdeb"</span><span class="op">,</span> <span class="dt">fill2</span><span class="op">:</span> <span class="st">"#67a9cf"</span> }<span class="op">,</span></span> 292<span id="cb7-6"><a href="#cb7-6" aria-hidden="true" tabindex="-1"></a> <span class="st">"Nee"</span><span class="op">:</span> {<span class="dt">color</span><span class="op">:</span> <span class="st">"#333333"</span><span class="op">,</span> <span class="dt">fill1</span><span class="op">:</span> <span class="st">"#f5f8fa"</span><span class="op">,</span> <span class="dt">fill2</span><span class="op">:</span> <span class="st">"#d1e5f0"</span> }<span class="op">,</span></span> 293<span id="cb7-7"><a href="#cb7-7" aria-hidden="true" tabindex="-1"></a> <span class="st">"Nicht wirklich"</span><span class="op">:</span> {<span class="dt">color</span><span class="op">:</span> <span class="st">"#333333"</span><span class="op">,</span> <span class="dt">fill1</span><span class="op">:</span> <span class="st">"#f7f7f7"</span><span class="op">,</span> <span class="dt">fill2</span><span class="op">:</span> <span class="st">"#ebebeb"</span> }<span class="op">,</span></span> 294<span id="cb7-8"><a href="#cb7-8" aria-hidden="true" tabindex="-1"></a> <span class="st">"Jepp"</span><span class="op">:</span> {<span class="dt">color</span><span class="op">:</span> <span class="st">"#333333"</span><span class="op">,</span> <span class="dt">fill1</span><span class="op">:</span> <span class="st">"#fddcca"</span><span class="op">,</span> <span class="dt">fill2</span><span class="op">:</span> <span class="st">"#f7cfb7"</span> }<span class="op">,</span></span> 295<span id="cb7-9"><a href="#cb7-9" aria-hidden="true" tabindex="-1"></a> <span class="st">"Ziemlich!"</span><span class="op">:</span> {<span class="dt">color</span><span class="op">:</span> <span class="st">"white"</span><span class="op">,</span> <span class="dt">fill1</span><span class="op">:</span> <span class="st">"#de7b49"</span><span class="op">,</span> <span class="dt">fill2</span><span class="op">:</span> <span class="st">"#fc946a"</span> }<span class="op">,</span></span> 296<span id="cb7-10"><a href="#cb7-10" aria-hidden="true" tabindex="-1"></a> <span class="st">
296"Absolut!"</span><span class="op">:</span> {<span class="dt">color</span><span class="op">:</span> <span class="st">"white"</span><span class="op">,</span> <span class="dt">fill1</span><span class="op">:</span> <span class="st">"#d1231d"</span><span class="op">,</span> <span class="dt">fill2</span><span class="op">:</span> <span class="st">"#b2182b"</span> }</span> 297<span id="cb7-11"><a href="#cb7-11" aria-hidden="true" tabindex="-1"></a>})</span> 298<span id="cb7-12"><a href="#cb7-12" aria-hidden="true" tabindex="-1"></a></span> 299<span id="cb7-13"><a href="#cb7-13" aria-hidden="true" tabindex="-1"></a><span class="fu">html</span><span class="vs">`</span></span> 300<span id="cb7-14"><a href="#cb7-14" aria-hidden="true" tabindex="-1"></a><span class="vs"><div class="answer-icon-and-label"></span></span> 301<span id="cb7-15"><a href="#cb7-15" aria-hidden="true" tabindex="-1"></a><span class="vs"> <span class="answer-icon" style="background-color: </span><span class="sc">${</span>answers[statsPlace<span class="op">.</span><span class="at">isit_answer</span>]<span class="op">.</span><span class="at">fill2</span><span class="sc">}</span><span class="vs">;"></span></span> 302<span id="cb7-16"><a href="#cb7-16" aria-hidden="true" tabindex="-1"></a><span class="vs"> </span></span></span> 303<span id="cb7-17"><a href="#cb7-17" aria-hidden="true" tabindex="-1"></a><span class="vs"> <span></span><span class="sc">${</span>statsPlace<span class="op">.</span><span class="at">isit_answer</span><span class="sc">}</span><span class="vs"></span></span></span> 304<span id="cb7-18"><a href="#cb7-18" aria-hidden="true" tabindex="-1"></a><span class="vs"></div>`</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> 305<div class="cell-output cell-output-display"> 306<div id="answer-1"> 307<div id="ojs-cell-6-1" data-nodetype="declaration"> 308 309</div> 310</div> 311</div> 312<div class="cell-output cell-output-display"> 313<div id="answer-2"> 314<div id="ojs-cell-6-2" data-nodetype="expression"> 315 316</div> 317</div> 318</div> 319</div> 320<div class="cell"> 321<div class="sourceCode cell-code" id="cb8" data-startfrom="0" data-source-offset="0"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript" style="counter-reset: source-line -1;"><span id="cb8-0"><a href="#cb8-0" aria-hidden="true" tabindex="-1"></a><span class="fu">md</span><span class="vs">`</span><span class="sc">${</span>statsPlace<span class="op">.</span><span class="at">isit_comment</span><span class="sc">}</span><span class="vs">`</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> 322<div id="comment" class="cell-output cell-output-display"> 323<div id="ojs-cell-7" data-nodetype="expression"> 324 325</div> 326</div> 327</div> 328<a id="btn-digdeeper" href="#detail"> 329 <i class="bi bi-arrow-down-circle-fill"></i> 330</a> 331</div> 332</div> 333<div class="iihrn-section page-columns page-full" style="background: #eee"> 334<section id="detail" class="level1 column-page"> 335<h1>So sieht es heute im Vergleich ausâ¦</h1> 336<div class="grid"> 337<div class="g-col-12 g-col-md-4" style="margin-block: auto;"> 338<div id="datetime-formatting" class="cell"> 339<div class="sourceCode cell-code" id="cb9" data-startfrom="2" data-source-offset="-1"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript" style="counter-reset: source-line 1;"><span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a>datefns <span class="op">=</span> <span class="im">import</span>(<span class="st">"https://cdn.skypack.dev/[email protected]?min"</span>)</span> 340<span id="cb9-3"><a href="#cb9-3" aria-hidden="true" tabindex="-1"></a>tmaxWhen <span class="op">=</span> <span class="kw">new</span> <span class="bu">Date</span>(<span class="bu">Date</span><span class="op">.</span><span class="fu">parse</span>(statsPlace<span class="op">.</span><span class="at">isit_maximum_dt</span> <span class="op">||</span> <span class="kw">null</span>))</span> 341<span id="cb9-4"><a href="#cb9-4" aria-hidden="true" tabindex="-1"></a>tminWhen <span class="op">=</span> <span class="kw">new</span> <span class="bu">Date</span>(<span class="bu">Date</span><span class="op">.</span><span class="fu">parse</span>(statsPlace<span class="op">.</span><span class="at">isit_minimum_dt</span> <span class="op">||</span> <span class="kw">null</span>))</span> 342<span id="cb9-5"><a href="#cb9-5" aria-hidden="true" tabindex="-1"></a></span> 343<span id="cb9-6"><a href="#cb9-6" aria-hidden="true" tabindex="-1"></a>tmaxWhenFriendly <span class="op">=</span> <span class="pp">isFinite</span>(tmaxWhen) <span class="op">?</span></span> 344<span id="cb9-7"><a href="#cb9-7" aria-hidden="true" tabindex="-1"></a> datefns<span class="op">.</span><span class="fu">formatRelative</span>(tmaxWhen<span class="op">,</span> <span class="kw">new</span> <span class="bu">Date</span>()) <span class="op">:</span> <span class="st">""</span></span> 345<span id="cb9-8"><a href="#cb9-8" aria-hidden="true" tabindex="-1"></a>tminWhenFriendly <span class="op">=</span> <span class="pp">isFinite</span>
345(tminWhen) <span class="op">?</span></span> 346<span id="cb9-9"><a href="#cb9-9" aria-hidden="true" tabindex="-1"></a> datefns<span class="op">.</span><span class="fu">formatRelative</span>(tminWhen<span class="op">,</span> <span class="kw">new</span> <span class="bu">Date</span>()) <span class="op">:</span> <span class="st">""</span></span> 347<span id="cb9-10"><a href="#cb9-10" aria-hidden="true" tabindex="-1"></a></span> 348<span id="cb9-11"><a href="#cb9-11" aria-hidden="true" tabindex="-1"></a>percentRating <span class="op">=</span> statsPlace<span class="op">.</span><span class="at">isit_average</span><span class="op">.</span><span class="fu">toFixed</span>(<span class="dv">1</span>) <span class="op">+</span> <span class="st">"%"</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> 349<div class="cell-output cell-output-display"> 350<div id="datetime-formatting-1"> 351<div id="ojs-cell-8-1" data-nodetype="declaration"> 352 353</div> 354</div> 355</div> 356<div class="cell-output cell-output-display"> 357<div id="datetime-formatting-2"> 358<div id="ojs-cell-8-2" data-nodetype="declaration"> 359 360</div> 361</div> 362</div> 363<div class="cell-output cell-output-display"> 364<div id="datetime-formatting-3"> 365<div id="ojs-cell-8-3" data-nodetype="declaration"> 366 367</div> 368</div> 369</div> 370<div class="cell-output cell-output-display"> 371<div id="datetime-formatting-4"> 372<div id="ojs-cell-8-4" data-nodetype="declaration"> 373 374</div> 375</div> 376</div> 377<div class="cell-output cell-output-display"> 378<div id="datetime-formatting-5"> 379<div id="ojs-cell-8-5" data-nodetype="declaration"> 380 381</div> 382</div> 383</div> 384<div class="cell-output cell-output-display"> 385<div id="datetime-formatting-6"> 386<div id="ojs-cell-8-6" data-nodetype="declaration"> 387 388</div> 389</div> 390</div> 391</div> 392<div class="tmaxmin-block"> 393<div class="tmaxmin-chip"> 394<p><i class="bi bi-moon"></i></p> 395<div id="tmin" class="cell"> 396<div class="sourceCode cell-code" id="cb10" data-startfrom="2" data-source-offset="-1"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript" style="counter-reset: source-line 1;"><span id="cb10-2"><a href="#cb10-2" aria-hidden="true" tabindex="-1"></a><span class="fu">md</span><span class="vs">`</span><span class="sc">${</span>statsPlace<span class="op">.</span><span class="at">isit_minimum</span><span class="sc">}</span><span class="vs"> °C `</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> 397<div class="cell-output cell-output-display"> 398<div id="tmin-1"> 399<div id="ojs-cell-9-1" data-nodetype="expression"> 400 401</div> 402</div> 403</div> 404<div class="sourceCode cell-code" id="cb11" data-startfrom="3" data-source-offset="-37"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript" style="counter-reset: source-line 2;"><span id="cb11-3"><a href="#cb11-3" aria-hidden="true" tabindex="-1"></a><span class="fu">md</span><span class="vs">`</span><span class="sc">${</span>tminWhenFriendly<span class="sc">}</span><span class="vs">`</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> 405<div class="cell-output cell-output-display"> 406<div id="tmin-2"> 407<div id="ojs-cell-9-2" data-nodetype="expression"> 408 409</div> 410</div> 411</div> 412</div> 413</div> 414<div class="tmaxmin-chip"> 415<p><i class="bi bi-brightness-high"></i></p> 416<div id="tmax" class="cell"> 417<div class="sourceCode cell-code" id="cb12" data-startfrom="2" data-source-offset="-1"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript" style="counter-reset: source-line 1;"><span id="cb12-2"><a href="#cb12-2" aria-hidden="true" tabindex="-1"></a><span class="fu">md</span><span class="vs">`</span><span class="sc">${</span>statsPlace<span class="op">.</span><span class="at">isit_maximum</span><span class="sc">}</span><span class="vs"> °C `</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> 418<div class="cell-output cell-output-display"> 419<div id="tmax-1"> 420<div id="ojs-cell-10-1" data-nodetype="expression"> 421 422</div> 423</div> 424</div> 425<div class="sourceCode cell-code" id="cb13" data-startfrom="3" data-source-offset="-37"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript" style="counter-reset: source-line 2;"><span id="cb13-3"><a href="#cb13-3" aria-hidden="true" tabindex="-1"></a><span class="fu">md</span><span class="vs">`</span><span class="sc">${</span>tmaxWhenFriendly<span class="sc">}</span><span class="vs">`</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> 426<div class="cell-output cell-output-display"> 427<div id="tmax-2"> 428<div id="ojs-cell-10-2" data-nodetype="expression"> 429 430</div> 431</div> 432</div> 433</div> 434</div> 435</div> 436<div class="tavg-block"> 437<div id="tavg" class="cell"> 438<div class="sourceCode cell-code" id="cb14" data-startfrom="1" data-source-offset="-0"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a><span class="fu">html</span><span class="vs">`</span></span> 439<span id="cb14-2"><a href="#cb14-2" aria-hidden="true" tabindex="-1"></a><span class="vs"><div class="answer-icon-and-label"></span></span> 440<span id="cb14-3"><a href="#cb14-3" aria-hidden="true" tabindex="-1"></a><span class="vs"> <span class="answer-icon" style="background-color: </span><span class="sc">${</span>answers[statsPlace<span class="op">.</span><span class="at">isit_answer</span>]<span class="op">.</span><span class="at">fill2</span><span class="sc">}</span><span class="vs">;"></span></span></span> 441<span id="cb14-4"><a href="#cb14-4" aria-hidden="true" tabindex="-1"></a><span class="vs"> <span></span><span class="sc">${</span>statsPlace<span class="op">.</span><span class="at">isit_current</span><span class="op">.</span><span class="fu">toFixed</span>(<span class="dv">1</span>)<span class="sc">}</span><span class="vs"> °C</span></span></span> 442<span id="cb14-5"><a href="#cb14-5" aria-hidden="true" tabindex="-1"></a><span class="vs"></div>`</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> 443<div class="cell-output cell-output-display"> 444<div id="tavg-1"> 445<div id="ojs-cell-11-1" data-nodetype="expression"> 446 447</div> 448</div> 449</div> 450<div class="sourceCode cell-code" id="cb15" data-startfrom="6" data-source-offset="-210"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript" style="counter-reset: source-line 5;"><span id="cb15-6"><a href="#cb15-6" aria-hidden="true" tabindex="-1"></a><span class="fu">md</span><span class="vs">`Durchschnitt bisher<br>heiÃer als **</span><span class="sc">${</span>percentRating<span class="sc">}</span><span class="vs">** der Tage für diese Zeit im Jahr.`</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> 451<div class="cell-output cell-output-display"> 452<div id="tavg-2"> 453<div id="ojs-cell-11-2" data-nodetype="expression"> 454 455</div> 456</div> 457</div> 458</div> 459</div> 460</div> 461<div class="g-col-12 g-col-md-8"> 462<div class="cell iihrn-figure"> 463<div class="sourceCode cell-code hidden" id="cb16" data-startfrom="2" data-source-offset="0"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript" style="counter-reset: source-line 1;"><span id="cb16-2"><a href="#cb16-2" aria-hidden="true" tabindex="-1"></a><span class="fu">md</span><span class="vs">``</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> 464<div id="ts" class="cell-output cell-output-display"> 465<div id="ojs-cell-12" data-nodetype="expression"> 466 467</div> 468</div> 469</div> 470</div> 471</div> 472<div class="grid" style="margin-top: 2rem;"> 473<div class="g-col-12 g-col-md-4" style="margin-block: auto;"> 474<p>Dies ist die Verteilung der für diese Jahreszeit typischen Temperaturen, die wir als ein Fenster von sieben Tagen beiderseits des heutigen Tages definiert haben. Wie bei einer Glockenkurve ist die Kurve bei häufigeren Temperaturen höher und bei seltenen Temperaturen niedriger.</p> 475</div> 476<div class="g-col-12 g-col-md-8"> 477<div class="cell iihrn-figure"> 478<div class="sourceCode cell-code hidden" id="cb17" data-startfrom="2" data-source-offset="0"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript" style="counter-reset: source-line 1;"><span id="cb17-2"><a href="#cb17-2" aria-hidden="true" tabindex="-1"></a><span class="fu">md</span><span class="vs">``</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> 479<div id="dist" class="cell-output cell-output-display"> 480<div id="ojs-cell-13" data-nodetype="expression"> 481 482</div> 483</div> 484</div> 485</div> 486</div> 487</section> 488</div> 489<div class="iihrn-section page-columns page-full" style="background: #ddd;"> 490<section id="und-der-rest-vom-jahr." class="level1 column-page container"> 491<h1>⦠und der Rest vom Jahr.</h1> 492<p>Wir haben jeden Tag in diesem Jahr in <strong> <span><span id="ojs-element-id-2"></span></span></strong> mit ähnlichen Zeiten in der Vergangenheit verglichen. Rote Tage waren im Vergleich zu den Aufzeichnungen heiÃ, blaue Tage waren kalt.</p> 493<div id="hw" class="cell iihrn-figure"> 494<div class="sourceCode cell-code hidden" id="cb18" data-startfrom="3" data-source-offset="-0"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript" style="counter-reset: source-line 2;"><span id="cb18-3"><a href="#cb18-3" aria-hidden="true" tabindex="-1"></a>heatmapYear <span class="op">=</span> (<span class="kw">new</span> <span class="bu">Date</span>())<span class="op">.</span><span class="fu">
494toLocaleString</span>(<span class="st">"en-US"</span><span class="op">,</span> {<span class="dt">timeZone</span><span class="op">:</span> <span class="st">"Europe/Berlin"</span><span class="op">,</span> <span class="dt">year</span><span class="op">:</span> <span class="st">"numeric"</span>})</span> 495<span id="cb18-4"><a href="#cb18-4" aria-hidden="true" tabindex="-1"></a><span class="fu">md</span><span class="vs">``</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> 496<div class="cell-output cell-output-display"> 497<div id="hw-1"> 498<div id="ojs-cell-14-1" data-nodetype="declaration"> 499 500</div> 501</div> 502</div> 503<div class="cell-output cell-output-display"> 504<div id="hw-2"> 505<div id="ojs-cell-14-2" data-nodetype="expression"> 506 507</div> 508</div> 509</div> 510</div> 511</section> 512</div> 513<div id="map-section" class="iihrn-section page-columns page-full"> 514<div class="column-page-inset grid"> 515<div class="g-col-12 g-col-md-4"> 516<section id="so-sieht-der-rest-von-deutschland-heute-bisher-aus." class="level1" style="display:flex; flex-direction: column; justify-content: center; text-align: center; height: 100%;"> 517<h1>So sieht der Rest von Deutschland heute bisher aus.</h1> 518<div id="time-of-day-message" class="cell"> 519<div class="sourceCode cell-code" id="cb19" data-startfrom="1" data-source-offset="-0"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true" tabindex="-1"></a>nowHour <span class="op">=</span> (<span class="kw">new</span> <span class="bu">Date</span>())<span class="op">.</span><span class="fu">getUTCHours</span>()</span> 520<span id="cb19-2"><a href="#cb19-2" aria-hidden="true" tabindex="-1"></a>nowHour <span class="op">>=</span> <span class="dv">10</span> <span class="op">&&</span> nowHour <span class="op"><=</span> <span class="dv">22</span> <span class="op">?</span></span> 521<span id="cb19-3"><a href="#cb19-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">md</span><span class="vs">`Mancherorts kann es im Laufe der Nacht noch abkühlen.`</span> <span class="op">:</span></span> 522<span id="cb19-4"><a href="#cb19-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">md</span><span class="vs">`Mancherorts kann es im Laufe des Tages noch wärmer werden.`</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> 523<div class="cell-output cell-output-display"> 524<div id="time-of-day-message-1"> 525<div id="ojs-cell-15-1" data-nodetype="declaration"> 526 527</div> 528</div> 529</div> 530<div class="cell-output cell-output-display"> 531<div id="time-of-day-message-2"> 532<div id="ojs-cell-15-2" data-nodetype="expression"> 533 534</div> 535</div> 536</div> 537</div> 538</section> 539</div> 540<div class="g-col-12 g-col-md-8" style="display: flex; flex-direction: column; justify-content: center;"> 541<div id="load-map-data" class="cell" data-error="false"> 542<div class="sourceCode cell-code hidden" id="cb20" data-startfrom="3" data-source-offset="-0"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript" style="counter-reset: source-line 2;"><span id="cb20-3"><a href="#cb20-3" aria-hidden="true" tabindex="-1"></a>statsAllRaw <span class="op">=</span> <span class="fu">FA</span>(bucket_base <span class="op">+</span> <span class="st">"stats/stats_all.json"</span>)<span class="op">.</span><span class="fu">json</span>()</span> 543<span id="cb20-4"><a href="#cb20-4" aria-hidden="true" tabindex="-1"></a></span> 544<span id="cb20-5"><a href="#cb20-5" aria-hidden="true" tabindex="-1"></a><span class="co">// statsAllRaw is an object with keys by station id, but we</span></span> 545<span id="cb20-6"><a href="#cb20-6" aria-hidden="true" tabindex="-1"></a><span class="co">// need an array with an id field. let's move the ids in</span></span> 546<span id="cb20-7"><a href="#cb20-7" aria-hidden="true" tabindex="-1"></a>statsAll <span class="op">=</span> {</span> 547<span id="cb20-8"><a href="#cb20-8" aria-hidden="true" tabindex="-1"></a> <span class="kw">const</span> statsArray <span class="op">=</span> []</span> 548<span id="cb20-9"><a href="#cb20-9" aria-hidden="true" tabindex="-1"></a> <span class="bu">Object</span><span class="op">.</span><span class="fu">keys</span>(statsAllRaw)<span class="op">.</span><span class="fu">map</span>(k <span class="kw">=></span> statsArray<span class="op">.</span><span class="fu">push</span>({<span class="op">...</span>statsAllRaw[k]<span class="op">,</span> <span class="dt">id</span><span class="op">:</span> k}))</span> 549<span id="cb20-10"><a href="#cb20-10" aria-hidden="true" tabindex="-1"></a> <span class="kw">const</span> tidiedStats <span class="op">=</span> aq<span class="op">.</span><span class="fu">from</span>(statsArray)</span> 550<span id="cb20-11"><a href="#cb20-11" aria-hidden="true" tabindex="-1"></a> <span class="op">.</span><span class="fu">derive</span>({</span> 551<span id="cb20-12"><a href="#cb20-12" aria-hidden="true" tabindex="-1"></a>
551 <span class="dt">lat</span><span class="op">:</span> d <span class="kw">=></span> op<span class="op">.</span><span class="fu">parse_float</span>(d<span class="op">.</span><span class="at">isit_lat</span>)<span class="op">,</span></span> 552<span id="cb20-13"><a href="#cb20-13" aria-hidden="true" tabindex="-1"></a> <span class="dt">lon</span><span class="op">:</span> d <span class="kw">=></span> op<span class="op">.</span><span class="fu">parse_float</span>(d<span class="op">.</span><span class="at">isit_lon</span>)<span class="op">,</span></span> 553<span id="cb20-14"><a href="#cb20-14" aria-hidden="true" tabindex="-1"></a> <span class="dt">isit_average</span><span class="op">:</span> d <span class="kw">=></span> op<span class="op">.</span><span class="fu">parse_float</span>(d<span class="op">.</span><span class="at">isit_average</span>)<span class="op">,</span></span> 554<span id="cb20-15"><a href="#cb20-15" aria-hidden="true" tabindex="-1"></a> <span class="co">// current? (that's the actual avg temp)</span></span> 555<span id="cb20-16"><a href="#cb20-16" aria-hidden="true" tabindex="-1"></a>
555 <span class="dt">isit_maximum</span><span class="op">:</span> d <span class="kw">=></span> op<span class="op">.</span><span class="fu">parse_float</span>(d<span class="op">.</span><span class="at">isit_maximum</span>)<span class="op">,</span></span> 556<span id="cb20-17"><a href="#cb20-17" aria-hidden="true" tabindex="-1"></a> <span class="dt">isit_minimum</span><span class="op">:</span> d <span class="kw">=></span> op<span class="op">.</span><span class="fu">parse_float</span>(d<span class="op">.</span><span class="at">isit_minimum</span>)<span class="op">,</span></span> 557<span id="cb20-18"><a href="#cb20-18" aria-hidden="true" tabindex="-1"></a> <span class="dt">max_when</span><span class="op">:</span> d <span class="kw">=></span> op<span class="op">.</span><span class="fu">parse_date</span>(d<span class="op">.</span><span class="at">isit_maximum_dt</span>)<span class="op">,</span></span> 558<span id="cb20-19"><a href="#cb20-19" aria-hidden="true" tabindex="-1"></a> <span class="dt">min_when</span><span class="op">:</span> d <span class="kw">=></span> op<span class="op">.</span><span class="fu">parse_date</span>(d<span class="op">.</span><span class="at">isit_minimum_dt</span>)<span class="op">,</span></span> 559<span id="cb20-20"><a href="#cb20-20" aria-hidden="true" tabindex="-1"></a>
559 <span class="dt">slug</span><span class="op">:</span> d <span class="kw">=></span></span> 560<span id="cb20-21"><a href="#cb20-21" aria-hidden="true" tabindex="-1"></a> op<span class="op">.</span><span class="fu">replace</span>(</span> 561<span id="cb20-22"><a href="#cb20-22" aria-hidden="true" tabindex="-1"></a> op<span class="op">.</span><span class="fu">replace</span>(</span> 562<span id="cb20-23"><a href="#cb20-23" aria-hidden="true" tabindex="-1"></a> op<span class="op">.</span><span class="fu">replace</span>(</span> 563<span id="cb20-24"><a href="#cb20-24" aria-hidden="true" tabindex="-1"></a> op<span class="op">.</span><span class="fu">lower</span>(d<span class="op">.</span><span class="at">isit_label</span>)<span class="op">,</span></span> 564<span id="cb20-25"><a href="#cb20-25" aria-hidden="true" tabindex="-1"></a> <span class="ss">/</span><span class="sc">\s</span><span class="ss">-</span><span class="sc">\s</span><span class="ss">/g</span><span class="op">,</span> <span class="st">"-"</span>)<span class="op">,</span></span> 565<span id="cb20-26"><a href="#cb20-26" aria-hidden="true" tabindex="-1"></a> <span class="ss">/</span><span class="sc">\s</span><span class="ss">/g</span><span class="op">,</span> <span class="st">"-"</span>)<span class="op">,</span></span> 566<span id="cb20-27"><a href="#cb20-27" aria-hidden="true" tabindex="-1"></a> <span class="ss">/</span><span class="sc">[()]</span><span class="ss">/g</span><span class="op">,</span> <span class="st">""</span>)</span> 567<span id="cb20-28"><a href="#cb20-28" aria-hidden="true" tabindex="-1"></a> })</span> 568<span id="cb20-29"><a href="#cb20-29" aria-hidden="true" tabindex="-1"></a> <span class="co">
568// mark as stale if latest obs are > 24 hours old</span></span> 569<span id="cb20-30"><a href="#cb20-30" aria-hidden="true" tabindex="-1"></a> <span class="op">.</span><span class="fu">derive</span>({</span> 570<span id="cb20-31"><a href="#cb20-31" aria-hidden="true" tabindex="-1"></a> <span class="dt">max_stale</span><span class="op">:</span></span> 571<span id="cb20-32"><a href="#cb20-32" aria-hidden="true" tabindex="-1"></a> d <span class="kw">=></span> ((d<span class="op">.</span><span class="at">max_when</span> <span class="op">-</span> op<span class="op">.</span><span class="fu">now</span>()) <span class="op">/</span> (<span class="dv">1000</span> <span class="op">*</span> <span class="dv">60</span>)) <span class="op">/</span> (<span class="dv">24</span> <span class="op">*</span> <span class="dv">60</span>) <span class="op">></span> <span class="dv">1</span><span class="op">,</span></span> 572<span id="cb20-33"><a href="#cb20-33" aria-hidden="true" tabindex="-1"></a> <span class="dt">min_stale</span><span class="op">:</span></span> 573<span id="cb20-34"><a href="#cb20-34" aria-hidden="true" tabindex="-1"></a> d <span class="kw">=></span> ((d<span class="op">.</span><span class="at">min_when</span> <span class="op">-</span> op<span class="op">.</span><span class="fu">now</span>()) <span class="op">/</span> (<span class="dv">1000</span> <span class="op">*</span> <span class="dv">60</span>)) <span class="op">/</span> (<span class="dv">24</span> <span class="op">*</span> <span class="dv">60</span>) <span class="op">></span> <span class="dv">1</span></span> 574<span id="cb20-35"><a href="#cb20-35" aria-hidden="true" tabindex="-1"></a> })</span> 575<span id="cb20-36"><a href="#cb20-36" aria-hidden="true" tabindex="-1"></a> <span class="op">.</span><span class="fu">objects</span>()</span> 576<span id="cb20-37"><a href="#cb20-37" aria-hidden="true" tabindex="-1"></a> <span class="cf">return</span>(tidiedStats)</span> 577<span id="cb20-38"><a href="#cb20-38" aria-hidden="true" tabindex="-1"></a>}</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> 578<div class="cell-output cell-output-display"> 579<div id="load-map-data-1"> 580<div id="ojs-cell-16-1" data-nodetype="declaration"> 581 582</div> 583</div> 584</div> 585<div class="cell-output cell-output-display"> 586<div id="load-map-data-2"> 587<div id="ojs-cell-16-2" data-nodetype="declaration"> 588 589</div> 590</div> 591</div> 592</div> 593<div id="filter-points" class="cell"> 594<div class="sourceCode cell-code" id="cb21" data-startfrom="1" data-source-offset="-0"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript"><span id="cb21-1"><a href="#cb21-1" aria-hidden="true" tabindex="-1"></a>currentStats <span class="op">=</span> statsAll<span class="op">.</span><span class="fu">filter</span>(d <span class="kw">=></span> (<span class="op">!</span>d<span class="op">.</span><span class="at">max_stale</span>) <span class="op">&&</span> (<span class="op">!</span>d<span class="op">.</span><span class="at">min_stale</span>))</span> 595<span id="cb21-2"><a href="#cb21-2" aria-hidden="true" tabindex="-1"></a>staleStats <span class="op">=</span> statsAll<span class="op">.</span><span class="fu">filter</span>(d <span class="kw">=></span> d<span class="op">.</span><span class="at">max_stale</span> <span class="op">||</span> d<span class="op">.</span><span class="at">min_stale</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> 596<div class="cell-output cell-output-display"> 597<div id="filter-points-1"> 598<div id="ojs-cell-17-1" data-nodetype="declaration"> 599 600</div> 601</div> 602</div> 603<div class="cell-output cell-output-display"> 604<div id="filter-points-2"> 605<div id="ojs-cell-17-2" data-nodetype="declaration"> 606 607</div> 608</div> 609</div> 610</div> 611<div id="draw-map" class="cell iihrn-map" data-error="false"> 612<div class="sourceCode cell-code hidden" id="cb22" data-startfrom="4" data-source-offset="-0"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript" style="counter-reset: source-line 3;"><span id="cb22-4"><a href="#cb22-4" aria-hidden="true" tabindex="-1"></a>germany <span class="op">=</span> <span class="fu">FileAttachment</span>(<span class="st">"/assets/germany.geojson"</span>)<span class="op">.</span><span class="fu">json</span>()</span> 613<span id="cb22-5"><a href="#cb22-5" aria-hidden="true" tabindex="-1"></a>
613Plot <span class="op">=</span> <span class="im">import</span>(<span class="st">"https://esm.run/@observablehq/plot"</span>)</span> 614<span id="cb22-6"><a href="#cb22-6" aria-hidden="true" tabindex="-1"></a></span> 615<span id="cb22-7"><a href="#cb22-7" aria-hidden="true" tabindex="-1"></a>answer_domain <span class="op">=</span> [</span> 616<span id="cb22-8"><a href="#cb22-8" aria-hidden="true" tabindex="-1"></a> <span class="st">"Auf gar keinen Fall!"</span><span class="op">,</span></span> 617<span id="cb22-9"><a href="#cb22-9" aria-hidden="true" tabindex="-1"></a> <span class="st">"Nein!"</span><span class="op">,</span></span> 618<span id="cb22-10"><a href="#cb22-10" aria-hidden="true" tabindex="-1"></a> <span class="st">"Nee"</span><span class="op">,</span></span> 619<span id="cb22-11"><a href="#cb22-11" aria-hidden="true" tabindex="-1"></a> <span class="st">"Nicht wirklich"</span><span class="op">,</span></span> 620<span id="cb22-12"><a href="#cb22-12" aria-hidden="true" tabindex="-1"></a> <span class="st">"Jepp"</span><span class="op">,</span></span> 621<span id="cb22-13"><a href="#cb22-13" aria-hidden="true" tabindex="-1"></a> <span class="st">"Ziemlich!"</span><span class="op">,</span></span> 622<span id="cb22-14"><a href="#cb22-14" aria-hidden="true" tabindex="-1"></a> <span class="st">"Absolut!"</span>]</span> 623<span id="cb22-15"><a href="#cb22-15" aria-hidden="true" tabindex="-1"></a></span> 624<span id="cb22-16"><a href="#cb22-16" aria-hidden="true" tabindex="-1"></a>Plot<span class="op">.</span><span class="fu">plot</span>({</span> 625<span id="cb22-17"><a href="#cb22-17" aria-hidden="true" tabindex="-1"></a> <span class="dt">projection</span><span class="op">:</span> {</span> 626<span id="cb22-18"><a href="#cb22-18" aria-hidden="true" tabindex="-1"></a> <span class="dt">type</span><span class="op">:</span> <span class="st">"equirectangular"</span><span class="op">,</span></span> 627<span id="cb22-19"><a href="#cb22-19" aria-hidden="true" tabindex="-1"></a> <span class="dt">rotate</span><span class="op">:</span> [<span class="op">-</span><span class="fl">10.4515</span><span class="op">,</span> <span class="op">-</span><span class="fl">51.1657</span>]<span class="op">,</span></span> 628<span id="cb22-20"><a href="#cb22-20" aria-hidden="true" tabindex="-1"></a> <span class="dt">domain</span><span class="op">:</span> d3<span class="op">.</span><span class="fu">geoCircle</span>()<span class="op">.</span><span class="fu">center</span>([<span class="fl">10.4515</span><span class="op">,</span> <span class="fl">51.1657</span>])<span class="op">.</span><span class="fu">radius</span>(<span class="fl">4.25</span>)()<span class="op">,</span></span> 629<span id="cb22-21"><a href="#cb22-21" aria-hidden="true" tabindex="-1"></a> }<span class="op">,</span></span> 630<span id="cb22-22"><a href="#cb22-22" aria-hidden="true" tabindex="-1"></a> <span class="dt">marks</span><span class="op">:</span> [</span> 631<span id="cb22-23"><a href="#cb22-23" aria-hidden="true" tabindex="-1"></a> <span class="co">// Plot.graticule(),</span></span> 632<span id="cb22-24"><a href="#cb22-24" aria-hidden="true" tabindex="-1"></a> Plot<span class="op">.</span><span class="fu">geo</span>(germany<span class="op">,</span> {</span> 633<span id="cb22-25"><a href="#cb22-25" aria-hidden="true" tabindex="-1"></a>
633 <span class="dt">fill</span><span class="op">:</span> <span class="st">"#00000009"</span><span class="op">,</span></span> 634<span id="cb22-26"><a href="#cb22-26" aria-hidden="true" tabindex="-1"></a> <span class="dt">stroke</span><span class="op">:</span> <span class="st">"#dddddd"</span></span> 635<span id="cb22-27"><a href="#cb22-27" aria-hidden="true" tabindex="-1"></a> })<span class="op">,</span></span> 636<span id="cb22-28"><a href="#cb22-28" aria-hidden="true" tabindex="-1"></a> <span class="co">// replace stale locations with crosses</span></span> 637<span id="cb22-29"><a href="#cb22-29" aria-hidden="true" tabindex="-1"></a> Plot<span class="op">.</span><span class="fu">dot</span>(staleStats<span class="op">,</span> {</span> 638<span id="cb22-30"><a href="#cb22-30" aria-hidden="true" tabindex="-1"></a> <span class="dt">x</span><span class="op">:</span> <span class="st">"lon"</span><span class="op">,</span></span> 639<span id="cb22-31"><a href="#cb22-31" aria-hidden="true" tabindex="-1"></a> <span class="dt">y</span><span class="op">:</span> <span class="st">"lat"</span><span class="op">,</span></span> 640<span id="cb22-32"><a href="#cb22-32" aria-hidden="true" tabindex="-1"></a>
640 <span class="dt">stroke</span><span class="op">:</span> <span class="st">"lightgrey"</span><span class="op">,</span></span> 641<span id="cb22-33"><a href="#cb22-33" aria-hidden="true" tabindex="-1"></a> <span class="dt">r</span><span class="op">:</span> <span class="dv">6</span><span class="op">,</span></span> 642<span id="cb22-34"><a href="#cb22-34" aria-hidden="true" tabindex="-1"></a> <span class="dt">symbol</span><span class="op">:</span> <span class="st">"times"</span></span> 643<span id="cb22-35"><a href="#cb22-35" aria-hidden="true" tabindex="-1"></a> })<span class="op">,</span></span> 644<span id="cb22-36"><a href="#cb22-36" aria-hidden="true" tabindex="-1"></a> Plot<span class="op">.</span><span class="fu">dot</span>(currentStats<span class="op">,</span> {</span> 645<span id="cb22-37"><a href="#cb22-37" aria-hidden="true" tabindex="-1"></a> <span class="dt">x</span><span class="op">:</span> <span class="st">"lon"</span><span class="op">,</span></span> 646<span id="cb22-38"><a href="#cb22-38" aria-hidden="true" tabindex="-1"></a>
646 <span class="dt">y</span><span class="op">:</span> <span class="st">"lat"</span><span class="op">,</span></span> 647<span id="cb22-39"><a href="#cb22-39" aria-hidden="true" tabindex="-1"></a> <span class="dt">fill</span><span class="op">:</span> <span class="st">"isit_answer"</span><span class="op">,</span></span> 648<span id="cb22-40"><a href="#cb22-40" aria-hidden="true" tabindex="-1"></a> <span class="dt">stroke</span><span class="op">:</span> d <span class="kw">=></span></span> 649<span id="cb22-41"><a href="#cb22-41" aria-hidden="true" tabindex="-1"></a> d<span class="op">.</span><span class="at">isit_answer</span> <span class="op">==</span> <span class="st">"Auf gar keinen Fall!"</span> <span class="op">||</span> d<span class="op">.</span><span class="at">isit_answer</span> <span class="op">==</span> <span class="st">"Verdammt viel!"</span> <span class="op">?</span></span> 650<span id="cb22-42"><a href="#cb22-42" aria-hidden="true" tabindex="-1"></a> <span class="st">"black"</span> <span class="op">:</span></span> 651<span id="cb22-43"><a href="#cb22-43" aria-hidden="true" tabindex="-1"></a> <span class="st">"#00000099"</span><span class="op">,</span></span> 652<span id="cb22-44"><a href="#cb22-44" aria-hidden="true" tabindex="-1"></a>
652 <span class="dt">strokeWidth</span><span class="op">:</span> <span class="fl">0.75</span><span class="op">,</span></span> 653<span id="cb22-45"><a href="#cb22-45" aria-hidden="true" tabindex="-1"></a> <span class="dt">r</span><span class="op">:</span> <span class="dv">6</span><span class="op">,</span></span> 654<span id="cb22-46"><a href="#cb22-46" aria-hidden="true" tabindex="-1"></a> })<span class="op">,</span></span> 655<span id="cb22-47"><a href="#cb22-47" aria-hidden="true" tabindex="-1"></a> Plot<span class="op">.</span><span class="fu">tip</span>(currentStats<span class="op">,</span> tipTemplate)<span class="op">,</span></span> 656<span id="cb22-48"><a href="#cb22-48" aria-hidden="true" tabindex="-1"></a> <span class="co">// enlarge dot you're pointing to</span></span> 657<span id="cb22-49"><a href="#cb22-49" aria-hidden="true" tabindex="-1"></a> Plot<span class="op">.</span><span class="fu">dot</span>(currentStats<span class="op">,</span> Plot<span class="op">.</span><span class="fu">pointer</span>({</span> 658<span id="cb22-50"><a href="#cb22-50" aria-hidden="true" tabindex="-1"></a>
658 <span class="dt">x</span><span class="op">:</span> <span class="st">"lon"</span><span class="op">,</span></span> 659<span id="cb22-51"><a href="#cb22-51" aria-hidden="true" tabindex="-1"></a> <span class="dt">y</span><span class="op">:</span> <span class="st">"lat"</span><span class="op">,</span></span> 660<span id="cb22-52"><a href="#cb22-52" aria-hidden="true" tabindex="-1"></a> <span class="dt">fill</span><span class="op">:</span> <span class="st">"isit_answer"</span><span class="op">,</span></span> 661<span id="cb22-53"><a href="#cb22-53" aria-hidden="true" tabindex="-1"></a> <span class="dt">stroke</span><span class="op">:</span> d <span class="kw">=></span></span> 662<span id="cb22-54"><a href="#cb22-54" aria-hidden="true" tabindex="-1"></a> d<span class="op">.</span><span class="at">isit_answer</span> <span class="op">==</span> <span class="st">"Auf gar keinen Fall!"</span> <span class="op">||</span> d<span class="op">.</span><span class="at">isit_answer</span> <span class="op">==</span> <span class="st">"Verdammt viel!"</span> <span class="op">?</span></span> 663<span id="cb22-55"><a href="#cb22-55" aria-hidden="true" tabindex="-1"></a> <span class="st">"black"</span> <span class="op">:</span></span> 664<span id="cb22-56"><a href="#cb22-56" aria-hidden="true" tabindex="-1"></a> <span class="st">"#00000099"</span><span class="op">,</span></span> 665<span id="cb22-57"><a href="#cb22-57" aria-hidden="true" tabindex="-1"></a>
665 <span class="dt">strokeWidth</span><span class="op">:</span> <span class="fl">0.75</span><span class="op">,</span></span> 666<span id="cb22-58"><a href="#cb22-58" aria-hidden="true" tabindex="-1"></a> <span class="dt">r</span><span class="op">:</span> <span class="dv">12</span><span class="op">,</span></span> 667<span id="cb22-59"><a href="#cb22-59" aria-hidden="true" tabindex="-1"></a> }))<span class="op">,</span></span> 668<span id="cb22-60"><a href="#cb22-60" aria-hidden="true" tabindex="-1"></a> <span class="co">// enlargen clickable areas with invisible voronoi polys</span></span> 669<span id="cb22-61"><a href="#cb22-61" aria-hidden="true" tabindex="-1"></a> Plot<span class="op">.</span><span class="fu">voronoi</span>(currentStats<span class="op">,</span> {</span> 670<span id="cb22-62"><a href="#cb22-62" aria-hidden="true" tabindex="-1"></a> <span class="dt">x</span><span class="op">:</span> <span class="st">"lon"</span><span class="op">,</span></span> 671<span id="cb22-63"><a href="#cb22-63" aria-hidden="true" tabindex="-1"></a>
671 <span class="dt">y</span><span class="op">:</span> <span class="st">"lat"</span><span class="op">,</span></span> 672<span id="cb22-64"><a href="#cb22-64" aria-hidden="true" tabindex="-1"></a> <span class="dt">fill</span><span class="op">:</span> <span class="st">"transparent"</span><span class="op">,</span></span> 673<span id="cb22-65"><a href="#cb22-65" aria-hidden="true" tabindex="-1"></a> <span class="dt">stroke</span><span class="op">:</span> <span class="st">"transparent"</span><span class="op">,</span></span> 674<span id="cb22-66"><a href="#cb22-66" aria-hidden="true" tabindex="-1"></a> <span class="dt">href</span><span class="op">:</span> d <span class="kw">=></span> <span class="st">"/places/"</span> <span class="op">+</span> d<span class="op">.</span><span class="at">slug</span><span class="op">,</span></span> 675<span id="cb22-67"><a href="#cb22-67" aria-hidden="true" tabindex="-1"></a> })<span class="op">,</span></span> 676<span id="cb22-68"><a href="#cb22-68" aria-hidden="true" tabindex="-1"></a></span> 677<span id="cb22-69"><a href="#cb22-69" aria-hidden="true" tabindex="-1"></a> ]<span class="op">,</span></span> 678<span id="cb22-70"><a href="#cb22-70" aria-hidden="true" tabindex="-1"></a> <span class="dt">color</span><span class="op">:</span> {</span> 679<span id="cb22-71"><a href="#cb22-71" aria-hidden="true" tabindex="-1"></a> <span class="dt">type</span><span class="op">:</span> <span class="st">"ordinal"</span><span class="op">,</span></span> 680<span id="cb22-72"><a href="#cb22-72" aria-hidden="true" tabindex="-1"></a> <span class="dt">domain</span><span class="op">:</span> answer_domain<span class="op">,</span></span> 681<span id="cb22-73"><a href="#cb22-73" aria-hidden="true" tabindex="-1"></a> <span class="dt">range</span><span class="op">:</span> [<span class="st">"#2166acff"</span><span class="op">,</span></span> 682<span id="cb22-74"><a href="#cb22-74" aria-hidden="true" tabindex="-1"></a> <span class="st">"#67a9cfff"</span><span class="op">,</span></span> 683<span id="cb22-75"><a href="#cb22-75" aria-hidden="true" tabindex="-1"></a> <span class="st">"#d1e5f0ff"</span><span class="op">,</span></span> 684<span id="cb22-76"><a href="#cb22-76" aria-hidden="true" tabindex="-1"></a> <span class="st">"#f7f7f7ff"</span><span class="op">,</span></span> 685<span id="cb22-77"><a href="#cb22-77" aria-hidden="true" tabindex="-1"></a> <span class="st">"#fddbc7ff"</span><span class="op">,</span></span> 686<span id="cb22-78"><a href="#cb22-78" aria-hidden="true" tabindex="-1"></a> <span class="st">"#ef8a62ff"</span><span class="op">,</span></span> 687<span id="cb22-79"><a href="#cb22-79" aria-hidden="true" tabindex="-1"></a> <span class="st">"#b2182bff"</span>]</span> 688<span id="cb22-80"><a href="#cb22-80" aria-hidden="true" tabindex="-1"></a> }<span class="op">,</span></span> 689<span id="cb22-81"><a href="#cb22-81" aria-hidden="true" tabindex="-1"></a> <span class="dt">height</span><span class="op">:</span> <span class="dv">600</span><span class="op">,</span></span> 690<span id="cb22-82"><a href="#cb22-82" aria-hidden="true" tabindex="-1"></a>})</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> 691<div class="cell-output cell-output-display"> 692<div id="draw-map-1"> 693<div id="ojs-cell-18-1" data-nodetype="declaration"> 694 695</div> 696</div> 697</div> 698<div class="cell-output cell-output-display"> 699<div id="draw-map-2"> 700<div id="ojs-cell-18-2" data-nodetype="declaration"> 701 702</div> 703</div> 704</div> 705<div class="cell-output cell-output-display"> 706<div id="draw-map-3"> 707<div id="ojs-cell-18-3" data-nodetype="declaration"> 708 709</div> 710</div> 711</div> 712<div class="cell-output cell-output-display"> 713<div id="draw-map-4"> 714<div id="ojs-cell-18-4" data-nodetype="expression"> 715 716</div> 717</div> 718</div> 719</div> 720<div class="cell"> 721<div class="sourceCode cell-code" id="cb23" data-startfrom="0" data-source-offset="0"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript" style="counter-reset: source-line -1;"><span id="cb23-0"><a href="#cb23-0" aria-hidden="true" tabindex="-1"></a><span class="co">// breaking out the pointer layer for readability</span></span> 722<span id="cb23-1"><a href="#cb23-1" aria-hidden="true" tabindex="-1"></a><span class="co">// (and in case we decide to customise it later)</span></span> 723<span id="cb23-2"><a href="#cb23-2" aria-hidden="true" tabindex="-1"></a>tipTemplate <span class="op">=</span> Plot<span class="op">.</span><span class="fu">pointer</span>({</span> 724<span id="cb23-3"><a href="#cb23-3" aria-hidden="true" tabindex="-1"></a> <span class="dt">x</span><span class="op">:</span> <span class="st">"lon"</span><span class="op">,</span></span> 725<span id="cb23-4"><a href="#cb23-4" aria-hidden="true" tabindex="-1"></a> <span class="dt">y</span><span class="op">:</span> <span class="st">"lat"</span><span class="op">,</span></span> 726<span id="cb23-5"><a href="#cb23-5" aria-hidden="true" tabindex="-1"></a> <span class="dt">channels</span><span class="op">:</span> {</span> 727<span id="cb23-6"><a href="#cb23-6" aria-hidden="true" tabindex="-1"></a> <span class="dt">place</span><span class="op">:</span> {</span> 728<span id="cb23-7"><a href="#cb23-7" aria-hidden="true" tabindex="-1"></a>
728 <span class="dt">label</span><span class="op">:</span> <span class="st">""</span><span class="op">,</span></span> 729<span id="cb23-8"><a href="#cb23-8" aria-hidden="true" tabindex="-1"></a> <span class="dt">value</span><span class="op">:</span> d <span class="kw">=></span> d<span class="op">.</span><span class="at">isit_label</span><span class="op">,</span></span> 730<span id="cb23-9"><a href="#cb23-9" aria-hidden="true" tabindex="-1"></a> }<span class="op">,</span></span> 731<span id="cb23-10"><a href="#cb23-10" aria-hidden="true" tabindex="-1"></a> <span class="dt">label</span><span class="op">:</span> {</span> 732<span id="cb23-11"><a href="#cb23-11" aria-hidden="true" tabindex="-1"></a> <span class="dt">label</span><span class="op">:</span> <span class="st">""</span><span class="op">,</span></span> 733<span id="cb23-12"><a href="#cb23-12" aria-hidden="true" tabindex="-1"></a> <span class="dt">value</span><span class="op">:</span> d <span class="kw">=></span> d<span class="op">.</span><span class="at">isit_comment</span></span> 734<span id="cb23-13"><a href="#cb23-13" aria-hidden="true" tabindex="-1"></a> }<span class="op">,</span></span> 735<span id="cb23-14"><a href="#cb23-14" aria-hidden="true" tabindex="-1"></a> <span class="dt">separator</span><span class="op">:</span> {</span> 736<span id="cb23-15"><a href="#cb23-15" aria-hidden="true" tabindex="-1"></a>
736 <span class="dt">label</span><span class="op">:</span> <span class="st">""</span><span class="op">,</span></span> 737<span id="cb23-16"><a href="#cb23-16" aria-hidden="true" tabindex="-1"></a> <span class="dt">value</span><span class="op">:</span> d <span class="kw">=></span> <span class="st">""</span></span> 738<span id="cb23-17"><a href="#cb23-17" aria-hidden="true" tabindex="-1"></a> }<span class="op">,</span></span> 739<span id="cb23-18"><a href="#cb23-18" aria-hidden="true" tabindex="-1"></a> <span class="dt">isit_maximum</span><span class="op">:</span> {</span> 740<span id="cb23-19"><a href="#cb23-19" aria-hidden="true" tabindex="-1"></a> <span class="dt">label</span><span class="op">:</span> <span class="st">"Max:"</span><span class="op">,</span></span> 741<span id="cb23-20"><a href="#cb23-20" aria-hidden="true" tabindex="-1"></a> <span class="dt">value</span><span class="op">:</span> d <span class="kw">=></span> d<span class="op">.</span><span class="at">isit_maximum</span> <span class="op">+</span> <span class="st">"°C"</span></span> 742<span id="cb23-21"><a href="#cb23-21" aria-hidden="true" tabindex="-1"></a> }<span class="op">,</span></span> 743<span id="cb23-22"><a href="#cb23-22" aria-hidden="true" tabindex="-1"></a> <span class="dt">isit_minimum</span><span class="op">:</span> {</span> 744<span id="cb23-23"><a href="#cb23-23" aria-hidden="true" tabindex="-1"></a>
744 <span class="dt">label</span><span class="op">:</span> <span class="st">"Min:"</span><span class="op">,</span></span> 745<span id="cb23-24"><a href="#cb23-24" aria-hidden="true" tabindex="-1"></a> <span class="dt">value</span><span class="op">:</span> d <span class="kw">=></span> d<span class="op">.</span><span class="at">isit_minimum</span> <span class="op">+</span> <span class="st">"°C"</span></span> 746<span id="cb23-25"><a href="#cb23-25" aria-hidden="true" tabindex="-1"></a> }</span> 747<span id="cb23-26"><a href="#cb23-26" aria-hidden="true" tabindex="-1"></a> }<span class="op">,</span></span> 748<span id="cb23-27"><a href="#cb23-27" aria-hidden="true" tabindex="-1"></a> <span class="dt">fontSize</span><span class="op">:</span> <span class="dv">20</span><span class="op">,</span></span> 749<span id="cb23-28"><a href="#cb23-28" aria-hidden="true" tabindex="-1"></a> <span class="dt">fontFamily</span><span class="op">:</span> <span class="st">"Roboto Condensed"</span><span class="op">,</span></span> 750<span id="cb23-29"><a href="#cb23-29" aria-hidden="true" tabindex="-1"></a> <span class="dt">format</span><span class="op">:</span> {</span> 751<span id="cb23-30"><a href="#cb23-30" aria-hidden="true" tabindex="-1"></a> <span class="dt">x</span><span class="op">:</span> <span class="kw">null</span><span class="op">,</span></span> 752<span id="cb23-31"><a href="#cb23-31" aria-hidden="true" tabindex="-1"></a> <span class="dt">y</span><span class="op">:</span> <span class="kw">null</span></span> 753<span id="cb23-32"><a href="#cb23-32" aria-hidden="true" tabindex="-1"></a> }<span class="op">,</span></span> 754<span id="cb23-33"><a href="#cb23-33" aria-hidden="true" tabindex="-1"></a> <span class="dt">lineWidth</span><span class="op">:</span> <span class="dv">20</span><span class="op">,</span></span> 755<span id="cb23-34"><a href="#cb23-34" aria-hidden="true" tabindex="-1"></a> <span class="dt">lineHeight</span><span class="op">:</span> <span class="fl">1.25</span><span class="op">,</span></span> 756<span id="cb23-35"><a href="#cb23-35" aria-hidden="true" tabindex="-1"></a> <span class="dt">pointerSize</span><span class="op">:</span> <span class="dv">0</span><span class="op">,</span></span> 757<span id="cb23-36"><a href="#cb23-36" aria-hidden="true" tabindex="-1"></a> <span class="dt">fillOpacity</span><span class="op">:</span> <span class="fl">0.8</span><span class="op">,</span></span> 758<span id="cb23-37"><a href="#cb23-37" aria-hidden="true" tabindex="-1"></a> <span class="dt">strokeOpacity</span><span class="op">:</span> <span class="dv">0</span></span> 759<span id="cb23-38"><a href="#cb23-38" aria-hidden="true" tabindex="-1"></a>})</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> 760<div id="tip-template" class="cell-output cell-output-display"> 761<div id="ojs-cell-19" data-nodetype="declaration"> 762 763</div> 764</div> 765</div> 766</div> 767</div> 768</div> 769<div id="international-section" class="iihrn-section page-columns page-full"> 770<div class="column-body"> 771<p><span class="strong small">Dieses Projekt gibt es auch für andere Länder</span></p> 772<div class="flags"> 773<ul> 774<li><a href="https://isithotrightnow.com/"><img src="./assets/flags/au.svg" class="img-fluid" alt="Australien"> Australien</a></li> 775<li><a href="https://hoyextremo.com/"><img src="./assets/flags/es.svg" class="img-fluid" alt="Spanien"> Spanien</a></li> 776<li><a href="https://istheukhotrightnow.com/"><img src="./assets/flags/gb.svg" class="img-fluid" alt="UK"> UK</a></li> 777<li><a href="https://scp.geographie.rub.de/isithot/lmss"><img src="./assets/flags/bochum.svg" class="img-fluid" alt="Bochum"> Bochum</a></li> 778</ul> 779</div> 780</div> 781</div> 782 783 784<div class="ojs-auto-generated hidden">
785<script type="ojs-module-contents"> 786eyJjb250ZW50cyI6WyAgeyJtZXRob2ROYW1lIjoiaW50ZXJwcmV0IiwiaW5saW5lIjoidHJ1ZSIsInNvdXJjZSI6Imh0bC5odG1sYDxzcGFuPiR7c3RhdHNQbGFjZS5pc2l0X2xhYmVsfTwvc3Bhbj5gIiwgImNlbGxOYW1lIjoib2pzLWVsZW1lbnQtaWQtMSJ9LCAgeyJtZXRob2ROYW1lIjoiaW50ZXJwcmV0IiwiaW5saW5lIjoidHJ1ZSIsInNvdXJjZSI6Imh0bC5odG1sYDxzcGFuPiR7c3RhdHNQbGFjZS5pc2l0X2xhYmVsfTwvc3Bhbj5gIiwgImNlbGxOYW1lIjoib2pzLWVsZW1lbnQtaWQtMiJ9XX0= 787</script>
787 788</div>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2l0X21pbmltdW0gKyBcIsKwQ1wiXG4gICAgfVxuICB9LFxuICBmb250U2l6ZTogMjAsXG4gIGZvbnRGYW1pbHk6IFwiUm9ib3RvIENvbmRlbnNlZFwiLFxuICBmb3JtYXQ6IHtcbiAgICB4OiBudWxsLFxuICAgIHk6IG51bGxcbiAgfSxcbiAgbGluZVdpZHRoOiAyMCxcbiAgbGluZUhlaWdodDogMS4yNSxcbiAgcG9pbnRlclNpemU6IDAsXG4gIGZpbGxPcGFjaXR5OiAwLjgsXG4gIHN0cm9rZU9wYWNpdHk6IDBcbn0pXG4ifV19 793</script>
vendor: 1 bytes, line 793
793
794<script type="module"> 795if (window.location.protocol === "file:") { alert("The OJS runtime does not work with file:// URLs. Please use a web server to view this document."); } 796window._ojs.paths.runtimeToDoc = "../.."; 797window._ojs.paths.runtimeToRoot = "../.."; 798window._ojs.paths.docToRoot = ""; 799window._ojs.selfContained = false; 800window._ojs.runtime.interpretFromScriptTags(); 801</script>
vendor: 1 bytes, line 801
801
802<script id="quarto-html-after-body" type="application/javascript"> 803window.document.addEventListener("DOMContentLoaded", function (event) { 804 const toggleBodyColorMode = (bsSheetEl) => { 805 const mode = bsSheetEl.getAttribute("data-mode"); 806 const bodyEl = window.document.querySelector("body"); 807 if (mode === "dark") { 808 bodyEl.classList.add("quarto-dark"); 809 bodyEl.classList.remove("quarto-light"); 810 } else { 811 bodyEl.classList.add("quarto-light"); 812 bodyEl.classList.remove("quarto-dark"); 813 } 814 } 815 const toggleBodyColorPrimary = () => { 816 const bsSheetEl = window.document.querySelector("link#quarto-bootstrap"); 817 if (bsSheetEl) { 818 toggleBodyColorMode(bsSheetEl); 819 } 820 } 821 toggleBodyColorPrimary(); 822 const icon = "î§"; 823 const anchorJS = new window.AnchorJS(); 824 anchorJS.options = { 825 placement: 'right', 826 icon: icon 827 }; 828 anchorJS.add('.anchored'); 829 const isCodeAnnotation = (el) => { 830 for (const clz of el.classList) { 831 if (clz.startsWith('code-annotation-')) { 832 return true; 833 } 834 } 835 return false; 836 } 837 const clipboard = new window.ClipboardJS('.code-copy-button', { 838 text: function(trigger) { 839 const codeEl = trigger.previousElementSibling.cloneNode(true); 840 for (const childEl of codeEl.children) { 841 if (isCodeAnnotation(childEl)) { 842 childEl.remove(); 843 } 844 } 845 return codeEl.innerText; 846 } 847 }); 848 clipboard.on('success', function(e) { 849 // button target 850 const button = e.trigger; 851 // don't keep focus 852 button.blur(); 853 // flash "checked" 854 button.classList.add('code-copy-button-checked'); 855 var currentTitle = button.getAttribute("title"); 856 button.setAttribute("title", "Copied!"); 857 let tooltip; 858 if (window.bootstrap) { 859 button.setAttribute("data-bs-toggle", "tooltip"); 860 button.setAttribute("data-bs-placement", "left"); 861 button.setAttribute("data-bs-title", "Copied!"); 862 tooltip = new bootstrap.Tooltip(button, 863 { trigger: "manual", 864 customClass: "code-copy-button-tooltip", 865 offset: [0, -8]}); 866 tooltip.show(); 867 } 868 setTimeout(function() { 869 if (tooltip) { 870 tooltip.hide(); 871 button.removeAttribute("data-bs-title"); 872 button.removeAttribute("data-bs-toggle"); 873 button.removeAttribute("data-bs-placement"); 874 } 875 button.setAttribute("title", currentTitle); 876 button.classList.remove('code-copy-button-checked'); 877 }, 1000); 878 // clear code selection 879 e.clearSelection(); 880 }); 881 function tippyHover(el, contentFn, onTriggerFn, onUntriggerFn) { 882 const config = { 883 allowHTML: true, 884 maxWidth: 500, 885 delay: 100, 886 arrow: false, 887 appendTo: function(el) { 888 return el.parentElement; 889 }, 890 interactive: true, 891 interactiveBorder: 10, 892 theme: 'quarto', 893 placement: 'bottom-start', 894 }; 895 if (contentFn) { 896 config.content = contentFn; 897 } 898 if (onTriggerFn) { 899 config.onTrigger = onTriggerFn; 900 } 901 if (onUntriggerFn) { 902 config.onUntrigger = onUntriggerFn; 903 } 904 window.tippy(el, config); 905 } 906 const noterefs = window.document.querySelectorAll('a[role="doc-noteref"]'); 907 for (var i=0; i<noterefs.length; i++) { 908 const ref = noterefs[i]; 909 tippyHover(ref, function() { 910 // use id or data attribute instead here 911 let href = ref.getAttribute('data-footnote-href') || ref.getAttribute('href'); 912 try { href = new URL(href).hash; } catch {} 913 const id = href.replace(/^#\/?/, ""); 914 const note = window.document.getElementById(id); 915 return note.innerHTML; 916 }); 917 } 918 const xrefs = window.document.querySelectorAll('a.quarto-xref'); 919 const processXRef = (id, note) => { 920 // Strip column container classes 921 const stripColumnClz = (el) => { 922 el.classList.remove("page-full", "page-columns"); 923 if (el.children) { 924 for (const child of el.children) { 925 stripColumnClz(child); 926 } 927 } 928 } 929 stripColumnClz(note) 930 if (id === null || id.startsWith('sec-')) { 931 // Special case sections, only their first couple elements 932 const container = document.createElement("div"); 933 if (note.children && note.children.length > 2) { 934 container.appendChild(note.children[0].cloneNode(true)); 935 for (let i = 1; i < note.children.length; i++) { 936 const child = note.children[i]; 937 if (child.tagName === "P" && child.innerText === "") { 938 continue; 939 } else { 940 container.appendChild(child.cloneNode(true)); 941 break; 942 } 943 } 944 if (window.Quarto?.typesetMath) { 945 window.Quarto.typesetMath(container); 946 } 947 return container.innerHTML 948 } else { 949 if (window.Quarto?.typesetMath) { 950 window.Quarto.typesetMath(note); 951 } 952 return note.innerHTML; 953 } 954 } else { 955 // Remove any anchor links if they are present 956 const anchorLink = note.querySelector('a.anchorjs-link'); 957 if (anchorLink) { 958 anchorLink.remove(); 959 } 960 if (window.Quarto?.typesetMath) { 961 window.Quarto.typesetMath(note); 962 } 963 // TODO in 1.5, we should make sure this works without a callout special case 964 if (note.classList.contains("callout")) { 965 return note.outerHTML; 966 } else { 967 return note.innerHTML; 968 } 969 } 970 } 971 for (var i=0; i<xrefs.length; i++) { 972 const xref = xrefs[i]; 973 tippyHover(xref, undefined, function(instance) { 974 instance.disable(); 975 let url = xref.getAttribute('href'); 976 let hash = undefined; 977 if (url.startsWith('#')) { 978 hash = url; 979 } else { 980 try { hash = new URL(url).hash; } catch {} 981 } 982 if (hash) { 983 const id = hash.replace(/^#\/?/, ""); 984 const note = window.document.getElementById(id); 985 if (note !== null) { 986 try { 987 const html = processXRef(id, note.cloneNode(true)); 988 instance.setContent(html); 989 } finally { 990 instance.enable(); 991 instance.show(); 992 } 993 } else { 994 // See if we can fetch this 995 fetch(url.split('#')[0]) 996 .then(res => res.text()) 997 .then(html => { 998 const parser = new DOMParser(); 999 const htmlDoc = parser.parseFromString(html, "text/html"); 1000 const note = htmlDoc.getElementById(id); 1001 if (note !== null) { 1002 const html = processXRef(id, note); 1003 instance.setContent(html); 1004 } 1005 }).finally(() => { 1006 instance.enable(); 1007 instance.show(); 1008 }); 1009 } 1010 } else { 1011 // See if we can fetch a full url (with no hash to target)
1012 // This is a special case and we should probably do some content thinning / targeting 1013 fetch(url) 1014 .then(res => res.text()) 1015 .then(html => { 1016 const parser = new DOMParser(); 1017 const htmlDoc = parser.parseFromString(html, "text/html"); 1018 const note = htmlDoc.querySelector('main.content'); 1019 if (note !== null) { 1020 // This should only happen for chapter cross references 1021 // (since there is no id in the URL) 1022 // remove the first header 1023 if (note.children.length > 0 && note.children[0].tagName === "HEADER") { 1024 note.children[0].remove(); 1025 } 1026 const html = processXRef(null, note); 1027 instance.setContent(html); 1028 } 1029 }).finally(() => { 1030 instance.enable(); 1031 instance.show(); 1032 }); 1033 } 1034 }, function(instance) { 1035 }); 1036 } 1037 let selectedAnnoteEl; 1038 const selectorForAnnotation = ( cell, annotation) => { 1039 let cellAttr = 'data-code-cell="' + cell + '"'; 1040 let lineAttr = 'data-code-annotation="' + annotation + '"'; 1041 const selector = 'span[' + cellAttr + '][' + lineAttr + ']'; 1042 return selector; 1043 } 1044 const selectCodeLines = (annoteEl) => { 1045 const doc = window.document; 1046 const targetCell = annoteEl.getAttribute("data-target-cell"); 1047 const targetAnnotation = annoteEl.getAttribute("data-target-annotation"); 1048 const annoteSpan = window.document.querySelector(selectorForAnnotation(targetCell, targetAnnotation)); 1049 const lines = annoteSpan.getAttribute("data-code-lines").split(","); 1050 const lineIds = lines.map((line) => { 1051 return targetCell + "-" + line; 1052 }) 1053 let top = null; 1054 let height = null; 1055 let parent = null; 1056 if (lineIds.length > 0) { 1057 //compute the position of the single el (top and bottom and make a div) 1058 const el = window.document.getElementById(lineIds[0]); 1059 top = el.offsetTop; 1060 height = el.offsetHeight; 1061 parent = el.parentElement.parentElement; 1062 if (lineIds.length > 1) { 1063 const lastEl = window.document.getElementById(lineIds[lineIds.length - 1]); 1064 const bottom = lastEl.offsetTop + lastEl.offsetHeight; 1065 height = bottom - top; 1066 } 1067 if (top !== null && height !== null && parent !== null) { 1068 // cook up a div (if necessary) and position it 1069 let div = window.document.getElementById("code-annotation-line-highlight"); 1070 if (div === null) { 1071 div = window.document.createElement("div"); 1072 div.setAttribute("id", "code-annotation-line-highlight"); 1073 div.style.position = 'absolute'; 1074 parent.appendChild(div); 1075 } 1076 div.style.top = top - 2 + "px"; 1077 div.style.height = height + 4 + "px"; 1078 div.style.left = 0; 1079 let gutterDiv = window.document.getElementById("code-annotation-line-highlight-gutter"); 1080 if (gutterDiv === null) { 1081 gutterDiv = window.document.createElement("div"); 1082 gutterDiv.setAttribute("id", "code-annotation-line-highlight-gutter"); 1083 gutterDiv.style.position = 'absolute'; 1084 const codeCell = window.document.getElementById(targetCell); 1085 const gutter = codeCell.querySelector('.code-annotation-gutter'); 1086 gutter.appendChild(gutterDiv); 1087 } 1088 gutterDiv.style.top = top - 2 + "px"; 1089 gutterDiv.style.height = height + 4 + "px"; 1090 } 1091 selectedAnnoteEl = annoteEl; 1092 } 1093 }; 1094 const unselectCodeLines = () => { 1095 const elementsIds = ["code-annotation-line-highlight", "code-annotation-line-highlight-gutter"]; 1096 elementsIds.forEach((elId) => { 1097 const div = window.document.getElementById(elId); 1098 if (div) { 1099 div.remove(); 1100 } 1101 }); 1102 selectedAnnoteEl = undefined; 1103 }; 1104 // Handle positioning of the toggle 1105 window.addEventListener( 1106 "resize", 1107 throttle(() => { 1108 elRect = undefined; 1109 if (selectedAnnoteEl) { 1110 selectCodeLines(selectedAnnoteEl); 1111 } 1112 }, 10) 1113 ); 1114 function throttle(fn, ms) { 1115 let throttle = false;
1116 let timer; 1117 return (...args) => { 1118 if(!throttle) { // first call gets through 1119 fn.apply(this, args); 1120 throttle = true; 1121 } else { // all the others get throttled 1122 if(timer) clearTimeout(timer); // cancel #2 1123 timer = setTimeout(() => { 1124 fn.apply(this, args); 1125 timer = throttle = false; 1126 }, ms); 1127 } 1128 }; 1129 } 1130 // Attach click handler to the DT 1131 const annoteDls = window.document.querySelectorAll('dt[data-target-cell]'); 1132 for (const annoteDlNode of annoteDls) { 1133 annoteDlNode.addEventListener('click', (event) => { 1134 const clickedEl = event.target; 1135 if (clickedEl !== selectedAnnoteEl) { 1136 unselectCodeLines(); 1137 const activeEl = window.document.querySelector('dt[data-target-cell].code-annotation-active'); 1138 if (activeEl) { 1139 activeEl.classList.remove('code-annotation-active'); 1140 } 1141 selectCodeLines(clickedEl); 1142 clickedEl.classList.add('code-annotation-active'); 1143 } else { 1144 // Unselect the line 1145 unselectCodeLines(); 1146 clickedEl.classList.remove('code-annotation-active'); 1147 } 1148 }); 1149 } 1150 const findCites = (el) => { 1151 const parentEl = el.parentElement; 1152 if (parentEl) { 1153 const cites = parentEl.dataset.cites; 1154 if (cites) { 1155 return { 1156 el, 1157 cites: cites.split(' ') 1158 }; 1159 } else { 1160 return findCites(el.parentElement) 1161 } 1162 } else { 1163 return undefined; 1164 } 1165 }; 1166 var bibliorefs = window.document.querySelectorAll('a[role="doc-biblioref"]'); 1167 for (var i=0; i<bibliorefs.length; i++) { 1168 const ref = bibliorefs[i]; 1169 const citeInfo = findCites(ref); 1170 if (citeInfo) { 1171 tippyHover(citeInfo.el, function() { 1172 var popup = window.document.createElement('div'); 1173 citeInfo.cites.forEach(function(cite) { 1174 var citeDiv = window.document.createElement('div'); 1175 citeDiv.classList.add('hanging-indent'); 1176 citeDiv.classList.add('csl-entry'); 1177 var biblioDiv = window.document.getElementById('ref-' + cite); 1178 if (biblioDiv) { 1179 citeDiv.innerHTML = biblioDiv.innerHTML; 1180 } 1181 popup.appendChild(citeDiv); 1182 }); 1183 return popup.innerHTML; 1184 }); 1185 } 1186 } 1187}); 1188</script>
1188 1189</div> <!-- /content --> 1190<footer class="footer"> 1191 <div class="nav-footer"> 1192 <div class="nav-footer-left"> 1193<p style="font-size: 1.5em;"> 1194Vielen Dank an <a href="https://theurbanist.com.au/about">Mat Lipson</a>, <a href="https://steefancontractor.github.io/my_website/">Steefan Contractor</a> und <a href="https://jamesgoldie.dev">James Goldie</a> für die ursprüngliche Idee. 1195</p> 1196<p style="font-size: 1.5em;"> 1197Implementierung für Deutschland von <a href="https://blog.neugartf.com">Fabian Neugart</a> 1198</p> 1199</div> 1200 <div class="nav-footer-center"> 1201 1202 </div> 1203 <div class="nav-footer-right"> 1204<p> 1205Unsere Daten stammen vom Deutschen Wetterdienst und deren <a href="https://www.dwd.de/DE/leistungen/opendata/opendata.html">OpenData Programm</a>. 1206</p> 1207<p> 1208Unsere Grafiken sind für <a href="./licence">nicht-kommerzielle Zwecke frei zugänglich</a>. 1209</p> 1210<p><a href="https://creativecommons.org/licenses/by-nc/4.0/"><img src="https://mirrors.creativecommons.org/presskit/buttons/88x31/png/by-nc.png" alt="Creative Commons Attribution Non-Commercial 4.0 badge" style="width:80px"></a></p> 1211</div> 1212 </div> 1213</footer> 1214 1215 1216 1217 1218</body></html>
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.