-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.js
291 lines (276 loc) · 7.6 KB
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
export default {
states: [
{
name: "California",
code: "CA",
state_huc_code: "ca3",
basin_huc_code: "ca_8",
center: [-120, 38.8],
zoom: 5,
},
{
name: "Colorado", // Friendly name of the state
code: "CO", // State code - needs to be all caps
state_huc_code: "co3", // State huc code defined by NWCC
basin_huc_code: "co_8", // State basin huc code defined by NWCC
center: [-107, 39], // Center point of the state on the map
zoom: 6, // Map zoom level (zoom out for large states)
},
{
name: "Montana",
code: "MT",
state_huc_code: "",
basin_huc_code: "mt_8",
center: [-110, 46.5],
zoom: 5,
},
{
name: "Nevada",
code: "NV",
state_huc_code: "nv3",
basin_huc_code: "nv_8",
center: [-117.5, 39],
zoom: 6,
},
{
name: "Utah",
code: "UT",
state_huc_code: "ut3",
basin_huc_code: "ut_8",
center: [-112, 39.8],
zoom: 6,
},
],
// ArcGIS Online ID of the basins feature layer. This is used
// to query for all of the basin data.
basins_feature_layer_id: "46c47621059f4d7495a3b21182947bb2",
// URL of the experience builder table used to render the
// basins and stations tables
feature_table_id: "54fb23f96c7446b88c04b5ae5653819b",
// Base url to open the metric trends chart for the state / basin.
trends_base_url:
"https://www.nrcs.usda.gov/Internet/WCIS/AWS_PLOTS/basinCharts/POR",
// Base url to open the precipitation forecast charts for a basin
forecast_base_url:
"https://www.wcc.nrcs.usda.gov/ftpref/support/forecast_charts",
// HTML template for basin attributes
detailTemplates: [
`<div class="demi">Precipitation</div> Precipitation is {label_PREC} at {prec_ytd_curr_per_med}% of median compared to {prec_ytd_ly_per_med}% last year.`,
`<div class="demi margin-top-half">Snow Water Equivalent</div> Snowpack is {label_WTEQ} at {wteq_curr_per_med}% of median compared to {wteq_ly_per_med}% last year.`,
`<div class="demi margin-top-half">Reservoir Capacity</div> The reservoir storage is {label_RESC} at {res_curr_per_med}% of median compared to {res_ly_per_med}% last year.`,
],
metrics: [
{
// Metric name
name: "Precipitation",
// Metric name abbreviation
abvr: "Prec.",
// Metric code
code: "PREC",
// Feature type the metric applies to
featureType: "basins",
// Does the metric map use bivariate layers
show_bivariate_maps: false,
// ArcGIS Online ID of the metric map
map_id: "fd73c7d3e3f444ad962af6b27a824d9c",
// Effects to apply to selected feature
includedEffect: "drop-shadow(0px, 0px, 8px, #000000)",
// Effect to apply to non selected feature
excludedEffect: "opacity(0.75)",
// Effect to apply to all feature when there is no selected feature
baseEffect: "drop-shadow(0px, 0px, 0px) opacity(1)",
// Class breaks used by Map (these are auto updated when the maps load)
classBreaks: [
{
min: 0,
max: 50,
color: { r: 250, g: 239, b: 219, a: 1 },
},
{
min: 50,
max: 70,
color: { r: 219, g: 210, b: 192, a: 1 },
},
{
min: 70,
max: 90,
color: { r: 188, g: 180, b: 166, a: 1 },
},
{
min: 90,
max: 110,
color: { r: 110, g: 141, b: 153, a: 1 },
},
{
min: 110,
max: 130,
color: { r: 46, g: 133, b: 156, a: 1 },
},
{
min: 130,
max: 150,
color: { r: 49, g: 100, b: 117, a: 1 },
},
{
min: 150,
max: 200,
color: { r: 50, g: 83, b: 97, a: 1 },
},
],
charts: [
{
code: "prec_ytd_curr_per_med",
title: "Precipitation % Median ({year} YTD)",
unit: "%",
color: "#4f8191",
secondary_color: "#315361",
range: [0, 100],
threshold: 100,
},
{
code: "prec_mnth_curr_per_med",
title: "Precipitation % Median ({month} {year})",
unit: "%",
color: "#4f8191",
secondary_color: "#315361",
range: [0, 100],
threshold: 100,
},
],
},
{
name: "Snow Water Equivalent",
code: "WTEQ",
abvr: "SWE",
featureType: "basins",
map_id: "dd77a431c3eb4758b10b9665593da357",
includedEffect: "drop-shadow(0px, 0px, 8px, #000000)",
excludedEffect: "opacity(0.75)",
baseEffect: "drop-shadow(0px, 0px, 0px) opacity(1)",
classBreaks: [
{
min: 0,
max: 50,
color: { r: 239, g: 243, b: 255, a: 1 },
},
{
min: 50,
max: 70,
color: { r: 198, g: 219, b: 239, a: 1 },
},
{
min: 70,
max: 90,
color: { r: 158, g: 202, b: 225, a: 1 },
},
{
min: 90,
max: 110,
color: { r: 107, g: 174, b: 214, a: 1 },
},
{
min: 110,
max: 130,
color: { r: 66, g: 146, b: 198, a: 1 },
},
{
min: 130,
max: 150,
color: { r: 33, g: 113, b: 181, a: 1 },
},
{
min: 150,
max: 271.4,
color: { r: 8, g: 69, b: 148, a: 1 },
},
],
charts: [
{
code: "wteq_curr_per_med",
title: "Snow Water Equivalent % Median ({month} {year})",
unit: "%",
color: "#519bcb",
secondary_color: "#09519c",
range: [0, 100],
threshold: 100,
},
{
code: "wteq_ly_per_med",
title: "Snow Water Equivalent % Median ({month} {ly})",
unit: "%",
color: "#519bcb",
secondary_color: "#09519c",
range: [0, 100],
threshold: 100,
},
],
},
{
name: "Reservoir Capacity",
abvr: "Res.",
code: "RESC",
featureType: "reservoirs",
map_id: "467632622ab84b6194e4d186513f3e6b",
includedEffect: "drop-shadow(0px, 0px, 8px, #000000)",
excludedEffect: "opacity(0.75)",
baseEffect: "drop-shadow(0px, 0px, 0px) opacity(1)",
classBreaks: [
{
min: 0,
max: 50,
color: { r: 240, g: 227, b: 211, a: 1 },
},
{
min: 50,
max: 70,
color: { r: 230, g: 210, b: 190, a: 1 },
},
{
min: 70,
max: 90,
color: { r: 219, g: 179, b: 149, a: 1 },
},
{
min: 90,
max: 110,
color: { r: 169, g: 188, b: 204, a: 1 },
},
{
min: 110,
max: 130,
color: { r: 125, g: 154, b: 179, a: 1 },
},
{
min: 130,
max: 150,
color: { r: 96, g: 127, b: 153, a: 1 },
},
{
min: 150,
max: 270,
color: { r: 67, g: 100, b: 128, a: 1 },
},
],
charts: [
{
code: "res_curr_per_med",
title: "Reservoir % Median ({month} {year})",
unit: "%",
color: "#7d9ab3",
secondary_color: "#436480",
range: [0, 100],
threshold: 100,
},
{
code: "res_ly_per_med",
title: "Reservoir % Median ({month} {ly})",
unit: "%",
color: "#7d9ab3",
secondary_color: "#436480",
range: [0, 100],
threshold: 100,
},
],
},
],
};