feat: implement automated data scraping and history generation pipeline for PVL reservoir levels

This commit is contained in:
David Fencl
2026-06-05 22:58:21 +02:00
parent 5411bd16ff
commit 8d1fb5b28e
25 changed files with 60588 additions and 419 deletions
+6
View File
@@ -63,6 +63,11 @@ const lakes = lakesConfig.map(lake => {
if (volume === 0) volume = lake.maxVolume || 0;
}
let storageDiff = 0;
if (lake.storageLevel && currentLevel > 0) {
storageDiff = Number((currentLevel - lake.storageLevel).toFixed(2));
}
return {
id: lake.id,
name: lake.text.replace('VD ', '').split('-')[0].trim(),
@@ -70,6 +75,7 @@ const lakes = lakesConfig.map(lake => {
priority: lake.priority || false,
level: currentLevel.toFixed(2),
capacity: capacity,
storageDiff: storageDiff,
inflow: inflow.toFixed(1),
outflow: currentFlow.toFixed(1),
volume: volume,