arnaudverstraeten commited on
Commit
f0ce8b7
·
verified ·
1 Parent(s): d53a457

Dashboard data 2026-11-15T11:37+00:00

Browse files
Files changed (4) hide show
  1. app.js +39 -7
  2. data/geo.json +0 -0
  3. data/meta.json +1 -1
  4. index.html +4 -0
app.js CHANGED
@@ -688,11 +688,12 @@ async function renderTarget(root) {
688
 
689
  // --- Input features ----------------------------------------------------------------------
690
  async function renderInputs(root) {
691
- const cat = await json("catalog.json");
692
  const groups = new Set(cat.flatMap(r => (r.group ? r.group.split(", ") : [])));
693
  const cats = [...new Set(cat.map(r => r.category))].map(c => ({ c, n: cat.filter(r => r.category === c).length, used: cat.filter(r => r.category === c && r.used).length })).sort((a, b) => b.used - a.used || b.n - a.n);
694
  root.innerHTML = `
695
  <div class="head"><div><h1>Input features</h1><p class="lede">Every series we could feed a model. ESIOS serves <b>indicators</b> (time series), <b>offer indicators</b> (bid curves) and <b>archives</b> (bulk files). Calendar columns are computed. <b>Used</b> marks series in a feature group of <span class="mono">configs/groups.toml</span>; availability <b>future</b> = known for the target day before the gate, <b>past</b> = only known up to the forecast origin. Categories come from keyword rules on the English name, so a few rows may sit in the wrong bucket.</p></div></div>
 
696
  <div class="kpis">${kpi("Series", cat.length.toLocaleString("en-GB"))}${kpi("Used", String(cat.filter(r => r.used).length))}${kpi("Feature groups", String(groups.size))}</div>
697
  <div class="card"><div class="card-head"><div><h2>Catalog</h2><p class="sub" id="in-n"></p></div>
698
  <div class="controls"><select id="in-c" aria-label="Category"><option value="">All categories</option>${cats.map(c => `<option value="${esc(c.c)}">${esc(c.c)} (${c.used}/${c.n})</option>`).join("")}</select>
@@ -715,14 +716,45 @@ async function renderInputs(root) {
715
  draw();
716
  }
717
 
718
- // Outside Spain: the market's feature columns from configs/groups.toml (build.py writes them).
 
 
 
 
 
 
 
 
719
  async function renderFeatures(root) {
720
- const m = mk(), rows = (await json("features.json"))[m.id];
 
721
  root.innerHTML = `
722
- <div class="head"><div><h1>Input features</h1><p class="lede">The columns the ${esc(m.name)} models see, one line each in <span class="mono">configs/groups.toml</span>. Availability <b>future</b> = known for the target day before the gate, <b>past</b> = only known up to the forecast origin.</p></div></div>
723
- <div class="card"><div class="card-head"><div><h2>Feature columns</h2><p class="sub">${rows.length} columns</p></div></div>
724
- <div class="tablewrap"><table><thead><tr><th>Group</th><th>Column</th><th>Source</th><th>Availability</th><th>Description</th></tr></thead><tbody>${rows.map(r =>
725
- `<tr><td class="mono">${esc(r.group)}</td><td class="mono">${esc(r.column)}</td><td class="mono">${esc(r.source)}</td><td>${esc(r.availability)}</td><td class="desc">${esc(r.description)}</td></tr>`).join("")}</tbody></table></div></div>`;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
726
  }
727
 
728
  // --- Targets (Predico resources) --------------------------------------------------------
 
688
 
689
  // --- Input features ----------------------------------------------------------------------
690
  async function renderInputs(root) {
691
+ const cat = await json("catalog.json"), used = await liveFeatures(mk());
692
  const groups = new Set(cat.flatMap(r => (r.group ? r.group.split(", ") : [])));
693
  const cats = [...new Set(cat.map(r => r.category))].map(c => ({ c, n: cat.filter(r => r.category === c).length, used: cat.filter(r => r.category === c && r.used).length })).sort((a, b) => b.used - a.used || b.n - a.n);
694
  root.innerHTML = `
695
  <div class="head"><div><h1>Input features</h1><p class="lede">Every series we could feed a model. ESIOS serves <b>indicators</b> (time series), <b>offer indicators</b> (bid curves) and <b>archives</b> (bulk files). Calendar columns are computed. <b>Used</b> marks series in a feature group of <span class="mono">configs/groups.toml</span>; availability <b>future</b> = known for the target day before the gate, <b>past</b> = only known up to the forecast origin. Categories come from keyword rules on the English name, so a few rows may sit in the wrong bucket.</p></div></div>
696
+ ${used.size ? `<div class="card"><div class="card-head"><div><h2>Used by the live model</h2><p class="sub">The ${used.size} input columns of the latest live run (besides the target's own history).</p></div></div><div class="chips">${[...used].sort().map(f => `<span class="chip static mono">${esc(f)}</span>`).join("")}</div></div>` : ""}
697
  <div class="kpis">${kpi("Series", cat.length.toLocaleString("en-GB"))}${kpi("Used", String(cat.filter(r => r.used).length))}${kpi("Feature groups", String(groups.size))}</div>
698
  <div class="card"><div class="card-head"><div><h2>Catalog</h2><p class="sub" id="in-n"></p></div>
699
  <div class="controls"><select id="in-c" aria-label="Category"><option value="">All categories</option>${cats.map(c => `<option value="${esc(c.c)}">${esc(c.c)} (${c.used}/${c.n})</option>`).join("")}</select>
 
716
  draw();
717
  }
718
 
719
+ // Feature columns the latest live run of each of the market's targets used (live.json).
720
+ async function liveFeatures(m) {
721
+ const [live, meta] = await Promise.all([json("live.json").catch(() => null), json("meta.json")]), out = new Set();
722
+ for (const t of shortsOf(m, meta)) for (const f of live?.targets?.[t]?.features ?? []) out.add(f);
723
+ return out;
724
+ }
725
+
726
+ // Outside Spain: the market's feature columns from configs/groups.toml (build.py writes them),
727
+ // and a map of the weather points with their weights where the market reads Open-Meteo.
728
  async function renderFeatures(root) {
729
+ const m = mk(), rows = (await json("features.json"))[m.id], used = await liveFeatures(m);
730
+ const geo = (await json("geo.json").catch(() => ({})))[m.id];
731
  root.innerHTML = `
732
+ <div class="head"><div><h1>Input features</h1><p class="lede">The columns the ${esc(m.name)} models see, one line each in <span class="mono">configs/groups.toml</span>. Availability <b>future</b> = known for the target day before the gate, <b>past</b> = only known up to the forecast origin. <b>Live</b> marks the columns the latest live run used.</p></div></div>
733
+ ${geo ? `<div class="card"><div class="card-head"><div><h2>Weather sampling</h2><p class="sub">${geo.sets.map(s => `${s.points.length} points (${s.weighted ? "weighted by PV capacity; dot size = weight" : "plain mean"}): ${s.runs.join(" and ")} run of D-1`).join(" · ")}. Outline: ${esc(geo.label)}.</p></div></div>
734
+ <div class="map" id="ft-map" role="img" aria-label="Map of the weather points"></div>
735
+ <p class="sub">Boundaries: ${esc(geo.credit)}. Map: © OpenStreetMap contributors.</p></div>` : ""}
736
+ <div class="card"><div class="card-head"><div><h2>Feature columns</h2><p class="sub">${rows.length} columns · ${rows.filter(r => used.has(r.column)).length} in the latest live run</p></div></div>
737
+ <div class="tablewrap"><table><thead><tr><th>Live</th><th>Group</th><th>Column</th><th>Source</th><th>Availability</th><th>Description</th></tr></thead><tbody>${rows.map(r =>
738
+ `<tr><td>${used.has(r.column) ? '<span class="pill">live</span>' : ""}</td><td class="mono">${esc(r.group)}</td><td class="mono">${esc(r.column)}</td><td class="mono">${esc(r.source)}</td><td>${esc(r.availability)}</td><td class="desc">${esc(r.description)}</td></tr>`).join("")}</tbody></table></div></div>`;
739
+ if (geo && window.L) drawMap(root.querySelector("#ft-map"), geo);
740
+ }
741
+
742
+ function drawMap(el, geo) {
743
+ const map = L.map(el, { scrollWheelZoom: false });
744
+ L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png", { maxZoom: 12, attribution: "© OpenStreetMap" }).addTo(map);
745
+ const regions = L.geoJSON(geo.regions, {
746
+ style: { color: css("--accent-ink"), weight: 1.5, fillColor: css("--accent"), fillOpacity: 0.12 },
747
+ onEachFeature: (f, layer) => layer.bindTooltip(esc(f.properties.name)),
748
+ }).addTo(map);
749
+ const bounds = regions.getBounds();
750
+ for (const s of geo.sets) for (const [lat, lon, w] of s.points) {
751
+ const r = s.weighted ? 5 + Math.sqrt(w) * 30 : 7;
752
+ L.circleMarker([lat, lon], { radius: r, color: css("--surface"), weight: 2, fillColor: css("--tso"), fillOpacity: 0.9 })
753
+ .bindTooltip(`${lat.toFixed(2)}, ${lon.toFixed(2)}${s.weighted ? ` · weight ${(w * 100).toFixed(1)}%` : ""}<br>${s.runs.join(", ")}`)
754
+ .addTo(map);
755
+ bounds.extend([lat, lon]);
756
+ }
757
+ map.fitBounds(bounds.pad(0.05));
758
  }
759
 
760
  // --- Targets (Predico resources) --------------------------------------------------------
data/geo.json ADDED
The diff for this file is too large to render. See raw diff
 
data/meta.json CHANGED
@@ -1 +1 @@
1
- {"start":1761951600,"n":35040,"configs":[{"name":"chronos2_cov_ctx90","type":"foundation model","context":90},{"name":"chronos2_uni_ctx30","type":"foundation model","context":30},{"name":"chronos2_uni_ctx90","type":"foundation model","context":90},{"name":"ciproto_cov_ctx90","type":"foundation model","context":90},{"name":"elia_dayahead11h","type":"TSO forecast","context":null},{"name":"entsoe_a69","type":"TSO forecast","context":null},{"name":"slot_climatology_28d","type":"baseline","context":28},{"name":"t0gamma_cov_ctx90","type":"foundation model","context":90},{"name":"t0gamma_cov_noecmwf_ctx90","type":"foundation model","context":90},{"name":"t0gamma_cov_noicond2_ctx90","type":"foundation model","context":90},{"name":"t0gamma_uni_ctx30","type":"foundation model","context":30},{"name":"t0gamma_uni_ctx326","type":"foundation model","context":326},{"name":"t0gamma_uni_ctx90","type":"foundation model","context":90},{"name":"timeh2o_cov_ctx90","type":"foundation model","context":90},{"name":"timesfm3_cov_ctx90","type":"foundation model","context":90},{"name":"timesfm3_uni_ctx160","type":"foundation model","context":160},{"name":"timesfm3_uni_ctx30","type":"foundation model","context":30},{"name":"timesfm3_uni_ctx90","type":"foundation model","context":90},{"name":"timestral5m_cov_ctx28","type":"foundation model","context":28},{"name":"timestral5m_cov_ctx90","type":"foundation model","context":90},{"name":"timestral5m_cov_ctx90_o1630","type":"foundation model","context":90},{"name":"timestral5m_cov_no10249_ctx90","type":"foundation model","context":90},{"name":"timestral5m_uni_ctx30","type":"foundation model","context":30},{"name":"timestral5m_uni_ctx326","type":"foundation model","context":326},{"name":"timestral5m_uni_ctx90","type":"foundation model","context":90}],"generated":"2026-11-15T11:33+00:00","baseline":"slot_climatology_28d","live_config":"t0gamma_cov_ctx90","units":{"energy":"MWh","price":"EUR/MWh","wind":"MW","solar":"MW","solar_be":"MW"},"short":{"spain_mfrr_energy":"energy","spain_mfrr_price":"price","germany_wind_50hertz_ca":"wind","germany_solar_50hertz_ca":"solar","belgium_solar_opendata_elia":"solar_be"}}
 
1
+ {"start":1761951600,"n":35040,"configs":[{"name":"chronos2_cov_ctx90","type":"foundation model","context":90},{"name":"chronos2_uni_ctx30","type":"foundation model","context":30},{"name":"chronos2_uni_ctx90","type":"foundation model","context":90},{"name":"ciproto_cov_ctx90","type":"foundation model","context":90},{"name":"elia_dayahead11h","type":"TSO forecast","context":null},{"name":"entsoe_a69","type":"TSO forecast","context":null},{"name":"slot_climatology_28d","type":"baseline","context":28},{"name":"t0gamma_cov_ctx90","type":"foundation model","context":90},{"name":"t0gamma_cov_noecmwf_ctx90","type":"foundation model","context":90},{"name":"t0gamma_cov_noicond2_ctx90","type":"foundation model","context":90},{"name":"t0gamma_uni_ctx30","type":"foundation model","context":30},{"name":"t0gamma_uni_ctx326","type":"foundation model","context":326},{"name":"t0gamma_uni_ctx90","type":"foundation model","context":90},{"name":"timeh2o_cov_ctx90","type":"foundation model","context":90},{"name":"timesfm3_cov_ctx90","type":"foundation model","context":90},{"name":"timesfm3_uni_ctx160","type":"foundation model","context":160},{"name":"timesfm3_uni_ctx30","type":"foundation model","context":30},{"name":"timesfm3_uni_ctx90","type":"foundation model","context":90},{"name":"timestral5m_cov_ctx28","type":"foundation model","context":28},{"name":"timestral5m_cov_ctx90","type":"foundation model","context":90},{"name":"timestral5m_cov_ctx90_o1630","type":"foundation model","context":90},{"name":"timestral5m_cov_no10249_ctx90","type":"foundation model","context":90},{"name":"timestral5m_uni_ctx30","type":"foundation model","context":30},{"name":"timestral5m_uni_ctx326","type":"foundation model","context":326},{"name":"timestral5m_uni_ctx90","type":"foundation model","context":90}],"generated":"2026-11-15T11:37+00:00","baseline":"slot_climatology_28d","live_config":"t0gamma_cov_ctx90","units":{"energy":"MWh","price":"EUR/MWh","wind":"MW","solar":"MW","solar_be":"MW"},"short":{"spain_mfrr_energy":"energy","spain_mfrr_price":"price","germany_wind_50hertz_ca":"wind","germany_solar_50hertz_ca":"solar","belgium_solar_opendata_elia":"solar_be"}}
index.html CHANGED
@@ -6,6 +6,7 @@
6
  <title>open-predico</title>
7
  <link rel="preconnect" href="https://fonts.googleapis.com">
8
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
 
9
  <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600&display=swap" rel="stylesheet">
10
  <style>
11
  /* Layout: a slim top bar with tabs, then one centred column of cards per tab. Gridual palette. */
@@ -126,6 +127,8 @@ td.desc { min-width: 280px; color: var(--ink-soft); }
126
  .day.cont { background: var(--surface); border: 2px dotted var(--cont); color: var(--ink); }
127
  .day.miss { background: repeating-linear-gradient(45deg, var(--grid) 0 3px, var(--surface) 3px 6px); }
128
  .day.pg { opacity: 0.55; }
 
 
129
  tr.pg td { color: var(--ink-soft); }
130
  .heat { display: grid; grid-template-columns: 64px repeat(31, minmax(10px, 1fr)); gap: 2px; font: 10px var(--mono); color: var(--ink-soft); min-width: 520px; }
131
  .heat div { aspect-ratio: 1; border-radius: 2px; }
@@ -184,6 +187,7 @@ canvas.scatter { width: 100%; height: 360px; display: block; }
184
  <section data-tab="inputs" id="tab-inputs" hidden><p class="empty">Loading…</p></section>
185
  </main>
186
  <script src="https://cdn.jsdelivr.net/npm/uplot@1.6.30/dist/uPlot.iife.min.js"></script>
 
187
  <script src="app.js"></script>
188
  </body>
189
  </html>
 
6
  <title>open-predico</title>
7
  <link rel="preconnect" href="https://fonts.googleapis.com">
8
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
9
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet@1.9.4/dist/leaflet.css">
10
  <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600&display=swap" rel="stylesheet">
11
  <style>
12
  /* Layout: a slim top bar with tabs, then one centred column of cards per tab. Gridual palette. */
 
127
  .day.cont { background: var(--surface); border: 2px dotted var(--cont); color: var(--ink); }
128
  .day.miss { background: repeating-linear-gradient(45deg, var(--grid) 0 3px, var(--surface) 3px 6px); }
129
  .day.pg { opacity: 0.55; }
130
+ .map { height: 440px; border-radius: 8px; border: 1px solid var(--line); }
131
+ .leaflet-container { font: 12px var(--sans); background: var(--grid); }
132
  tr.pg td { color: var(--ink-soft); }
133
  .heat { display: grid; grid-template-columns: 64px repeat(31, minmax(10px, 1fr)); gap: 2px; font: 10px var(--mono); color: var(--ink-soft); min-width: 520px; }
134
  .heat div { aspect-ratio: 1; border-radius: 2px; }
 
187
  <section data-tab="inputs" id="tab-inputs" hidden><p class="empty">Loading…</p></section>
188
  </main>
189
  <script src="https://cdn.jsdelivr.net/npm/uplot@1.6.30/dist/uPlot.iife.min.js"></script>
190
+ <script src="https://cdn.jsdelivr.net/npm/leaflet@1.9.4/dist/leaflet.js"></script>
191
  <script src="app.js"></script>
192
  </body>
193
  </html>