forked from jayantsi/nevadaet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathforms.py
executable file
·341 lines (306 loc) · 9.14 KB
/
forms.py
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
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
#############################################
## CURRENT FORMS BEING USED IN HTML ##
#############################################
#we really should have a global variables like these somewhere that is the start date for each of the products... rather
#than hard coding things like this
import datetime
#============================
# formMask
#============================
formMask=[
('none','No Mask: Show All Values'),
('above','Show Values Below Max'),
('below','Show Values Above Min'),
('exterior','Show Exterior Values'),
('interior','Show Interior Values'),
]
#============================
# formProductType
#============================
formProductType=[
('RS','Remote Sensing'),
('MET','Historical Meteorology'),
('CLIMATE','Climate'),
]
#============================
# formProductType1
#============================
formProductType1=[
('RS','Remote Sensing')
]
#============================
# formSeasons
#============================
formSeasons=[
('wy','Northern Water Year (Oct - Sept)'),
('wy-S','Southern Water Year (Apr - Mar)'),
('gs','Northern Growing Season (Apr - Oct)'),
('gs-S','Southern Growing Season (Nov - Mar)'),
('ANN','Standard Year (Jan-Dec)'),
('DJF','DJF (Dec-Feb)'),
('MAM','MAM (Mar-May)'),
('JJA','JJA (Jun-Aug)'),
('SON','SON (Sept-Nov)'),
('Jan','January'),
('Feb','February'),
('Mar','March'),
('Apr','April'),
('May','May'),
('Jun','June'),
('Jul','July'),
('Aug','August'),
('Sept','September'),
('Oct','October'),
('Nov','November'),
('Dec','December'),
('custom','Custom'),
]
#============================
# formTimePeriods
#Last 15 days, Last 30 days, Last 60 days,Winter, Spring, Summer, Fall, Custom.
#============================
formTimePeriods=[
('all','Entire Period of Record of Dataset'),
('custom','Custom'),
('last15days','Last 15 Days of Data'),
('last30days','Last 30 Days of Data'),
('last60days','Last 60 Days of Data'),
('last90days','Last 90 Days of Data'),
('lastDJF','Last DJF (Dec-Feb)'),
('lastMAM','Last MAM (Mar-May)'),
('lastJJA','Last JJA (Jun-Aug)'),
('lastSON','Last SON (Sept-Nov)'),
('lastANN','Last Year'),
('lastWY','Last Northern Water Year (Oct - Sept)'),
('lastWY-S','Last Southern Water Year (Apr - Mar)'),
('lastGS','Last Northern Growing Season (Apr - Oct)'),
('lastGS-S','Last Southern Growing Season (Nov - Mar)'),
('nwy-todate','Northern Water Year To Date'),
('swy-todate','Southern Water Year To Date'),
('cy-todate','Calendar Year Year To Date'),
]
#============================
# formVariable2Display
#===========================
formVariable2Display = [
('none','One Variable Analysis'),
('two','Two Variable Analysis'),
]
#============================
# formBoolean
#===========================
formBoolean = [
('T','Yes'),
('F','No'),
]
#============================
# formChartType
#============================
formChartType=[
('scatter','Scatter Plot'),
('line','Line Plot'),
('spline','Spline Plot'),
('column','Bar Chart'),
#('areaspline','Transparent Area Plot '), #not transparent for some reason?
('area','Stacked Area Plot '),
]
#============================
# formHighChartLayers
#============================
formHighChartLayers=[
('average','Average'),
#('range','Range: Min to Max'),
('runmean','Running Mean'),
]
#============================
# formHighChartLayersDay
#============================
formHighChartLayersIntraannual=[
('climatology','50% Percentile'),
('percentile_5','5%-95% Percentile Range'),
('percentile_10','10%-90% Percentile Range'),
('percentile_25','25%-75% Percentile Range'),
]
#============================
# formColorbarType
#============================
formColorbarType=[
('continuous','Continuous'),
('discrete','Discrete')
]
#============================
# formAnalysisOptions
#============================
#formAnalysisOptions=[
# ('interannual','Intra-Annual Variability (Within a Single Year)'),
# ('intraannual','Inter-Annual Variability (Between Years)'),
#]
#============================
# formLayers
#============================
formLayers=[
('custommaplayer','Map Layer'),
('states','State boundary'),
#('counties','US Counties'),
#('hucoverlayer','US HUC 8'), //can't get this in fusion tables because it's too big
('divisions','Hydrographic areas'),
('psas','Phreatophyte areas'),
# ('statesb','State boundary'),
# ('divisionsb','Hydrographic areas'),
# ('phreats','Phreatophyte areas'),
('kmloverlayer','URL for .KML/.KMZ'),
('kmloverlayer2','URL for .KML/.KMZ'),
#('combined_nvphreats' 'phreats')
]
#============================
# formLayers1
#============================
'''formLayers1=[
('custommaplayer','Map Layer'),
('statesb','State boundary'), #states
('divisionsb','Hydrographic areas'), #divisions
('phreats','Phreatophyte areas'), #psas
('kmloverlayer','URL for .KML/.KMZ'),
]'''
#============================
# formTimeSeriesCalc
#============================
formTimeSeriesCalc=[
('days','Raw Data over Time Period'),
('interannual','Yearly Summaries of Values Over a Season'),
('intraannual','Raw Values Within a Year Compared to Other Years'),
]
#============================
# formDownloadMapFormat
#============================
formDownloadMapFormat=[
('tif','GEO TIFF'),
]
#============================
# formDownloadProjection
#============================
formDownloadProjection=[
('EPSG:4326','WGS84 for Google Earth'),
('EPSG:3857','Mercator for Google Maps'),
]
#============================
# formSubDomainTypeTS
#============================
formSubDomainTypeTS=[
('points','Points'),
('customShapes','Area Averages'),
]
formFusionTableChoices=[
#('states','State boundary'),
#('counties','Counties'),
#('divisions','Hydrographic areas'),
('psas','Phreatophyte areas'),
('polygon','Custom Polygon'),
('custom','Fusion Table'),
#('phreats','combined_nvphreats')
]
#============================
# formDownloadRegion
#============================
formDownloadRegion=[
('noRegion','No Region Selected'),
('showRect','Rectangular Region'),
#('showFusionTable','Custom Region'), #hasn't been working.. so disabled
]
#============================
# formMonth
#============================
formMonth=[
('1','Jan '),
('2','Feb '),
('3','Mar '),
('4','Apr '),
('5','May '),
('6','Jun '),
('7','Jul '),
('8','Aug '),
('9','Sept '),
('10','Oct '),
('11','Nov '),
('12','Dec '),
]
#============================
# formDay -technically this is a problem.... not all days have 31 days... should restrict with listener on month selected
#============================
formDay=[(str(x),str(x)) for x in range(1,32,1)]
#============================
# formLocation
#============================
#formLocation=[
# ('getMap','Get Map'),
# ('downloadRectangleSubset','Rectangle Subset'),
# ('downloadFusionTableSubset','Fusion Table Subset'),
# ('getTimeSeriesOverDateRange','Points'),
# ('showSingleValueOnMap','Single Map Point'),
#]
#============================
# formOpacity
#============================
formOpacity=[(str(x*0.05),str((1.0-x*0.05)*100)+'%') for x in range(20,-1,-1)]
#============================
# formUnits
#============================
formUnits=[
('metric','Metric (ie. C,mm,m/s,W/m2)'),
('english','English (ie. F,in,mi/hr)'),
]
#============================
# formPaletteMap
#============================
formPaletteSeqMap=[
('Greens','Greens'),
('Blues','Blues'),
('invBlues','invBlues'),
('Oranges','Oranges'),
('Reds','Reds'),
('YlGn','Yellow-Green'),
('GnBu','Green-Blue'),
('BuGn','Blue-Green'),
('PuBuGn','Purple-Blue-Green'),
('PuBu','Purple-Blue'),
('BuPu','Blue-Purple'),
('RdPu','Red-Purple'),
('PuRd','Purple-Red'),
('OrRd','Orange-Red'),
('YlOrRd','Yellow-Orange-Red'),
('YlOrBr','Yellow-Orange-Brown'),
('YlGnBu','Yellow-Green-Blue'),
('PuBuGn','Purple-Blue-Green'),
('Purples','Purples'),
('Greys','Greys'),
('invGreys','invGreys'),
]
formPaletteDivMap=[
('RdBu','Red-Blue'),
('BuRd','Blue-Red'),
('RdYlBu','Red-Yellow-Blue'),
('BuYlRd','Blue-Yellow-Red'),
('RdYlGn','Red-Yellow-Green'),
('PuOr','Purple-Orange'),
('BrBG','Brown-Blue-Green'),
('GBBr','Green-Blue-Brown'),
('PRGn','PR-Green'),
('PiYG','Pi-YG'),
('RdGy','Red-Grey'),
('invRdGy','Grey-Red'),
('Spectral','Spectral'),
]
formPaletteCustomMap=[
#('USDM','USDM White-Red'), #don't have 11 colors for these.. so deleting these off
#('invUSDM','USDM Red-White'),
('USDMwWet','USDM Blue-White-Red'),
('invUSDMwWet','USDM Red-White-Blue'),
]
#============================
# formPaletteSize -only 3 to 11 colors are defined in the palette
#============================
formPaletteSize=[(str(x),str(x)) for x in range(3,12,1)]
#============================
# formMapZoom
#============================
formMapZoom=[(str(x),str(x)) for x in range(1,20,1)]