Mercurial > gemma
annotate client/src/lib/classifications.js @ 5082:c4ebb6ccc588 time-sliding
client: start a request for the last changed time on time slider
* initiate a refresh layers request when the time for the
finished request differs from the selected time on time slider
author | Fadi Abbud <fadi.abbud@intevation.de> |
---|---|
date | Wed, 18 Mar 2020 14:11:44 +0100 |
parents | a66275cf4490 |
children |
rev | line source |
---|---|
3472
71022e6bd98e
client: Use classifications for bottleneck diagrams on map and extracted classification algos
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
1 /* This is Free Software under GNU Affero General Public License v >= 3.0 |
71022e6bd98e
client: Use classifications for bottleneck diagrams on map and extracted classification algos
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
2 * without warranty, see README.md and license for details. |
71022e6bd98e
client: Use classifications for bottleneck diagrams on map and extracted classification algos
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
3 * |
71022e6bd98e
client: Use classifications for bottleneck diagrams on map and extracted classification algos
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
4 * SPDX-License-Identifier: AGPL-3.0-or-later |
71022e6bd98e
client: Use classifications for bottleneck diagrams on map and extracted classification algos
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
5 * License-Filename: LICENSES/AGPL-3.0.txt |
71022e6bd98e
client: Use classifications for bottleneck diagrams on map and extracted classification algos
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
6 * |
71022e6bd98e
client: Use classifications for bottleneck diagrams on map and extracted classification algos
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
7 * Copyright (C) 2018 by via donau |
71022e6bd98e
client: Use classifications for bottleneck diagrams on map and extracted classification algos
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
8 * – Österreichische Wasserstraßen-Gesellschaft mbH |
71022e6bd98e
client: Use classifications for bottleneck diagrams on map and extracted classification algos
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
9 * Software engineering by Intevation GmbH |
71022e6bd98e
client: Use classifications for bottleneck diagrams on map and extracted classification algos
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
10 * |
71022e6bd98e
client: Use classifications for bottleneck diagrams on map and extracted classification algos
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
11 * Author(s): |
71022e6bd98e
client: Use classifications for bottleneck diagrams on map and extracted classification algos
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
12 * Raimund Renkert <raimund.renkert@intevation.de> |
3617
bcf9713ee359
client: configuration: prepared fetching data accuracy values from backend
Markus Kottlaender <markus@intevation.de>
parents:
3507
diff
changeset
|
13 * Markus Kottländer <markus.kottlaender@intevation.de> |
3472
71022e6bd98e
client: Use classifications for bottleneck diagrams on map and extracted classification algos
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
14 */ |
4357
e8af2ed8666e
refactor classification of Nash sutcliffe for better readability
Thomas Junk <thomas.junk@intevation.de>
parents:
4288
diff
changeset
|
15 |
e8af2ed8666e
refactor classification of Nash sutcliffe for better readability
Thomas Junk <thomas.junk@intevation.de>
parents:
4288
diff
changeset
|
16 /*eslint no-unused-vars: ["error", { "varsIgnorePattern": "_" }]*/ |
e8af2ed8666e
refactor classification of Nash sutcliffe for better readability
Thomas Junk <thomas.junk@intevation.de>
parents:
4288
diff
changeset
|
17 |
3617
bcf9713ee359
client: configuration: prepared fetching data accuracy values from backend
Markus Kottlaender <markus@intevation.de>
parents:
3507
diff
changeset
|
18 import store from "@/store/index"; |
3472
71022e6bd98e
client: Use classifications for bottleneck diagrams on map and extracted classification algos
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
19 |
3507
a606d003730c
client: spuc12: implemented diagram for reference gauge of bottlenecks
Markus Kottlaender <markus@intevation.de>
parents:
3503
diff
changeset
|
20 const getGauge = f => { |
a606d003730c
client: spuc12: implemented diagram for reference gauge of bottlenecks
Markus Kottlaender <markus@intevation.de>
parents:
3503
diff
changeset
|
21 if (f.getId().indexOf("bottlenecks") > -1) { |
4270
e4d6c6339cb4
identify_tool: accuracy legend improved
Thomas Junk <thomas.junk@intevation.de>
parents:
4266
diff
changeset
|
22 const GaugeProxy = (function(feature) { |
e4d6c6339cb4
identify_tool: accuracy legend improved
Thomas Junk <thomas.junk@intevation.de>
parents:
4266
diff
changeset
|
23 const gauge = feature.get("gauge_obj"); |
e4d6c6339cb4
identify_tool: accuracy legend improved
Thomas Junk <thomas.junk@intevation.de>
parents:
4266
diff
changeset
|
24 const get = function(propName) { |
e4d6c6339cb4
identify_tool: accuracy legend improved
Thomas Junk <thomas.junk@intevation.de>
parents:
4266
diff
changeset
|
25 if (gauge) return gauge.get(propName); |
e4d6c6339cb4
identify_tool: accuracy legend improved
Thomas Junk <thomas.junk@intevation.de>
parents:
4266
diff
changeset
|
26 return feature.get(propName); |
e4d6c6339cb4
identify_tool: accuracy legend improved
Thomas Junk <thomas.junk@intevation.de>
parents:
4266
diff
changeset
|
27 }; |
e4d6c6339cb4
identify_tool: accuracy legend improved
Thomas Junk <thomas.junk@intevation.de>
parents:
4266
diff
changeset
|
28 return { |
e4d6c6339cb4
identify_tool: accuracy legend improved
Thomas Junk <thomas.junk@intevation.de>
parents:
4266
diff
changeset
|
29 get: get |
e4d6c6339cb4
identify_tool: accuracy legend improved
Thomas Junk <thomas.junk@intevation.de>
parents:
4266
diff
changeset
|
30 }; |
e4d6c6339cb4
identify_tool: accuracy legend improved
Thomas Junk <thomas.junk@intevation.de>
parents:
4266
diff
changeset
|
31 })(f); |
e4d6c6339cb4
identify_tool: accuracy legend improved
Thomas Junk <thomas.junk@intevation.de>
parents:
4266
diff
changeset
|
32 return GaugeProxy; |
3507
a606d003730c
client: spuc12: implemented diagram for reference gauge of bottlenecks
Markus Kottlaender <markus@intevation.de>
parents:
3503
diff
changeset
|
33 } |
a606d003730c
client: spuc12: implemented diagram for reference gauge of bottlenecks
Markus Kottlaender <markus@intevation.de>
parents:
3503
diff
changeset
|
34 return f; |
a606d003730c
client: spuc12: implemented diagram for reference gauge of bottlenecks
Markus Kottlaender <markus@intevation.de>
parents:
3503
diff
changeset
|
35 }; |
a606d003730c
client: spuc12: implemented diagram for reference gauge of bottlenecks
Markus Kottlaender <markus@intevation.de>
parents:
3503
diff
changeset
|
36 |
4288
767a6500a666
classifications: refactor
Thomas Junk <thomas.junk@intevation.de>
parents:
4279
diff
changeset
|
37 const calcForecastVsRealityForNSC = nsc => { |
4357
e8af2ed8666e
refactor classification of Nash sutcliffe for better readability
Thomas Junk <thomas.junk@intevation.de>
parents:
4288
diff
changeset
|
38 const hasSamples = |
e8af2ed8666e
refactor classification of Nash sutcliffe for better readability
Thomas Junk <thomas.junk@intevation.de>
parents:
4288
diff
changeset
|
39 nsc && nsc.coeffs.reduce((sum, coeff) => sum + coeff.samples, 0); |
e8af2ed8666e
refactor classification of Nash sutcliffe for better readability
Thomas Junk <thomas.junk@intevation.de>
parents:
4288
diff
changeset
|
40 if (hasSamples) { |
e8af2ed8666e
refactor classification of Nash sutcliffe for better readability
Thomas Junk <thomas.junk@intevation.de>
parents:
4288
diff
changeset
|
41 const [nsc24h, _, nsc72h] = nsc.coeffs; |
4288
767a6500a666
classifications: refactor
Thomas Junk <thomas.junk@intevation.de>
parents:
4279
diff
changeset
|
42 // 24h < configured value |
767a6500a666
classifications: refactor
Thomas Junk <thomas.junk@intevation.de>
parents:
4279
diff
changeset
|
43 if ( |
4357
e8af2ed8666e
refactor classification of Nash sutcliffe for better readability
Thomas Junk <thomas.junk@intevation.de>
parents:
4288
diff
changeset
|
44 nsc24h.samples && |
e8af2ed8666e
refactor classification of Nash sutcliffe for better readability
Thomas Junk <thomas.junk@intevation.de>
parents:
4288
diff
changeset
|
45 nsc24h.value < |
4288
767a6500a666
classifications: refactor
Thomas Junk <thomas.junk@intevation.de>
parents:
4279
diff
changeset
|
46 store.state.application.config.gm_forecast_vs_reality_nsc_24h |
767a6500a666
classifications: refactor
Thomas Junk <thomas.junk@intevation.de>
parents:
4279
diff
changeset
|
47 ) |
767a6500a666
classifications: refactor
Thomas Junk <thomas.junk@intevation.de>
parents:
4279
diff
changeset
|
48 return "DANGER"; |
767a6500a666
classifications: refactor
Thomas Junk <thomas.junk@intevation.de>
parents:
4279
diff
changeset
|
49 // 72h < configured value |
767a6500a666
classifications: refactor
Thomas Junk <thomas.junk@intevation.de>
parents:
4279
diff
changeset
|
50 if ( |
4357
e8af2ed8666e
refactor classification of Nash sutcliffe for better readability
Thomas Junk <thomas.junk@intevation.de>
parents:
4288
diff
changeset
|
51 nsc72h.samples && |
e8af2ed8666e
refactor classification of Nash sutcliffe for better readability
Thomas Junk <thomas.junk@intevation.de>
parents:
4288
diff
changeset
|
52 nsc72h.value < |
4288
767a6500a666
classifications: refactor
Thomas Junk <thomas.junk@intevation.de>
parents:
4279
diff
changeset
|
53 store.state.application.config.gm_forecast_vs_reality_nsc_72h |
767a6500a666
classifications: refactor
Thomas Junk <thomas.junk@intevation.de>
parents:
4279
diff
changeset
|
54 ) |
767a6500a666
classifications: refactor
Thomas Junk <thomas.junk@intevation.de>
parents:
4279
diff
changeset
|
55 return "WARNING"; |
767a6500a666
classifications: refactor
Thomas Junk <thomas.junk@intevation.de>
parents:
4279
diff
changeset
|
56 // both > configured value |
767a6500a666
classifications: refactor
Thomas Junk <thomas.junk@intevation.de>
parents:
4279
diff
changeset
|
57 return "OK"; |
767a6500a666
classifications: refactor
Thomas Junk <thomas.junk@intevation.de>
parents:
4279
diff
changeset
|
58 } |
767a6500a666
classifications: refactor
Thomas Junk <thomas.junk@intevation.de>
parents:
4279
diff
changeset
|
59 // no data available |
767a6500a666
classifications: refactor
Thomas Junk <thomas.junk@intevation.de>
parents:
4279
diff
changeset
|
60 return "NEUTRAL"; |
767a6500a666
classifications: refactor
Thomas Junk <thomas.junk@intevation.de>
parents:
4279
diff
changeset
|
61 }; |
767a6500a666
classifications: refactor
Thomas Junk <thomas.junk@intevation.de>
parents:
4279
diff
changeset
|
62 |
3472
71022e6bd98e
client: Use classifications for bottleneck diagrams on map and extracted classification algos
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
63 export default { |
4436
a66275cf4490
identify: gm availability infotext improved. More 2 come
Thomas Junk <thomas.junk@intevation.de>
parents:
4357
diff
changeset
|
64 getGauge: getGauge, |
4279
30f26bf7ff24
Reordering of elements
Thomas Junk <thomas.junk@intevation.de>
parents:
4270
diff
changeset
|
65 surveyRecency(bottleneck) { |
3472
71022e6bd98e
client: Use classifications for bottleneck diagrams on map and extracted classification algos
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
66 if ( |
71022e6bd98e
client: Use classifications for bottleneck diagrams on map and extracted classification algos
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
67 bottleneck.get("revisiting_time") === null || |
71022e6bd98e
client: Use classifications for bottleneck diagrams on map and extracted classification algos
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
68 bottleneck.get("revisiting_time") === 0 |
71022e6bd98e
client: Use classifications for bottleneck diagrams on map and extracted classification algos
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
69 ) { |
4265
2596a028dc3a
Feature_info: display partial legend information for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3617
diff
changeset
|
70 return "NEUTRAL"; |
3472
71022e6bd98e
client: Use classifications for bottleneck diagrams on map and extracted classification algos
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
71 } |
71022e6bd98e
client: Use classifications for bottleneck diagrams on map and extracted classification algos
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
72 if (bottleneck.get("date_max") === null) { |
4265
2596a028dc3a
Feature_info: display partial legend information for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3617
diff
changeset
|
73 return "DANGER"; |
3472
71022e6bd98e
client: Use classifications for bottleneck diagrams on map and extracted classification algos
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
74 } |
71022e6bd98e
client: Use classifications for bottleneck diagrams on map and extracted classification algos
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
75 let revTime = bottleneck.get("revisiting_time") * 30.5; |
71022e6bd98e
client: Use classifications for bottleneck diagrams on map and extracted classification algos
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
76 let latest = Date.parse(bottleneck.get("date_max").replace("Z", "")); |
71022e6bd98e
client: Use classifications for bottleneck diagrams on map and extracted classification algos
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
77 var diff = Math.floor((Date.now() - latest) / 86400000); |
3617
bcf9713ee359
client: configuration: prepared fetching data accuracy values from backend
Markus Kottlaender <markus@intevation.de>
parents:
3507
diff
changeset
|
78 let revTimeMultiplier = |
bcf9713ee359
client: configuration: prepared fetching data accuracy values from backend
Markus Kottlaender <markus@intevation.de>
parents:
3507
diff
changeset
|
79 store.state.application.config.bn_revtime_multiplier; |
3472
71022e6bd98e
client: Use classifications for bottleneck diagrams on map and extracted classification algos
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
80 if (diff <= revTime) { |
4265
2596a028dc3a
Feature_info: display partial legend information for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3617
diff
changeset
|
81 return "OK"; |
3617
bcf9713ee359
client: configuration: prepared fetching data accuracy values from backend
Markus Kottlaender <markus@intevation.de>
parents:
3507
diff
changeset
|
82 } else if (revTime < diff && diff <= revTime * revTimeMultiplier) { |
4265
2596a028dc3a
Feature_info: display partial legend information for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3617
diff
changeset
|
83 return "WARNING"; |
3617
bcf9713ee359
client: configuration: prepared fetching data accuracy values from backend
Markus Kottlaender <markus@intevation.de>
parents:
3507
diff
changeset
|
84 } else if (revTime * revTimeMultiplier < diff) { |
4265
2596a028dc3a
Feature_info: display partial legend information for bottlenecks
Thomas Junk <thomas.junk@intevation.de>
parents:
3617
diff
changeset
|
85 return "DANGER"; |
3472
71022e6bd98e
client: Use classifications for bottleneck diagrams on map and extracted classification algos
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
86 } |
71022e6bd98e
client: Use classifications for bottleneck diagrams on map and extracted classification algos
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
87 }, |
3507
a606d003730c
client: spuc12: implemented diagram for reference gauge of bottlenecks
Markus Kottlaender <markus@intevation.de>
parents:
3503
diff
changeset
|
88 gmAvailability(feature) { |
a606d003730c
client: spuc12: implemented diagram for reference gauge of bottlenecks
Markus Kottlaender <markus@intevation.de>
parents:
3503
diff
changeset
|
89 let gauge = getGauge(feature); |
3480
965b2fbb1890
Colorize gauge symbol based on availability of measurements
Tom Gottfried <tom@intevation.de>
parents:
3472
diff
changeset
|
90 let gmDate = gauge.get("gm_measuredate"); |
965b2fbb1890
Colorize gauge symbol based on availability of measurements
Tom Gottfried <tom@intevation.de>
parents:
3472
diff
changeset
|
91 let gmN = gauge.get("gm_n_14d"); |
965b2fbb1890
Colorize gauge symbol based on availability of measurements
Tom Gottfried <tom@intevation.de>
parents:
3472
diff
changeset
|
92 if ( |
965b2fbb1890
Colorize gauge symbol based on availability of measurements
Tom Gottfried <tom@intevation.de>
parents:
3472
diff
changeset
|
93 gmDate !== undefined && |
965b2fbb1890
Colorize gauge symbol based on availability of measurements
Tom Gottfried <tom@intevation.de>
parents:
3472
diff
changeset
|
94 gmDate !== null && |
3617
bcf9713ee359
client: configuration: prepared fetching data accuracy values from backend
Markus Kottlaender <markus@intevation.de>
parents:
3507
diff
changeset
|
95 // latest measurement within configured hours |
bcf9713ee359
client: configuration: prepared fetching data accuracy values from backend
Markus Kottlaender <markus@intevation.de>
parents:
3507
diff
changeset
|
96 Date.parse(gmDate) > |
bcf9713ee359
client: configuration: prepared fetching data accuracy values from backend
Markus Kottlaender <markus@intevation.de>
parents:
3507
diff
changeset
|
97 Date.now() - |
bcf9713ee359
client: configuration: prepared fetching data accuracy values from backend
Markus Kottlaender <markus@intevation.de>
parents:
3507
diff
changeset
|
98 store.state.application.config.gm_latest_hours * 60 * 60 * 1000 |
3480
965b2fbb1890
Colorize gauge symbol based on availability of measurements
Tom Gottfried <tom@intevation.de>
parents:
3472
diff
changeset
|
99 ) { |
3617
bcf9713ee359
client: configuration: prepared fetching data accuracy values from backend
Markus Kottlaender <markus@intevation.de>
parents:
3507
diff
changeset
|
100 // at least configured amount of measurements in last 14 days |
bcf9713ee359
client: configuration: prepared fetching data accuracy values from backend
Markus Kottlaender <markus@intevation.de>
parents:
3507
diff
changeset
|
101 const valuesAtLeast = store.state.application.config.gm_min_values_14d; |
3498
4d44eda484dd
make the linter happier
Thomas Junk <thomas.junk@intevation.de>
parents:
3497
diff
changeset
|
102 if (gmN !== undefined && gmN !== null && gmN >= valuesAtLeast) { |
4266
fbe2f1aa2757
styles: refactor color coding accuracy colors
Thomas Junk <thomas.junk@intevation.de>
parents:
4265
diff
changeset
|
103 return "OK"; |
3480
965b2fbb1890
Colorize gauge symbol based on availability of measurements
Tom Gottfried <tom@intevation.de>
parents:
3472
diff
changeset
|
104 } |
4266
fbe2f1aa2757
styles: refactor color coding accuracy colors
Thomas Junk <thomas.junk@intevation.de>
parents:
4265
diff
changeset
|
105 return "WARNING"; |
3480
965b2fbb1890
Colorize gauge symbol based on availability of measurements
Tom Gottfried <tom@intevation.de>
parents:
3472
diff
changeset
|
106 } |
4266
fbe2f1aa2757
styles: refactor color coding accuracy colors
Thomas Junk <thomas.junk@intevation.de>
parents:
4265
diff
changeset
|
107 return "DANGER"; |
3480
965b2fbb1890
Colorize gauge symbol based on availability of measurements
Tom Gottfried <tom@intevation.de>
parents:
3472
diff
changeset
|
108 }, |
3507
a606d003730c
client: spuc12: implemented diagram for reference gauge of bottlenecks
Markus Kottlaender <markus@intevation.de>
parents:
3503
diff
changeset
|
109 forecastAccuracy(feature) { |
a606d003730c
client: spuc12: implemented diagram for reference gauge of bottlenecks
Markus Kottlaender <markus@intevation.de>
parents:
3503
diff
changeset
|
110 let gauge = getGauge(feature); |
3472
71022e6bd98e
client: Use classifications for bottleneck diagrams on map and extracted classification algos
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
111 let fa3d = gauge.get("forecast_accuracy_3d"); |
71022e6bd98e
client: Use classifications for bottleneck diagrams on map and extracted classification algos
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
112 let fa1d = gauge.get("forecast_accuracy_1d"); |
71022e6bd98e
client: Use classifications for bottleneck diagrams on map and extracted classification algos
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
113 if (typeof fa3d == "number" && typeof fa1d == "number") { |
3617
bcf9713ee359
client: configuration: prepared fetching data accuracy values from backend
Markus Kottlaender <markus@intevation.de>
parents:
3507
diff
changeset
|
114 if (fa1d > store.state.application.config.gm_forecast_offset_24h) { |
4266
fbe2f1aa2757
styles: refactor color coding accuracy colors
Thomas Junk <thomas.junk@intevation.de>
parents:
4265
diff
changeset
|
115 return "DANGER"; |
3617
bcf9713ee359
client: configuration: prepared fetching data accuracy values from backend
Markus Kottlaender <markus@intevation.de>
parents:
3507
diff
changeset
|
116 } else if (fa3d > store.state.application.config.gm_forecast_offset_72h) { |
4266
fbe2f1aa2757
styles: refactor color coding accuracy colors
Thomas Junk <thomas.junk@intevation.de>
parents:
4265
diff
changeset
|
117 return "WARNING"; |
3472
71022e6bd98e
client: Use classifications for bottleneck diagrams on map and extracted classification algos
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
118 } else { |
4266
fbe2f1aa2757
styles: refactor color coding accuracy colors
Thomas Junk <thomas.junk@intevation.de>
parents:
4265
diff
changeset
|
119 return "OK"; |
3472
71022e6bd98e
client: Use classifications for bottleneck diagrams on map and extracted classification algos
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
120 } |
71022e6bd98e
client: Use classifications for bottleneck diagrams on map and extracted classification algos
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
121 } |
4266
fbe2f1aa2757
styles: refactor color coding accuracy colors
Thomas Junk <thomas.junk@intevation.de>
parents:
4265
diff
changeset
|
122 return "NEUTRAL"; |
3501
c5c7cc24fe72
client: spuc12: implemented nash sutcliffe for forcast vs reality accuracy indicator
Markus Kottlaender <markus@intevation.de>
parents:
3498
diff
changeset
|
123 }, |
3507
a606d003730c
client: spuc12: implemented diagram for reference gauge of bottlenecks
Markus Kottlaender <markus@intevation.de>
parents:
3503
diff
changeset
|
124 forecastVsReality(feature) { |
a606d003730c
client: spuc12: implemented diagram for reference gauge of bottlenecks
Markus Kottlaender <markus@intevation.de>
parents:
3503
diff
changeset
|
125 let gauge = getGauge(feature); |
3501
c5c7cc24fe72
client: spuc12: implemented nash sutcliffe for forcast vs reality accuracy indicator
Markus Kottlaender <markus@intevation.de>
parents:
3498
diff
changeset
|
126 let nsc = gauge.get("nsc_data"); |
4288
767a6500a666
classifications: refactor
Thomas Junk <thomas.junk@intevation.de>
parents:
4279
diff
changeset
|
127 return calcForecastVsRealityForNSC(nsc); |
767a6500a666
classifications: refactor
Thomas Junk <thomas.junk@intevation.de>
parents:
4279
diff
changeset
|
128 }, |
767a6500a666
classifications: refactor
Thomas Junk <thomas.junk@intevation.de>
parents:
4279
diff
changeset
|
129 calcForecastVsRealityForNSC: calcForecastVsRealityForNSC |
3472
71022e6bd98e
client: Use classifications for bottleneck diagrams on map and extracted classification algos
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
130 }; |