chrisilo commited on
Commit
30257a1
·
verified ·
1 Parent(s): 1408d02

Labelling page and label store (part 2)

Browse files
static/chips/G247.jpg ADDED
static/chips/G248.jpg ADDED
static/chips/G249.jpg ADDED
static/chips/G250.jpg ADDED
static/index.html ADDED
@@ -0,0 +1,403 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
6
+ <title>Gola Reference Labelling</title>
7
+ <link rel="preconnect" href="https://fonts.googleapis.com">
8
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap">
9
+ <style>
10
+ html{color-scheme:light}body{margin:0}img{max-width:100%}[hidden]{display:none!important}
11
+ /* Layout: sticky progress bar; image sheet on the left, label form on the right; one column on phones */
12
+ :root{
13
+ --bg:#f3f5f2; --panel:#ffffff; --ink:#15231c; --ink-2:#4a5a52; --ink-3:#7b8a82; --rule:#d5ddd8; --band:#e6ece8;
14
+ --forest:#1f6b45; --forest-soft:#d9ecdf; --loss:#b5481e; --loss-soft:#f4ddd0; --unsure:#8a6d1c; --unsure-soft:#f3e9cc; --focus:#2c62a8;
15
+ --f-body:"IBM Plex Sans","Segoe UI",system-ui,sans-serif; --f-data:"IBM Plex Mono",ui-monospace,Menlo,monospace;
16
+ }
17
+ @media (prefers-color-scheme: dark){:root:not([data-theme="light"]){
18
+ --bg:#0f1613; --panel:#16201b; --ink:#e6eee9; --ink-2:#a9b8b0; --ink-3:#7d8c84; --rule:#2a3630; --band:#1e2a24;
19
+ --forest:#5cc28a; --forest-soft:#183024; --loss:#e8835a; --loss-soft:#3a2219; --unsure:#e0bd5c; --unsure-soft:#332a14; --focus:#7aa8e0; color-scheme:dark}}
20
+ :root[data-theme="dark"]{
21
+ --bg:#0f1613; --panel:#16201b; --ink:#e6eee9; --ink-2:#a9b8b0; --ink-3:#7d8c84; --rule:#2a3630; --band:#1e2a24;
22
+ --forest:#5cc28a; --forest-soft:#183024; --loss:#e8835a; --loss-soft:#3a2219; --unsure:#e0bd5c; --unsure-soft:#332a14; --focus:#7aa8e0; color-scheme:dark}
23
+ *{box-sizing:border-box}
24
+ body{background:var(--bg);color:var(--ink);font:400 15px/1.5 var(--f-body);padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px));padding-block:0 32px}
25
+ body::before{content:"";position:fixed;inset:0 0 auto;height:env(safe-area-inset-top,0px);z-index:10;background:var(--bg)}
26
+ button,select,input,textarea{font:inherit;color:inherit}
27
+ :focus-visible{outline:2px solid var(--focus);outline-offset:2px}
28
+ .top{position:sticky;top:env(safe-area-inset-top,0px);z-index:5;background:var(--bg);border-bottom:1px solid var(--rule);padding-block:12px;display:grid;gap:8px}
29
+ .top .row{display:flex;flex-wrap:wrap;gap:10px 18px;align-items:center;justify-content:space-between}
30
+ h1{font-size:17px;font-weight:600;margin:0;letter-spacing:.01em}
31
+ h1 span{color:var(--ink-3);font-weight:400}
32
+ .count{font:500 13px var(--f-data);font-variant-numeric:tabular-nums;color:var(--ink-2)}
33
+ .bar{height:6px;background:var(--band);border-radius:3px;overflow:hidden}
34
+ .bar i{display:block;height:100%;background:var(--forest);width:0;transition:width .3s}
35
+ .nav{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
36
+ .btn{border:1px solid var(--rule);background:var(--panel);padding:7px 12px;border-radius:4px;cursor:pointer;font-size:14px}
37
+ .btn:hover{border-color:var(--ink-3)}
38
+ .btn.primary{background:var(--forest);border-color:var(--forest);color:var(--bg);font-weight:600}
39
+ .btn[disabled]{opacity:.45;cursor:not-allowed}
40
+ select.btn{padding-right:28px}
41
+ main{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);gap:24px;margin-top:18px;align-items:start}
42
+ @media (max-width:960px){main{grid-template-columns:minmax(0,1fr)}}
43
+ .sheet{background:var(--panel);border:1px solid var(--rule);padding:12px;display:grid;gap:10px;min-width:0}
44
+ .sheet .head{display:flex;flex-wrap:wrap;gap:6px 16px;align-items:baseline;justify-content:space-between}
45
+ .pid{font:600 22px var(--f-data)}
46
+ .coords{font:400 13px var(--f-data);color:var(--ink-2)}
47
+ .imgwrap{position:relative;background:var(--band);aspect-ratio:968/644;max-width:100%}
48
+ .imgwrap img{display:block;width:100%;height:auto}
49
+ .imgwrap .miss{position:absolute;inset:0;display:grid;place-items:center;color:var(--ink-3);font-size:14px}
50
+ .imgwrap .miss[hidden]{display:none}
51
+ .imgwrap a{display:block}
52
+ .dates{display:grid;grid-template-columns:auto 1fr;gap:2px 12px;font-size:13px;color:var(--ink-2)}
53
+ .dates b{font-weight:500;color:var(--ink)}
54
+ .flag{color:var(--unsure)}
55
+ .links{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:13px}
56
+ .links a{color:var(--focus)}
57
+ form{background:var(--panel);border:1px solid var(--rule);padding:16px;display:grid;gap:16px;min-width:0}
58
+ fieldset{border:0;margin:0;padding:0;display:grid;gap:6px}
59
+ legend{font-weight:600;font-size:14px;padding:0;margin-bottom:6px}
60
+ legend kbd{font:400 11px var(--f-data);color:var(--ink-3);border:1px solid var(--rule);border-radius:3px;padding:0 4px;margin-left:6px}
61
+ .seg{display:flex;flex-wrap:wrap;gap:6px}
62
+ .seg label{position:relative}
63
+ .seg input{position:absolute;opacity:0;inset:0;margin:0;cursor:pointer}
64
+ .seg span{display:inline-block;border:1px solid var(--rule);border-radius:4px;padding:6px 12px;font-size:14px;background:var(--panel);cursor:pointer;user-select:none}
65
+ .seg input:focus-visible+span{outline:2px solid var(--focus);outline-offset:2px}
66
+ .seg input:checked+span{border-color:var(--ink);background:var(--band);font-weight:600}
67
+ .seg input[value="yes"]:checked+span{background:var(--forest-soft);border-color:var(--forest);color:var(--forest)}
68
+ .seg input[value="no"]:checked+span{background:var(--loss-soft);border-color:var(--loss);color:var(--loss)}
69
+ .seg input[value="unsure"]:checked+span{background:var(--unsure-soft);border-color:var(--unsure);color:var(--unsure)}
70
+ .two{display:grid;grid-template-columns:1fr 1fr;gap:10px}
71
+ @media (max-width:420px){.two{grid-template-columns:1fr}}
72
+ .field{display:grid;gap:4px;font-size:13px;color:var(--ink-2);min-width:0}
73
+ .field input,.field select,.field textarea{border:1px solid var(--rule);border-radius:4px;background:var(--bg);padding:6px 8px;color:var(--ink);width:100%}
74
+ textarea{resize:vertical;min-height:52px}
75
+ .actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
76
+ .status{font-size:13px;color:var(--ink-2);min-height:1.5em}
77
+ .status.err{color:var(--loss)}
78
+ .saved{font:500 12px var(--f-data);color:var(--forest)}
79
+ .signin{background:var(--panel);border:1px solid var(--rule);padding:20px;max-width:420px;margin:24px auto 0;display:grid;gap:12px}
80
+ .signin h2{margin:0;font-size:18px}
81
+ .signin p{margin:0;color:var(--ink-2);font-size:14px}
82
+ .who{font:500 13px var(--f-data);color:var(--ink-2)}
83
+ details.guide{background:var(--panel);border:1px solid var(--rule);padding:12px 18px;margin-top:16px}
84
+ details.guide summary{cursor:pointer;font-weight:600;font-size:16px}
85
+ .gbody{max-width:82ch;color:var(--ink);display:grid;gap:4px}
86
+ .gbody h3{font-size:15px;margin:14px 0 2px}
87
+ .gbody p{margin:4px 0;color:var(--ink-2)}
88
+ .gbody ul{margin:4px 0;padding-left:20px;display:grid;gap:4px;color:var(--ink-2)}
89
+ .gt{border-collapse:collapse;font-size:14px;margin:6px 0;width:100%}
90
+ .gt th,.gt td{border:1px solid var(--rule);padding:6px 8px;text-align:left;vertical-align:top;color:var(--ink-2)}
91
+ .gt th{background:var(--band);color:var(--ink);font-weight:600}
92
+ .gbody .wrap{overflow-x:auto}
93
+ .notice{background:var(--unsure-soft);color:var(--ink);border:1px solid var(--unsure);padding:10px 14px;border-radius:4px;font-size:14px;margin-top:14px}
94
+ @media (prefers-reduced-motion:reduce){.bar i{transition:none}}
95
+ </style>
96
+ </head>
97
+ <body>
98
+
99
+ <header class="top">
100
+ <div class="row">
101
+ <h1>Gola reference labelling <span>2017 vs 2023</span></h1>
102
+ <span class="count" id="count">Loading points</span>
103
+ </div>
104
+ <div class="bar" aria-hidden="true"><i id="bar"></i></div>
105
+ <div class="row">
106
+ <div class="nav">
107
+ <button type="button" class="btn" id="prev" aria-label="Previous point">&larr; Prev</button>
108
+ <button type="button" class="btn" id="next" aria-label="Next point">Next &rarr;</button>
109
+ <button type="button" class="btn" id="todo">Next unlabelled</button>
110
+ <button type="button" class="btn" id="howto">How to label</button>
111
+ <select class="btn" id="jump" aria-label="Go to point"></select>
112
+ </div>
113
+ <div class="nav">
114
+ <span class="who" id="whotag"></span><button type="button" class="btn" id="switch">Change name</button><button type="button" class="btn" id="export">Download my labels (CSV)</button>
115
+ </div>
116
+ </div>
117
+ </header>
118
+ <div class="notice" id="notice" hidden></div>
119
+ <details class="guide" id="guide">
120
+ <summary>How to label (read this first)</summary>
121
+ <div class="gbody">
122
+ <h3>What this is for</h3>
123
+ <p>We are checking how accurate satellite maps of forest loss are in the Gola forest area (Sierra Leone and Liberia). Your job is to look at each point on detailed images and record what was really on the ground in 2017 and in 2023. Your answers are the "truth" the maps are compared against, so careful, honest answers matter more than speed. There are 250 points. Each takes about 2 to 4 minutes, and you can stop and come back any time.</p>
124
+
125
+ <h3>What you see for each point</h3>
126
+ <ul>
127
+ <li><b>Top row = about 2017, bottom row = about 2023.</b> The exact date of each image is printed on it and under the images.</li>
128
+ <li><b>Left:</b> a close-up. The <b>yellow square</b> is the area you are judging (30 x 30 m, about the size of a small house plot).</li>
129
+ <li><b>Middle:</b> a wider view of the same place, to see the surroundings.</li>
130
+ <li><b>Right:</b> a satellite view that is less detailed and sometimes hazy. Use it only as a rough check.</li>
131
+ <li>Click the images to open them full size.</li>
132
+ </ul>
133
+
134
+ <h3>Step 1. Was the square forest in 2017? In 2023?</h3>
135
+ <p>Answer <b>Yes</b> if tall trees cover <b>at least about a third</b> of the yellow square. Tall means real trees (taller than about 5 m), with large rounded crowns that cast shadows.</p>
136
+ <p>Answer <b>No</b> if the square is mostly bare soil, crops, grass, low bush, roads, houses or water.</p>
137
+ <p>Answer <b>Unsure</b> if clouds, haze or a missing image mean you really cannot tell. Unsure is a valid answer. Please do not guess.</p>
138
+ <div class="wrap"><table class="gt">
139
+ <tr><th>Looks like</th><th>Forest?</th></tr>
140
+ <tr><td>Dense, bumpy dark-green canopy with many round crowns</td><td>Yes</td></tr>
141
+ <tr><td>Trees in neat rows, star-shaped crowns all the same size (oil palm), or regular rows of cocoa or rubber</td><td>Yes, but choose "Plantation or agroforest" in Step 2</td></tr>
142
+ <tr><td>A few scattered trees on mostly open ground</td><td>No</td></tr>
143
+ <tr><td>Smooth light green (grass, crops, young bush), brown or orange soil</td><td>No</td></tr>
144
+ </table></div>
145
+
146
+ <h3>Step 2. What happened?</h3>
147
+ <p>This fills itself in from your two answers. Only change it in the cases marked below.</p>
148
+ <div class="wrap"><table class="gt">
149
+ <tr><th>2017</th><th>2023</th><th>What happened</th></tr>
150
+ <tr><td>Forest</td><td>Forest</td><td>No change (filled in for you). Change it to <b>Degradation</b> if the canopy is clearly thinner, with new gaps or logging tracks, but still forest</td></tr>
151
+ <tr><td>Forest</td><td>Not forest</td><td>Clearing (filled in for you)</td></tr>
152
+ <tr><td>Not forest</td><td>Forest</td><td>Regrowth (filled in for you)</td></tr>
153
+ <tr><td>Not forest</td><td>Not forest</td><td>No change (filled in for you)</td></tr>
154
+ <tr><td colspan="2">Plantation in either year</td><td>Change it to <b>Plantation or agroforest</b></td></tr>
155
+ <tr><td colspan="2">Anything else (burn scar, mine, flooding)</td><td>Choose <b>Other</b> and write a short note</td></tr>
156
+ </table></div>
157
+
158
+ <h3>Step 3. How sure are you?</h3>
159
+ <ul>
160
+ <li><b>High:</b> clear images close to both years, and the answer is obvious.</li>
161
+ <li><b>Medium:</b> one image is more than a year away from 2017 or 2023 (shown in orange), or the square is a mix of trees and open ground.</li>
162
+ <li><b>Low:</b> hazy or cloudy images, or you had to judge mostly from the wider view.</li>
163
+ </ul>
164
+
165
+ <h3>Step 4. If an image is missing or too far from the year</h3>
166
+ <p>Some points have no detailed image for one of the years (the panel is grey). Use the links under the images:</p>
167
+ <ul>
168
+ <li><b>Google Earth:</b> click the clock icon (historical imagery) and move the slider to an image from 2016 to 2018, or from 2022 to 2024.</li>
169
+ <li><b>Google Maps satellite</b> or <b>Copernicus Browser</b> as a back-up.</li>
170
+ </ul>
171
+ <p>Then set "Imagery used" to what you used, so we know where each answer came from. If nothing helps, answer Unsure for that year.</p>
172
+
173
+ <h3>Step 5. Save</h3>
174
+ <p>Press <b>Save and next</b> (or the Enter key). Your answer is stored straight away and the next unlabelled point opens. You can go back to any point with Prev, Next or the list, change it and save again.</p>
175
+
176
+ <h3>Tips</h3>
177
+ <ul>
178
+ <li>Judge only what is <b>inside</b> the yellow square. Forest just outside it does not count.</li>
179
+ <li>Images from different dates can be shifted by a few metres. Compare the same landmarks (roads, clearings, rivers).</li>
180
+ <li>Shadows and dark crowns mean tall trees. Smooth, even texture usually means low vegetation.</li>
181
+ <li>Keyboard shortcuts: 1, 2, 3 for 2017 (Yes, No, Unsure); Q, W, E for 2023; H, M, L for confidence; Enter to save; arrow keys to move without saving.</li>
182
+ <li>Do not look up what the maps say about a point. Your answers must come from the images only.</li>
183
+ </ul>
184
+ </div>
185
+ </details>
186
+ <form class="signin" id="signin" hidden>
187
+ <h2>Start labelling</h2>
188
+ <p>Enter your name so your labels are kept together. You can stop at any time and continue later with the same name.</p>
189
+ <label class="field">Your name<input type="text" id="who" required maxlength="40" autocomplete="name"></label>
190
+ <label class="field" id="codewrap">Access code<input type="text" id="code" maxlength="40" autocomplete="off"></label>
191
+ <button type="submit" class="btn primary">Start</button>
192
+ <div class="status" id="signstatus" role="status"></div>
193
+ </form>
194
+
195
+ <main id="work" hidden>
196
+ <section class="sheet" aria-label="Imagery">
197
+ <div class="head"><span class="pid" id="pid">-</span><span class="coords" id="coords"></span></div>
198
+ <div class="imgwrap"><a id="chiplink" target="_blank" rel="noopener" title="Open full size"><img id="chip" alt="High-resolution and Sentinel-2 imagery for 2017 and 2023 around the point"></a><div class="miss" id="miss" hidden>Image not available for this point</div></div>
199
+ <div class="dates" id="dates"></div>
200
+ <div class="links" id="links"></div>
201
+ </section>
202
+
203
+ <form id="form" autocomplete="off">
204
+ <fieldset id="fs17"><legend>Forest in 2017 <kbd>1 2 3</kbd></legend>
205
+ <div class="seg">
206
+ <label><input type="radio" name="forest_2017" value="yes" id="f17y"><span>Yes</span></label>
207
+ <label><input type="radio" name="forest_2017" value="no" id="f17n"><span>No</span></label>
208
+ <label><input type="radio" name="forest_2017" value="unsure" id="f17u"><span>Unsure</span></label>
209
+ </div></fieldset>
210
+ <fieldset id="fs23"><legend>Forest in 2023 <kbd>Q W E</kbd></legend>
211
+ <div class="seg">
212
+ <label><input type="radio" name="forest_2023" value="yes" id="f23y"><span>Yes</span></label>
213
+ <label><input type="radio" name="forest_2023" value="no" id="f23n"><span>No</span></label>
214
+ <label><input type="radio" name="forest_2023" value="unsure" id="f23u"><span>Unsure</span></label>
215
+ </div></fieldset>
216
+ <fieldset><legend>What happened</legend>
217
+ <div class="seg">
218
+ <label><input type="radio" name="change_type" value="none" id="ctn"><span>No change</span></label>
219
+ <label><input type="radio" name="change_type" value="clearing" id="ctc"><span>Clearing</span></label>
220
+ <label><input type="radio" name="change_type" value="degradation" id="ctd"><span>Degradation</span></label>
221
+ <label><input type="radio" name="change_type" value="regrowth" id="ctr"><span>Regrowth</span></label>
222
+ <label><input type="radio" name="change_type" value="plantation" id="ctp"><span>Plantation or agroforest</span></label>
223
+ <label><input type="radio" name="change_type" value="other" id="cto"><span>Other</span></label>
224
+ </div></fieldset>
225
+ <fieldset><legend>Confidence <kbd>H M L</kbd></legend>
226
+ <div class="seg">
227
+ <label><input type="radio" name="confidence" value="high" id="cfh"><span>High</span></label>
228
+ <label><input type="radio" name="confidence" value="medium" id="cfm"><span>Medium</span></label>
229
+ <label><input type="radio" name="confidence" value="low" id="cfl"><span>Low</span></label>
230
+ </div></fieldset>
231
+ <div class="two">
232
+ <label class="field">Imagery used for 2017
233
+ <select id="src17" name="source_2017"><option value="esri">Esri imagery on this page</option><option value="nicfi">Planet NICFI</option><option value="google_earth">Google Earth history</option><option value="sentinel2">Sentinel-2</option></select></label>
234
+ <label class="field">Imagery used for 2023
235
+ <select id="src23" name="source_2023"><option value="esri">Esri imagery on this page</option><option value="nicfi">Planet NICFI</option><option value="google_earth">Google Earth history</option><option value="sentinel2">Sentinel-2</option></select></label>
236
+ </div>
237
+ <label class="field">Note (optional)<textarea id="note" name="note" maxlength="500"></textarea></label>
238
+ <div class="actions">
239
+ <button type="submit" class="btn primary" id="save">Save and next <span style="font-weight:400;opacity:.8">(Enter)</span></button>
240
+ <span class="saved" id="savedtag"></span>
241
+ </div>
242
+ <div class="status" id="status" role="status"></div>
243
+ </form>
244
+ </main>
245
+
246
+
247
+ <script>
248
+ (() => {
249
+ const $ = id => document.getElementById(id);
250
+ let P = [], L = {}, i = 0, saving = false, who = "", code = "";
251
+ const ls = { get(k){ try { return localStorage.getItem(k); } catch(e) { return null; } }, set(k,v){ try { localStorage.setItem(k,v); } catch(e) {} } };
252
+
253
+ /* ---------- data ---------- */
254
+ async function loadPoints(){
255
+ const r = await fetch("points.json");
256
+ P = await r.json();
257
+ $("jump").innerHTML = P.map((p,k)=>`<option value="${k}">${p.id}</option>`).join("");
258
+ let start = 0;
259
+ try { const s = localStorage.getItem("gola-label-pos"); if (s !== null && +s < P.length) start = +s; } catch(e) {}
260
+ i = start;
261
+ }
262
+
263
+ async function api(path, opts){
264
+ const r = await fetch(path, opts);
265
+ if (!r.ok) { let m = "Request failed"; try { m = (await r.json()).detail || m; } catch(e) {} throw new Error(m); }
266
+ return r.json();
267
+ }
268
+
269
+ async function signIn(name, c){
270
+ L = await api(`api/labels?labeller=${encodeURIComponent(name)}&code=${encodeURIComponent(c)}`);
271
+ who = name; code = c; ls.set("gola-who", name); ls.set("gola-code", c);
272
+ $("whotag").textContent = `Labelling as ${name}`;
273
+ $("signin").hidden = true; $("work").hidden = false;
274
+ progress(); show(i); goFirstUnlabelled();
275
+ }
276
+
277
+ function goFirstUnlabelled(){ const j = P.findIndex(p => !L[p.id]); if (j >= 0) show(j); }
278
+
279
+ $("signin").addEventListener("submit", async e => {
280
+ e.preventDefault();
281
+ const name = $("who").value.trim(), c = $("code").value.trim();
282
+ if (!name) return;
283
+ $("signstatus").textContent = "Loading...";
284
+ try { await signIn(name, c); $("signstatus").textContent = ""; }
285
+ catch (err) { $("signstatus").textContent = err.message; }
286
+ });
287
+ $("switch").onclick = () => { $("work").hidden = true; $("signin").hidden = false; $("who").value = who; };
288
+
289
+
290
+
291
+ /* ---------- view ---------- */
292
+ function show(k){
293
+ i = Math.max(0, Math.min(P.length - 1, k));
294
+ const p = P[i];
295
+ ls.set("gola-label-pos", i);
296
+ $("jump").value = i; $("pid").textContent = p.id;
297
+ $("coords").textContent = `${p.lat.toFixed(5)}, ${p.lon.toFixed(5)}`;
298
+ const img = $("chip"); $("miss").hidden = true;
299
+ img.onerror = () => { $("miss").hidden = false; }; img.src = `chips/${p.id}.jpg`; $("chiplink").href = img.src;
300
+ const far = (d, y) => d && Math.abs(new Date(d) - new Date(`${y}-07-01`)) > 400 * 864e5;
301
+ const row = (y, d, s, r) => d ? `<span>${y} high-res</span><b class="${far(d, y) ? "flag" : ""}">${d} &middot; ${s} &middot; ${r} m${far(d, y) ? " (more than a year from " + y + ")" : ""}</b>`
302
+ : `<span>${y} high-res</span><b class="flag">none in Esri archive, use NICFI or Google Earth</b>`;
303
+ $("dates").innerHTML = row(2017, p.d17, p.s17, p.r17) + row(2023, p.d23, p.s23, p.r23) + `<span>Sentinel-2</span><b>EOX cloudless 2018 and 2023 (context)</b>`;
304
+ const ge = `https://earth.google.com/web/@${p.lat},${p.lon},150a,400d,35y,0h,0t,0r`;
305
+ const gm = `https://www.google.com/maps/@${p.lat},${p.lon},250m/data=!3m1!1e3`;
306
+ const cb = `https://browser.dataspace.copernicus.eu/?zoom=16&lat=${p.lat}&lng=${p.lon}`;
307
+ $("links").innerHTML = `<a href="${ge}" target="_blank" rel="noopener">Google Earth</a><a href="${gm}" target="_blank" rel="noopener">Google Maps satellite</a><a href="${cb}" target="_blank" rel="noopener">Copernicus Browser</a><a href="https://www.planet.com/nicfi/" target="_blank" rel="noopener">Planet NICFI</a>`;
308
+ fillForm(); markSaved(); status("");
309
+ }
310
+
311
+ function fillForm(){
312
+ const p = P[i]; if (!p) return;
313
+ const v = L[p.id] || {};
314
+ for (const name of ["forest_2017","forest_2023","change_type","confidence"])
315
+ document.querySelectorAll(`input[name="${name}"]`).forEach(el => { el.checked = el.value === v[name]; });
316
+ $("src17").value = v.source_2017 || "esri"; $("src23").value = v.source_2023 || "esri"; $("note").value = v.note || "";
317
+ }
318
+
319
+ function markSaved(){ const p = P[i]; $("savedtag").textContent = p && L[p.id] ? "Saved" : ""; }
320
+
321
+ function progress(){
322
+ const n = Object.keys(L).filter(k => P.some(p => p.id === k)).length;
323
+ $("count").textContent = `${n} of ${P.length} labelled`;
324
+ $("bar").style.width = (P.length ? 100 * n / P.length : 0) + "%";
325
+ [...$("jump").options].forEach((o,k) => { o.textContent = P[k].id + (L[P[k].id] ? " ✓" : ""); });
326
+ }
327
+
328
+ function status(msg, err){ const s = $("status"); s.textContent = msg; s.className = "status" + (err ? " err" : ""); }
329
+
330
+ /* ---------- save ---------- */
331
+ function readForm(){
332
+ const val = n => (document.querySelector(`input[name="${n}"]:checked`) || {}).value;
333
+ return { forest_2017: val("forest_2017"), forest_2023: val("forest_2023"), change_type: val("change_type"),
334
+ confidence: val("confidence"), source_2017: $("src17").value, source_2023: $("src23").value, note: $("note").value.trim() };
335
+ }
336
+
337
+ async function save(e){
338
+ e.preventDefault();
339
+ if (!who || saving) return;
340
+ const f = readForm(), missing = ["forest_2017","forest_2023","change_type","confidence"].filter(k => !f[k]);
341
+ if (missing.length) return status("Choose " + missing.map(k => k.replace("_"," ").replace("change type","what happened")).join(", ") + " before saving.", true);
342
+ const p = P[i]; saving = true; $("save").disabled = true;
343
+ try {
344
+ L[p.id] = await api("api/labels", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ ...f, point_id: p.id, labeller: who, code }) });
345
+ progress();
346
+ status(`${p.id} saved.`); goNextUnlabelled(i);
347
+ } catch (err) {
348
+ status(`Not saved: ${err.message}. Try again.`, true);
349
+ } finally { saving = false; $("save").disabled = false; }
350
+ }
351
+
352
+ function goNextUnlabelled(from){
353
+ for (let k = 1; k <= P.length; k++) { const j = (from + k) % P.length; if (!L[P[j].id] && j !== from) return show(j); }
354
+ show(Math.min(from + 1, P.length - 1));
355
+ }
356
+
357
+ function exportCsv(){
358
+ const cols = ["point_id","forest_2017","forest_2023","change_type","confidence","source_2017","source_2023","note","labelled_at"];
359
+ const esc = v => { v = v == null ? "" : String(v); return /[",\n]/.test(v) ? `"${v.replace(/"/g,'""')}"` : v; };
360
+ const rows = P.filter(p => L[p.id]).map(p => cols.map(c => esc(L[p.id][c])).join(","));
361
+ const url = URL.createObjectURL(new Blob([[cols.join(","), ...rows].join("\n")], { type: "text/csv" }));
362
+ const a = document.createElement("a"); a.href = url; a.download = "gola_labels.csv"; a.click(); URL.revokeObjectURL(url);
363
+ }
364
+ $("export").onclick = exportCsv;
365
+
366
+ // open the guide on a first visit
367
+ try { if (!localStorage.getItem("gola-guide-seen")) { $("guide").open = true; localStorage.setItem("gola-guide-seen", "1"); } } catch(e) {}
368
+ $("howto").onclick = () => { const g = $("guide"); g.open = true; g.scrollIntoView({behavior: "smooth", block: "start"}); };
369
+ /* ---------- events ---------- */
370
+ $("form").addEventListener("submit", save);
371
+ // fill "What happened" from the two forest answers; degradation, plantation and other are left as chosen
372
+ function autoChange(){
373
+ const val = n => (document.querySelector(`input[name="${n}"]:checked`) || {}).value;
374
+ const a = val("forest_2017"), b = val("forest_2023"), cur = val("change_type");
375
+ if (["degradation","plantation","other"].includes(cur)) return;
376
+ const pick = a === "yes" && b === "no" ? "ctc" : a === "no" && b === "yes" ? "ctr" : a && b && a === b && a !== "unsure" ? "ctn" : null;
377
+ if (pick) $(pick).checked = true;
378
+ }
379
+ document.querySelectorAll('input[name="forest_2017"],input[name="forest_2023"]').forEach(el => el.addEventListener("change", autoChange));
380
+ $("prev").onclick = () => show(i - 1);
381
+ $("next").onclick = () => show(i + 1);
382
+ $("todo").onclick = () => goNextUnlabelled(i);
383
+ $("jump").onchange = e => show(+e.target.value);
384
+ const keys = { "1":"f17y","2":"f17n","3":"f17u","q":"f23y","w":"f23n","e":"f23u","h":"cfh","m":"cfm","l":"cfl" };
385
+ document.addEventListener("keydown", e => {
386
+ if ($("work").hidden || e.target.matches("textarea, select, input[type=text]") || e.metaKey || e.ctrlKey || e.altKey) return;
387
+ const k = e.key.toLowerCase();
388
+ if (keys[k]) { $(keys[k]).checked = true; autoChange(); e.preventDefault(); }
389
+ else if (e.key === "ArrowRight") show(i + 1);
390
+ else if (e.key === "ArrowLeft") show(i - 1);
391
+ else if (e.key === "Enter" && !e.target.matches("button")) { e.preventDefault(); $("form").requestSubmit(); }
392
+ });
393
+
394
+ loadPoints().then(async () => {
395
+ const n = ls.get("gola-who"), c = ls.get("gola-code") || "";
396
+ if (n) { try { return await signIn(n, c); } catch(e) {} }
397
+ $("signin").hidden = false; if (n) $("who").value = n;
398
+ }).catch(() => status("Could not load the points list.", true));
399
+ })();
400
+ </script>
401
+
402
+ </body>
403
+ </html>
static/points.json ADDED
@@ -0,0 +1 @@
 
 
1
+ [{"id":"G001","lon":-10.914703,"lat":7.604976,"d17":null,"s17":null,"r17":null,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G002","lon":-11.16973,"lat":7.399574,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G003","lon":-11.143471,"lat":7.585194,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2025-05-21","s23":"LG01","r23":0.34},{"id":"G004","lon":-11.142182,"lat":7.599302,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2025-05-21","s23":"LG01","r23":0.34},{"id":"G005","lon":-11.340112,"lat":7.255,"d17":"2017-02-18","s17":"WV03","r17":0.31,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G006","lon":-11.340436,"lat":7.369154,"d17":"2016-01-24","s17":"GE01","r17":0.46,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G007","lon":-11.391364,"lat":7.34421,"d17":null,"s17":null,"r17":null,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G008","lon":-11.129234,"lat":7.508246,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G009","lon":-11.251111,"lat":7.588718,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G010","lon":-11.39811,"lat":7.68283,"d17":null,"s17":null,"r17":null,"d23":"2023-10-19","s23":"GE01","r23":0.46},{"id":"G011","lon":-10.93535,"lat":7.480122,"d17":null,"s17":null,"r17":null,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G012","lon":-11.09565,"lat":7.531459,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2025-05-21","s23":"LG01","r23":0.34},{"id":"G013","lon":-11.119072,"lat":7.257441,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G014","lon":-11.088757,"lat":7.567561,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2025-04-04","s23":"LG03","r23":0.34},{"id":"G015","lon":-10.848581,"lat":7.396412,"d17":null,"s17":null,"r17":null,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G016","lon":-11.399994,"lat":7.532879,"d17":null,"s17":null,"r17":null,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G017","lon":-11.062168,"lat":7.74668,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2022-02-03","s23":"GE01","r23":0.46},{"id":"G018","lon":-11.364508,"lat":7.298528,"d17":null,"s17":null,"r17":null,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G019","lon":-11.028638,"lat":7.379085,"d17":"2015-12-30","s17":"GE01","r17":0.46,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G020","lon":-10.835598,"lat":7.211209,"d17":null,"s17":null,"r17":null,"d23":null,"s23":null,"r23":null},{"id":"G021","lon":-11.343033,"lat":7.294573,"d17":"2017-02-18","s17":"WV03","r17":0.31,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G022","lon":-10.817791,"lat":7.700869,"d17":null,"s17":null,"r17":null,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G023","lon":-11.043002,"lat":7.430548,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G024","lon":-11.179212,"lat":7.449425,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G025","lon":-11.047021,"lat":7.476906,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G026","lon":-11.264136,"lat":7.266503,"d17":"2018-01-06","s17":"WV02","r17":0.5,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G027","lon":-10.800025,"lat":7.743529,"d17":"2016-02-26","s17":"WV02","r17":0.5,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G028","lon":-11.172119,"lat":7.498545,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G029","lon":-10.961767,"lat":7.731966,"d17":"2019-03-04","s17":"WV02","r17":0.5,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G030","lon":-11.24671,"lat":7.630772,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G031","lon":-10.812125,"lat":7.774941,"d17":"2016-02-26","s17":"WV02","r17":0.5,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G032","lon":-11.038363,"lat":7.658382,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G033","lon":-11.157362,"lat":7.425939,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G034","lon":-10.86248,"lat":7.209472,"d17":null,"s17":null,"r17":null,"d23":null,"s23":null,"r23":null},{"id":"G035","lon":-10.852816,"lat":7.626401,"d17":null,"s17":null,"r17":null,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G036","lon":-11.368601,"lat":7.555827,"d17":"2016-01-24","s17":"GE01","r17":0.46,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G037","lon":-11.204654,"lat":7.430046,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G038","lon":-10.987454,"lat":7.701201,"d17":"2019-03-04","s17":"WV02","r17":0.5,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G039","lon":-10.817093,"lat":7.337139,"d17":null,"s17":null,"r17":null,"d23":null,"s23":null,"r23":null},{"id":"G040","lon":-11.142821,"lat":7.452586,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G041","lon":-11.134834,"lat":7.430387,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G042","lon":-11.097712,"lat":7.336188,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G043","lon":-10.840359,"lat":7.763699,"d17":"2016-02-26","s17":"WV02","r17":0.5,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G044","lon":-10.916623,"lat":7.360051,"d17":null,"s17":null,"r17":null,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G045","lon":-11.004197,"lat":7.676985,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G046","lon":-11.401733,"lat":7.650274,"d17":null,"s17":null,"r17":null,"d23":"2023-10-19","s23":"GE01","r23":0.46},{"id":"G047","lon":-10.910427,"lat":7.743319,"d17":"2016-02-26","s17":"WV02","r17":0.5,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G048","lon":-11.355587,"lat":7.202045,"d17":"2017-02-18","s17":"WV03","r17":0.31,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G049","lon":-10.839192,"lat":7.555124,"d17":null,"s17":null,"r17":null,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G050","lon":-11.042459,"lat":7.54744,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2025-04-04","s23":"LG03","r23":0.34},{"id":"G051","lon":-10.86143,"lat":7.284609,"d17":null,"s17":null,"r17":null,"d23":null,"s23":null,"r23":null},{"id":"G052","lon":-10.964339,"lat":7.399171,"d17":"2019-03-04","s17":"WV02","r17":0.5,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G053","lon":-11.031967,"lat":7.274383,"d17":"2015-12-30","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G054","lon":-11.328764,"lat":7.775404,"d17":"2018-01-15","s17":"WV03","r17":0.31,"d23":"2021-12-22","s23":"WV03","r23":0.31},{"id":"G055","lon":-11.228301,"lat":7.748826,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2022-02-03","s23":"GE01","r23":0.46},{"id":"G056","lon":-11.115123,"lat":7.399023,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G057","lon":-11.205606,"lat":7.671388,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2025-03-09","s23":"LG02","r23":0.34},{"id":"G058","lon":-10.841307,"lat":7.541011,"d17":null,"s17":null,"r17":null,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G059","lon":-11.22209,"lat":7.599985,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2025-03-09","s23":"LG02","r23":0.34},{"id":"G060","lon":-11.195107,"lat":7.422229,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G061","lon":-11.321388,"lat":7.414537,"d17":"2018-01-15","s17":"WV03","r17":0.31,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G062","lon":-11.046328,"lat":7.326661,"d17":"2015-12-30","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G063","lon":-10.847614,"lat":7.743596,"d17":"2016-02-26","s17":"WV02","r17":0.5,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G064","lon":-10.947054,"lat":7.665856,"d17":"2019-03-04","s17":"WV02","r17":0.5,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G065","lon":-11.295608,"lat":7.72759,"d17":"2018-01-06","s17":"WV02","r17":0.5,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G066","lon":-11.120137,"lat":7.481442,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G067","lon":-10.971489,"lat":7.233154,"d17":"2019-03-04","s17":"WV02","r17":0.5,"d23":null,"s23":null,"r23":null},{"id":"G068","lon":-11.141472,"lat":7.510356,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G069","lon":-11.398824,"lat":7.761186,"d17":"2016-04-01","s17":"GE01","r17":0.46,"d23":"2021-12-22","s23":"WV03","r23":0.31},{"id":"G070","lon":-11.161066,"lat":7.786054,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2022-02-03","s23":"GE01","r23":0.46},{"id":"G071","lon":-11.377976,"lat":7.430777,"d17":null,"s17":null,"r17":null,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G072","lon":-11.133217,"lat":7.319749,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G073","lon":-10.985444,"lat":7.678157,"d17":"2019-03-04","s17":"WV02","r17":0.5,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G074","lon":-10.867756,"lat":7.623625,"d17":null,"s17":null,"r17":null,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G075","lon":-11.015662,"lat":7.512036,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G076","lon":-11.241368,"lat":7.329799,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G077","lon":-11.107438,"lat":7.266987,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G078","lon":-11.340785,"lat":7.279942,"d17":"2017-02-18","s17":"WV03","r17":0.31,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G079","lon":-11.243485,"lat":7.532896,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":null,"s23":null,"r23":null},{"id":"G080","lon":-10.907736,"lat":7.250513,"d17":null,"s17":null,"r17":null,"d23":null,"s23":null,"r23":null},{"id":"G081","lon":-11.213516,"lat":7.51732,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G082","lon":-11.126172,"lat":7.265815,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G083","lon":-11.111552,"lat":7.447855,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G084","lon":-11.062422,"lat":7.573382,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2025-04-04","s23":"LG03","r23":0.34},{"id":"G085","lon":-10.855483,"lat":7.801606,"d17":"2016-02-26","s17":"WV02","r17":0.5,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G086","lon":-11.294204,"lat":7.566528,"d17":"2018-01-06","s17":"WV02","r17":0.5,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G087","lon":-11.324302,"lat":7.24315,"d17":"2017-02-18","s17":"WV03","r17":0.31,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G088","lon":-11.171417,"lat":7.6298,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2025-05-21","s23":"LG01","r23":0.34},{"id":"G089","lon":-11.043972,"lat":7.405322,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G090","lon":-11.280231,"lat":7.799801,"d17":"2018-01-15","s17":"WV03","r17":0.31,"d23":"2022-02-03","s23":"GE01","r23":0.46},{"id":"G091","lon":-10.999521,"lat":7.307615,"d17":"2015-12-30","s17":"GE01","r17":0.46,"d23":null,"s23":null,"r23":null},{"id":"G092","lon":-11.239482,"lat":7.65196,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2025-03-09","s23":"LG02","r23":0.34},{"id":"G093","lon":-11.26857,"lat":7.391489,"d17":"2018-01-06","s17":"WV02","r17":0.5,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G094","lon":-10.817391,"lat":7.20884,"d17":null,"s17":null,"r17":null,"d23":null,"s23":null,"r23":null},{"id":"G095","lon":-11.245645,"lat":7.477295,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G096","lon":-11.152494,"lat":7.31803,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G097","lon":-10.952463,"lat":7.599655,"d17":"2019-03-04","s17":"WV02","r17":0.5,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G098","lon":-11.153179,"lat":7.347586,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G099","lon":-11.249767,"lat":7.486223,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G100","lon":-11.110113,"lat":7.59973,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2025-05-21","s23":"LG01","r23":0.34},{"id":"G101","lon":-11.179171,"lat":7.217563,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G102","lon":-11.018811,"lat":7.428489,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G103","lon":-11.084907,"lat":7.558088,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2025-05-21","s23":"LG01","r23":0.34},{"id":"G104","lon":-11.400561,"lat":7.537214,"d17":null,"s17":null,"r17":null,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G105","lon":-11.292622,"lat":7.207246,"d17":"2018-01-06","s17":"WV02","r17":0.5,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G106","lon":-11.229637,"lat":7.264504,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G107","lon":-11.035453,"lat":7.617987,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G108","lon":-11.153648,"lat":7.218227,"d17":"2018-01-06","s17":"WV02","r17":0.5,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G109","lon":-11.187367,"lat":7.450199,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G110","lon":-11.043716,"lat":7.697681,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2025-04-04","s23":"LG03","r23":0.34},{"id":"G111","lon":-11.198369,"lat":7.477262,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G112","lon":-10.902379,"lat":7.522035,"d17":null,"s17":null,"r17":null,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G113","lon":-11.190412,"lat":7.67689,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2025-12-03","s23":"LG05","r23":0.34},{"id":"G114","lon":-11.325865,"lat":7.642826,"d17":"2018-01-15","s17":"WV03","r17":0.31,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G115","lon":-11.028973,"lat":7.27304,"d17":"2015-12-30","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G116","lon":-11.032607,"lat":7.295806,"d17":"2015-12-30","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G117","lon":-10.904515,"lat":7.575457,"d17":null,"s17":null,"r17":null,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G118","lon":-11.103585,"lat":7.256157,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G119","lon":-11.114904,"lat":7.295428,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G120","lon":-10.812906,"lat":7.70306,"d17":null,"s17":null,"r17":null,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G121","lon":-11.314982,"lat":7.225843,"d17":"2017-02-18","s17":"WV03","r17":0.31,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G122","lon":-11.016577,"lat":7.765069,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G123","lon":-11.074998,"lat":7.588781,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2025-04-04","s23":"LG03","r23":0.34},{"id":"G124","lon":-11.120012,"lat":7.567682,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2025-05-21","s23":"LG01","r23":0.34},{"id":"G125","lon":-11.230602,"lat":7.616754,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2025-03-09","s23":"LG02","r23":0.34},{"id":"G126","lon":-11.233696,"lat":7.370785,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G127","lon":-11.307411,"lat":7.546122,"d17":"2018-01-06","s17":"WV02","r17":0.5,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G128","lon":-11.006227,"lat":7.646058,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G129","lon":-11.095174,"lat":7.431932,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G130","lon":-10.894556,"lat":7.781633,"d17":"2016-02-26","s17":"WV02","r17":0.5,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G131","lon":-10.933242,"lat":7.737521,"d17":"2016-02-26","s17":"WV02","r17":0.5,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G132","lon":-11.320961,"lat":7.539271,"d17":"2018-01-15","s17":"WV03","r17":0.31,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G133","lon":-10.922783,"lat":7.588125,"d17":null,"s17":null,"r17":null,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G134","lon":-10.827825,"lat":7.566835,"d17":null,"s17":null,"r17":null,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G135","lon":-10.939518,"lat":7.500717,"d17":null,"s17":null,"r17":null,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G136","lon":-11.29972,"lat":7.530435,"d17":"2018-01-06","s17":"WV02","r17":0.5,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G137","lon":-10.990557,"lat":7.246089,"d17":"2019-03-04","s17":"WV02","r17":0.5,"d23":null,"s23":null,"r23":null},{"id":"G138","lon":-10.843839,"lat":7.750936,"d17":"2016-02-26","s17":"WV02","r17":0.5,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G139","lon":-11.340575,"lat":7.548657,"d17":"2018-01-15","s17":"WV03","r17":0.31,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G140","lon":-10.896427,"lat":7.338439,"d17":null,"s17":null,"r17":null,"d23":null,"s23":null,"r23":null},{"id":"G141","lon":-11.155706,"lat":7.251302,"d17":"2018-01-06","s17":"WV02","r17":0.5,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G142","lon":-10.801268,"lat":7.77987,"d17":"2016-02-26","s17":"WV02","r17":0.5,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G143","lon":-11.341304,"lat":7.633252,"d17":"2018-01-15","s17":"WV03","r17":0.31,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G144","lon":-11.123502,"lat":7.503121,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G145","lon":-10.873694,"lat":7.294323,"d17":null,"s17":null,"r17":null,"d23":null,"s23":null,"r23":null},{"id":"G146","lon":-11.39619,"lat":7.28155,"d17":"2015-12-09","s17":"WV03","r17":0.31,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G147","lon":-10.92321,"lat":7.438136,"d17":null,"s17":null,"r17":null,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G148","lon":-10.864091,"lat":7.656188,"d17":null,"s17":null,"r17":null,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G149","lon":-11.367659,"lat":7.226115,"d17":"2017-02-18","s17":"WV03","r17":0.31,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G150","lon":-11.057653,"lat":7.426141,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G151","lon":-11.154666,"lat":7.540935,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2025-12-03","s23":"LG05","r23":0.34},{"id":"G152","lon":-11.326748,"lat":7.348618,"d17":"2016-01-24","s17":"GE01","r17":0.46,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G153","lon":-11.221506,"lat":7.592124,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2025-03-09","s23":"LG02","r23":0.34},{"id":"G154","lon":-11.255083,"lat":7.409997,"d17":"2018-01-06","s17":"WV02","r17":0.5,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G155","lon":-11.032279,"lat":7.402934,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G156","lon":-11.153689,"lat":7.39694,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G157","lon":-11.304446,"lat":7.499227,"d17":"2018-01-06","s17":"WV02","r17":0.5,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G158","lon":-11.11932,"lat":7.252558,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G159","lon":-11.051311,"lat":7.346979,"d17":"2015-12-30","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G160","lon":-11.102836,"lat":7.270263,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G161","lon":-11.019703,"lat":7.621315,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G162","lon":-11.168395,"lat":7.348598,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G163","lon":-11.198268,"lat":7.565124,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2025-03-09","s23":"LG02","r23":0.34},{"id":"G164","lon":-11.278618,"lat":7.390895,"d17":"2018-01-06","s17":"WV02","r17":0.5,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G165","lon":-10.926903,"lat":7.222767,"d17":null,"s17":null,"r17":null,"d23":null,"s23":null,"r23":null},{"id":"G166","lon":-11.089404,"lat":7.64512,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2025-05-21","s23":"LG01","r23":0.34},{"id":"G167","lon":-11.153142,"lat":7.778501,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2022-02-03","s23":"GE01","r23":0.46},{"id":"G168","lon":-11.396504,"lat":7.735441,"d17":"2016-04-01","s17":"GE01","r17":0.46,"d23":"2023-10-19","s23":"GE01","r23":0.46},{"id":"G169","lon":-11.32692,"lat":7.484737,"d17":"2018-01-15","s17":"WV03","r17":0.31,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G170","lon":-11.358297,"lat":7.200946,"d17":"2017-02-18","s17":"WV03","r17":0.31,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G171","lon":-10.810108,"lat":7.748368,"d17":"2016-02-26","s17":"WV02","r17":0.5,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G172","lon":-11.289702,"lat":7.220547,"d17":"2018-01-06","s17":"WV02","r17":0.5,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G173","lon":-11.071626,"lat":7.33441,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G174","lon":-10.979968,"lat":7.669774,"d17":"2019-03-04","s17":"WV02","r17":0.5,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G175","lon":-11.132356,"lat":7.645724,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2025-05-21","s23":"LG01","r23":0.34},{"id":"G176","lon":-11.402743,"lat":7.733236,"d17":null,"s17":null,"r17":null,"d23":"2023-10-19","s23":"GE01","r23":0.46},{"id":"G177","lon":-10.813854,"lat":7.797446,"d17":"2016-02-26","s17":"WV02","r17":0.5,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G178","lon":-11.284568,"lat":7.747172,"d17":"2018-01-15","s17":"WV03","r17":0.31,"d23":"2022-02-03","s23":"GE01","r23":0.46},{"id":"G179","lon":-11.383456,"lat":7.287041,"d17":"2017-02-18","s17":"WV03","r17":0.31,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G180","lon":-11.012149,"lat":7.633554,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G181","lon":-11.17209,"lat":7.269936,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G182","lon":-11.010799,"lat":7.459173,"d17":"2019-03-04","s17":"WV02","r17":0.5,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G183","lon":-11.063159,"lat":7.324415,"d17":"2015-12-30","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G184","lon":-11.054102,"lat":7.363238,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G185","lon":-11.281372,"lat":7.398203,"d17":"2018-01-06","s17":"WV02","r17":0.5,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G186","lon":-11.311169,"lat":7.434385,"d17":"2018-01-15","s17":"WV03","r17":0.31,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G187","lon":-10.944994,"lat":7.63115,"d17":null,"s17":null,"r17":null,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G188","lon":-11.402329,"lat":7.756014,"d17":"2016-04-01","s17":"GE01","r17":0.46,"d23":"2021-12-22","s23":"WV03","r23":0.31},{"id":"G189","lon":-11.308767,"lat":7.23184,"d17":"2017-02-18","s17":"WV03","r17":0.31,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G190","lon":-11.030383,"lat":7.522003,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G191","lon":-10.972188,"lat":7.692321,"d17":"2019-03-04","s17":"WV02","r17":0.5,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G192","lon":-11.317621,"lat":7.369273,"d17":"2016-01-24","s17":"GE01","r17":0.46,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G193","lon":-11.00613,"lat":7.625175,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G194","lon":-11.065425,"lat":7.633032,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2025-04-04","s23":"LG03","r23":0.34},{"id":"G195","lon":-11.03088,"lat":7.685538,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G196","lon":-11.285889,"lat":7.272088,"d17":"2018-01-06","s17":"WV02","r17":0.5,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G197","lon":-11.053322,"lat":7.602986,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2025-04-04","s23":"LG03","r23":0.34},{"id":"G198","lon":-11.028438,"lat":7.33515,"d17":"2015-12-30","s17":"GE01","r17":0.46,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G199","lon":-10.989111,"lat":7.530058,"d17":"2019-03-04","s17":"WV02","r17":0.5,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G200","lon":-11.031592,"lat":7.777473,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2022-02-03","s23":"GE01","r23":0.46},{"id":"G201","lon":-11.136544,"lat":7.502787,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G202","lon":-11.176515,"lat":7.508285,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G203","lon":-10.998778,"lat":7.563644,"d17":"2019-03-04","s17":"WV02","r17":0.5,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G204","lon":-11.342681,"lat":7.485467,"d17":"2018-01-15","s17":"WV03","r17":0.31,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G205","lon":-11.298859,"lat":7.205587,"d17":"2018-01-06","s17":"WV02","r17":0.5,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G206","lon":-11.033282,"lat":7.384759,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G207","lon":-11.337111,"lat":7.711367,"d17":"2018-01-15","s17":"WV03","r17":0.31,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G208","lon":-10.936683,"lat":7.349929,"d17":null,"s17":null,"r17":null,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G209","lon":-11.146348,"lat":7.339212,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G210","lon":-11.319737,"lat":7.513518,"d17":"2018-01-15","s17":"WV03","r17":0.31,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G211","lon":-10.913841,"lat":7.776665,"d17":"2016-02-26","s17":"WV02","r17":0.5,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G212","lon":-11.356416,"lat":7.411912,"d17":null,"s17":null,"r17":null,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G213","lon":-11.026943,"lat":7.542089,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G214","lon":-11.346875,"lat":7.756595,"d17":"2018-01-15","s17":"WV03","r17":0.31,"d23":"2021-12-22","s23":"WV03","r23":0.31},{"id":"G215","lon":-10.960646,"lat":7.605856,"d17":"2019-03-04","s17":"WV02","r17":0.5,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G216","lon":-11.160196,"lat":7.394197,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G217","lon":-10.933439,"lat":7.539529,"d17":null,"s17":null,"r17":null,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G218","lon":-11.195889,"lat":7.52446,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":null,"s23":null,"r23":null},{"id":"G219","lon":-11.338929,"lat":7.494977,"d17":"2018-01-15","s17":"WV03","r17":0.31,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G220","lon":-11.311705,"lat":7.787971,"d17":"2018-01-15","s17":"WV03","r17":0.31,"d23":"2022-02-03","s23":"GE01","r23":0.46},{"id":"G221","lon":-11.145597,"lat":7.684438,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2025-12-03","s23":"LG05","r23":0.34},{"id":"G222","lon":-11.122535,"lat":7.693502,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2025-05-21","s23":"LG01","r23":0.34},{"id":"G223","lon":-11.322088,"lat":7.597563,"d17":"2018-01-15","s17":"WV03","r17":0.31,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G224","lon":-11.193867,"lat":7.608264,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2025-03-09","s23":"LG02","r23":0.34},{"id":"G225","lon":-11.347362,"lat":7.394877,"d17":"2015-12-09","s17":"WV03","r17":0.31,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G226","lon":-11.369042,"lat":7.385544,"d17":null,"s17":null,"r17":null,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G227","lon":-11.063848,"lat":7.530254,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2025-04-04","s23":"LG03","r23":0.34},{"id":"G228","lon":-10.985234,"lat":7.573741,"d17":"2019-03-04","s17":"WV02","r17":0.5,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G229","lon":-10.862116,"lat":7.764147,"d17":"2016-02-26","s17":"WV02","r17":0.5,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G230","lon":-11.200673,"lat":7.39427,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G231","lon":-11.093641,"lat":7.219862,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G232","lon":-10.942037,"lat":7.51725,"d17":null,"s17":null,"r17":null,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G233","lon":-11.152059,"lat":7.725897,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2022-02-03","s23":"GE01","r23":0.46},{"id":"G234","lon":-11.068355,"lat":7.331984,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2024-12-21","s23":"WV02","r23":0.5},{"id":"G235","lon":-10.856475,"lat":7.59221,"d17":null,"s17":null,"r17":null,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G236","lon":-10.823587,"lat":7.528337,"d17":null,"s17":null,"r17":null,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G237","lon":-11.365138,"lat":7.716636,"d17":"2016-01-24","s17":"GE01","r17":0.46,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G238","lon":-11.138664,"lat":7.602303,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2025-05-21","s23":"LG01","r23":0.34},{"id":"G239","lon":-10.925688,"lat":7.507558,"d17":null,"s17":null,"r17":null,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G240","lon":-10.808834,"lat":7.242508,"d17":null,"s17":null,"r17":null,"d23":null,"s23":null,"r23":null},{"id":"G241","lon":-10.876542,"lat":7.705498,"d17":null,"s17":null,"r17":null,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G242","lon":-11.313465,"lat":7.457692,"d17":"2018-01-15","s17":"WV03","r17":0.31,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G243","lon":-11.294865,"lat":7.639738,"d17":"2018-01-06","s17":"WV02","r17":0.5,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G244","lon":-10.906289,"lat":7.229363,"d17":null,"s17":null,"r17":null,"d23":null,"s23":null,"r23":null},{"id":"G245","lon":-10.819274,"lat":7.793083,"d17":"2016-02-26","s17":"WV02","r17":0.5,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G246","lon":-10.992196,"lat":7.550927,"d17":"2019-03-04","s17":"WV02","r17":0.5,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G247","lon":-10.860609,"lat":7.792361,"d17":"2016-02-26","s17":"WV02","r17":0.5,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G248","lon":-11.005018,"lat":7.678066,"d17":"2017-01-28","s17":"GE01","r17":0.46,"d23":"2022-01-31","s23":"WV02","r23":0.5},{"id":"G249","lon":-11.360601,"lat":7.226423,"d17":"2017-02-18","s17":"WV03","r17":0.31,"d23":"2023-12-24","s23":"GE01","r23":0.46},{"id":"G250","lon":-10.934057,"lat":7.737246,"d17":"2016-02-26","s17":"WV02","r17":0.5,"d23":"2022-01-31","s23":"WV02","r23":0.5}]
store.py ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Label store: one JSON file per labeller and point, mirrored to a private Hugging Face dataset."""
2
+ from __future__ import annotations
3
+
4
+ import json
5
+ import os
6
+ import re
7
+ import threading
8
+ from datetime import datetime, timezone
9
+ from pathlib import Path
10
+
11
+ from huggingface_hub import CommitScheduler, snapshot_download
12
+
13
+ ROOT = Path(os.environ.get("LABEL_DIR", "labels"))
14
+ REPO = os.environ.get("LABELS_REPO") # e.g. chrisilo/gola-labels (private dataset)
15
+ TOKEN = os.environ.get("HF_TOKEN")
16
+ FIELDS = ("forest_2017", "forest_2023", "change_type", "confidence", "source_2017", "source_2023", "note")
17
+ _lock = threading.Lock()
18
+ _scheduler = None
19
+
20
+
21
+ def slug(name: str) -> str:
22
+ s = re.sub(r"[^a-z0-9]+", "-", name.strip().lower()).strip("-")
23
+ return s[:40]
24
+
25
+
26
+ def start():
27
+ """Pull labels saved earlier, then push new ones to the dataset every two minutes."""
28
+ global _scheduler
29
+ ROOT.mkdir(parents=True, exist_ok=True)
30
+ if REPO and TOKEN:
31
+ try:
32
+ snapshot_download(REPO, repo_type="dataset", token=TOKEN, local_dir=ROOT, allow_patterns="*.json")
33
+ except Exception as e: # noqa: BLE001 first run: dataset is empty
34
+ print("no earlier labels:", e)
35
+ _scheduler = CommitScheduler(repo_id=REPO, repo_type="dataset", folder_path=ROOT, every=2,
36
+ private=True, token=TOKEN, allow_patterns="*.json")
37
+
38
+
39
+ def save(labeller: str, point_id: str, data: dict) -> dict:
40
+ who = slug(labeller)
41
+ rec = {k: str(data.get(k, ""))[:500] for k in FIELDS}
42
+ rec.update(point_id=point_id, labeller=who, labelled_at=datetime.now(timezone.utc).isoformat(timespec="seconds"))
43
+ d = ROOT / who
44
+ lock = _scheduler.lock if _scheduler else _lock
45
+ with lock:
46
+ d.mkdir(parents=True, exist_ok=True)
47
+ (d / f"{point_id}.json").write_text(json.dumps(rec))
48
+ return rec
49
+
50
+
51
+ def load(labeller: str) -> dict:
52
+ d = ROOT / slug(labeller)
53
+ return {p.stem: json.loads(p.read_text()) for p in d.glob("*.json")} if d.exists() else {}