-
Notifications
You must be signed in to change notification settings - Fork 0
/
apiary.apib
803 lines (633 loc) · 29.2 KB
/
apiary.apib
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
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
FORMAT: 1A
# UW-Madison Agricultural Weather Service API
# Group Degree Days
## index [/degree_days]
### List degree days for location [GET /degree_days{?lat,long,start_date,end_date,base,upper,method,units}]
+ Parameters
+ lat: `45.0` (number) - north latitude
+ long: `-90.0` (number) - west longitude
+ start_date: `2020-01-01` (string, optional) - the start date (default: first of year)
+ end_date: `2020-10-10` (string, optional) - end date (default: current date)
+ base: `50` (number, optional) - base temperature, Fahrenheit
+ upper: `86` (number, optional) - upper temperature limit, Fahrenheit
+ method: `sine` (string, optional) - degree day calculation method
+ units: `F` (string, optional) - temperature units (f/F or c/C)
+ Response 200 (application/json; charset=utf-8)
+ Attributes (object)
+ status (string)
+ info (object)
+ lat (number) - latitude of the request
+ long (number) - longitude of the request
+ start_date (string) - start date of the request
+ end_date (string) - end date of the request
+ days_requested (number) - number of days requested
+ days_returned (number) - number of days of data returned
+ base (string) - degree days base temp
+ upper (string, optional) - degree days upper cutoff temp
+ method (string) - degree days calculation method
+ units (string) - temperature units
+ min_value (number, nullable) - min daily degree days
+ max_value (number, nullable) - max daily degree days
+ total (number) - total degree days
+ compute_time (number)
+ data (array)
+ (object, optional)
+ date (string) - observation date
+ min_temp (number) - daily low temp
+ max_temp (number) - daily high temp
+ avg_temp (number) - daily average temp
+ value (number) - daily degree day accumulation
+ cumulative_value (number) - cumulative degree days
### Download as csv [GET /degree_days.csv{?lat,long,args}]
+ Parameters
+ lat: `45.0` (number) - north latitude
+ long: `-90.0` (number) - west longitude
+ args (optional) - other params
+ Response 200 (text/csv)
## dd_table [/degree_days/dd_table]
### List multiple dd models for location [GET /degree_days/dd_table{?lat,long,start_date,end_date,models,units}]
+ Parameters
+ lat: `45.0` (number) - north latitude
+ long: `-90.0` (number) - west longitude
+ start_date: `2020-01-01` (string, optional) - the start date (default: first of year)
+ end_date: `2020-10-10` (string, optional) - end date (default: current date)
+ models: `dd_32,dd_50_86` (string, optional) - degree day models separated by commas
+ units: `F` (string, optional) - temperature units (f/F or c/C)
+ Response 200 (application/json; charset=utf-8)
+ Attributes (object)
+ status (string)
+ info (object)
+ lat (number) - latitude of the request
+ long (number) - longitude of the request
+ start_date (string) - start date of the request
+ end_date (string) - end date of the request
+ days_requested (number) - number of days requested
+ days_returned (number) - number of days of data returned
+ models (array) - degree days models returned
+ units (string) - temperature units
+ data (object)
+ (object, optional)
+ min_temp (number) - daily low temp
+ max_temp (number) - daily high temp
+ dd_32_none (object) - daily degree day accumulation
+ value (number) - daily dd accumulation for this model
+ total (number) - cumulative dds for this model
+ dd_50_86 (object) - cumulative degree days
+ value (number) - daily dd accumulation for this model
+ total (number) - cumulative dds for this model
## grid [/degree_days/grid]
### Return hash grid of values keyed by lat/long [GET /degree_days/grid{?model,base,upper,units,start_date,end_date,lat_range,long_range}]
+ Parameters
+ model: `dd_50` (string, optional) - degree day table column name
+ base: `-90.0` (number, optional) - base degree day threshold
+ upper: `86.0` (number, optional) - upper degree day threshold
+ units: `F` (string, optional) - temperature units (f/F or c/C)
+ start_date: `2020-01-01` (string, optional) - the start date (default: first of year)
+ end_date: `2020-10-10` (string, optional) - end date (default: current date)
+ lat_range: `45.0,50.0` (string, optional) - rescrict latitude range in response
+ long_range: `-90.0,-85.0` (string, optional) - restrict longitude range in response
+ Response 200 (application/json; charset=utf-8)
+ Attributes (object)
+ info (object)
+ status (string) - status of request
+ start_date (string) - start date of the request
+ end_date (string) - end date of the request
+ days_requested (number) - number of days requested
+ grid_points (number) - number of grid points returned
+ model (string) - description of degree day model
+ units (string) - temperature/degree day units
+ min_value (number, nullable) - minimum degree day value across grid
+ max_value (number, nullable) - maximum degree day value across grid
+ compute_time (number)
+ data (object)
## Degree Day map image [GET /degree_days/map{?date}]
Retrieve the map for a given date.
+ Parameters
+ date: `2020-01-01` (string) - the desired date
+ Response 200 (application/json; charset=utf-8)
+ Attributes
+ map: `url/for/map.png` (string)
## Degree Day Info [GET /degree_days/info]
+ Response 200 (application/json; charset=utf-8)
+ Attributes (object)
+ dd_methods (array)
+ lat_range (array)
+ long_range (array)
+ date_range (array)
+ expected_days (number)
+ actual_days (number)
+ missing_days (array)
+ compute_time (number)
# Group Evapotranspirations
## index [/evapotranspirations]
### List evapotranspiration data for point and date range [GET /evapotranspirations{?lat,long,start_date,end_date,units}]
+ Parameters
+ lat: `45.0` (number) - north latitude
+ long: `-90.0` (number) - west longitude
+ start_date: `2020-01-01` (string, optional) - start date, default 1st of year
+ end_date: `2020-10-10` (string, optional) - end date
+ units: `in` (string, optional) - either in or mm
+ Response 200 (application/json; charset=utf-8)
+ Attributes (object)
+ info (object)
+ status (string)
+ lat (number)
+ long (number)
+ start_date (string)
+ end_date (string)
+ days_requested (number)
+ days_returned (number)
+ units (string)
+ min_value (number, nullable)
+ max_value (number, nullable)
+ total (number, nullable)
+ compute_time (number)
+ data (array)
+ (object, optional)
+ date (string)
+ value (number)
+ cumulative_value (number)
### Download csv [GET /evapotranspirations.csv{?lat,long,start_date,end_date,units}]
+ Parameters
+ lat: `45.0` (number) - north latitude
+ long: `-90.0` (number) - west longitude
+ start_date: `2020-01-01` (string) - start date
+ end_date: `2020-10-10` (string, optional) - end date
+ units: `in` (string, optional) - either in or mm
+ Response 200 (text/csv)
## grid [/evaptranspirations/grid]
### Return hash grid of values keyed by lat/long [GET /evapotranspirations/grid{?units,start_date,end_date,lat_range,long_range}]
+ Parameters
+ start_date: `2020-01-01` (string, optional) - the start date (default: first of year)
+ end_date: `2020-10-10` (string, optional) - end date (default: current date)
+ lat_range: `45.0,50.0` (string, optional) - rescrict latitude range in response
+ long_range: `-90.0,-85.0` (string, optional) - restrict longitude range in response
+ units: `in` (string, optional) - either in or mm
+ Response 200 (application/json; charset=utf-8)
+ Attributes (object)
+ info (object)
+ status (string) - status of request
+ start_date (string, optional) - start date of the data
+ end_date (string, optional) - end date of the data
+ date (string, optional) - date of the data (for single day)
+ days_requested (number) - number of days requested
+ days_returned (number) - number of days of data returned
+ grid_points (number) - number of grid points returned
+ units (string) - value units
+ min_value (number, nullable) - minimum value across grid
+ max_value (number, nullable) - maximum value across grid
+ compute_time (number)
+ data (object)
### Return csv of grid [GET /evapotranspirations/grid.csv{?units,start_date,end_date,lat_range,long_range}]
+ Parameters
+ start_date: `2020-01-01` (string, optional) - the start date (default: first of year)
+ end_date: `2020-10-10` (string, optional) - end date (default: current date)
+ lat_range: `45.0,50.0` (string, optional) - rescrict latitude range in response
+ long_range: `-90.0,-85.0` (string, optional) - restrict longitude range in response
+ units: `in` (string, optional) - either in or mm
+ Response 200 (text/csv)
## map [/evapotranspirations/map]
### Get map image url [GET /evapotranspirations/map{?date}]
Retrieve the ET map for a given date.
+ Parameters
+ date: `2020-01-01` (string) - the desired date
+ Response 200 (application/json; charset=utf-8)
+ Attributes (object)
+ info (object)
+ filename: `map.png` (string, nullable)
+ url: `url/for/map.png` (string, nullable)
## Evapotranspiration database info [GET /evapotranspirations/info]
Get parameter ranges available in the database
+ Response 200 (application/json; charset=utf-8)
+ Attributes (object)
+ data_cols (array) - column names in database
+ lat_range (array) - min, max
+ long_range (array) - min, max
+ date_range (array) - min, max
+ expected_days (number)
+ actual_days (number)
+ missing_days (array)
+ compute_time (number)
# Group Insolations
## index [/insolations]
### Get insolation data for point and date range [GET /insolations{?lat,long,start_date,end_date,units}]
+ Parameters
+ lat: `45.0` (number)
+ long: `-90.0` (number)
+ start_date: `2021-01-01`
+ end_date: `2021-10-10`
+ units: `MJ` (string) - units, either MJ or KWh
+ Response 200 (application/json; charset=utf-8)
+ Attributes (object)
+ info (object)
+ status (string) - status of request
+ start_date (string, optional) - start date of the data
+ end_date (string, optional) - end date of the data
+ date (string, optional) - date of the data (for single day)
+ days_requested (number) - number of days requested
+ days_returned (number) - number of days of data returned
+ grid_points (number) - number of grid points returned
+ units (string) - value units
+ min_value (number, nullable) - minimum value across grid
+ max_value (number, nullable) - maximum value across grid
+ compute_time (number)
+ data (array)
+ (object, optional)
+ date (string)
+ value (number)
+ cumulative_value (number)
### Download csv [GET /insolations.csv{?lat,long,start_date,end_date,units}]
+ Parameters
+ lat: `45.0` (number)
+ long: `-90.0` (number)
+ start_date: `2021-01-01`
+ end_date: `2021-10-10`
+ units: `MJ` (string) - units, either MJ or KWh
+ Response 200 (text/csv)
## grid [/insolations/grid]
### Return hash grid of values keyed by lat/long [GET /insolations/grid{?units,start_date,end_date,lat_range,long_range}]
+ Parameters
+ start_date: `2020-01-01` (string, optional) - the start date (default: first of year)
+ end_date: `2020-10-10` (string, optional) - end date (default: current date)
+ lat_range: `45.0,50.0` (string, optional) - rescrict latitude range in response
+ long_range: `-90.0,-85.0` (string, optional) - restrict longitude range in response
+ units: `MJ` (string, optional) - either MJ or KWh
+ Response 200 (application/json; charset=utf-8)
+ Attributes (object)
+ info (object)
+ status (string) - status of request
+ start_date (string, optional) - start date of the data
+ end_date (string, optional) - end date of the data
+ date (string, optional) - date of the data (for single day)
+ days_requested (number) - number of days requested
+ days_returned (number) - number of days of data returned
+ grid_points (number) - number of grid points returned
+ units (string) - value units
+ min_value (number, nullable) - minimum value across grid
+ max_value (number, nullable) - maximum value across grid
+ compute_time (number)
+ data (object)
### Return csv of grid [GET /insolations/grid.csv{?units,start_date,end_date,lat_range,long_range}]
+ Parameters
+ start_date: `2020-01-01` (string, optional) - the start date (default: first of year)
+ end_date: `2020-10-10` (string, optional) - end date (default: current date)
+ lat_range: `45.0,50.0` (string, optional) - rescrict latitude range in response
+ long_range: `-90.0,-85.0` (string, optional) - restrict longitude range in response
+ units: `MJ` (string, optional) - either MJ or KWh
+ Response 200 (text/csv)
## map [/insolations/map]
### Get map image url [GET /insolations/map{?date}]
+ Parameters
+ date: `2020-01-01` (string)
+ Response 200 (application/json; charset=utf-8)
+ Attributes (object)
+ info (object)
+ filename: `map.png` (string, nullable)
+ url: `path/to/map.png` (string, nullable)
## Insolation database info [GET /insolations/info]
+ Response 200 (application/json; charset=utf-8)
+ Attributes (object)
+ data_cols (array) - column names in database
+ lat_range (array) - min, max
+ long_range (array) - min, max
+ date_range (array) - min, max
+ expected_days (number)
+ actual_days (number)
+ missing_days (array)
+ compute_time (number)
# Group Pest Forecasts
## index [/pest_forecasts]
### Get data for point [GET /pest_forecasts{?lat,long,pest,start_date,end_date,units}]
+ Parameters
+ pest: potato_blight_dsv (string) - column name of pest data
+ lat: `45.0` - decimal latitude
+ long: `-89.0` - decimal longitude
+ start_date: `2020-01-01` (string, optional) - defaults to 7 days ago
+ end_date: `2020-10-10` (string, optional) - defaults to today
+ units: `f` (string, optional) - temperature units, either f/F or c/C
+ Response 200 (application/json; charset=utf-8)
+ Attributes (object)
+ info (object)
+ status (string)
+ lat (number)
+ long (number)
+ start_date (string)
+ end_date (string)
+ days_requested (number)
+ days_returned (number)
+ pest (string)
+ units (object)
+ temp (string)
+ min_value (number, nullable)
+ max_value (number, nullable)
+ total (number, nullable)
+ compute_time (number)
+ data (array)
+ (object, optional)
+ date (string)
+ min_temp (number)
+ max_temp (number)
+ avg_temp (number)
+ avg_temp_hi_rh (number, nullable)
+ hours_hi_rh (number)
+ value (number)
+ cumulative_value (number)
### Download csv [GET /pest_forecasts.csv{?lat,long,pest,start_date,end_date,units}]
+ Parameters
+ pest: `potato_blight_dsv` (string) - column name of pest data
+ lat: `45.0` - decimal latitude
+ long: `-89.0` - decimal longitude
+ start_date: `2020-01-01` (string, optional) - defaults to 7 days ago
+ end_date: `2020-10-10` (string, optional) - defaults to today
+ units: `f` (string, optional) - temperature units, either f/F or c/C
+ Response 200 (text/csv)
## grid [/pest_forecasts/grid]
### Return hash grid of values keyed by lat/long [GET /pest_forecasts/grid{?pest,start_date,end_date,lat_range,long_range}]
+ Parameters
+ pest: `potato_blight_dsv` (string) - column name of pest data
+ start_date: `2020-01-01` (string, optional) - the start date (default: first of year)
+ end_date: `2020-10-10` (string, optional) - end date (default: current date)
+ lat_range: `45.0,50.0` (string, optional) - rescrict latitude range in response
+ long_range: `-90.0,-85.0` (string, optional) - restrict longitude range in response
+ Response 200 (application/json; charset=utf-8)
+ Attributes (object)
+ info (object)
+ status (string) - status of request
+ start_date (string, optional) - start date of the data
+ end_date (string, optional) - end date of the data
+ date (string, optional) - date of the data (for single day)
+ days_requested (number) - number of days requested
+ days_returned (number) - number of days of data returned
+ grid_points (number) - number of grid points returned
+ pest (string) - name of data column
+ units (object)
+ temp (string) - weather units
+ min_value (number, nullable) - minimum value across grid
+ max_value (number, nullable) - maximum value across grid
+ compute_time (number)
+ data (object)
### Return csv of grid [GET /pest_forecasts/grid.csv{?pest,start_date,end_date,lat_range,long_range}]
+ Parameters
+ pest: `potato_blight_dsv` (string) - column name of pest data
+ start_date: `2020-01-01` (string, optional) - the start date (default: first of year)
+ end_date: `2020-10-10` (string, optional) - end date (default: current date)
+ lat_range: `45.0,50.0` (string, optional) - rescrict latitude range in response
+ long_range: `-90.0,-85.0` (string, optional) - restrict longitude range in response
+ Response 200 (text/csv)
## map [/pest_forecasts/map]
### Get map image url [GET /pest_forecasts/map{?date}]
+ Parameters
+ date: `2020-01-01` (string)
+ Response 200 (application/json; charset=utf-8)
+ Attributes (object)
+ info (object)
+ filename: `map.png` (string, nullable)
+ url: `path/to/map.png` (string, nullable)
## pvy [/pest_forecasts/pvy]
### Get pvy degree day model [GET /pest_forecasts/pvy{?lat,long,end_date}]
Returns total degree days for pvy model plus one week forecast
+ Parameters
+ lat: `45` (number) - north latitude
+ long: `-90` (number) - west longitude
+ end_date: `2020-10-10` (string, optional) - defaults to today
+ Response 200 (application/json; charset=utf-8)
+ Attributes (object)
+ info (object)
+ model (string)
+ lat (number)
+ long (number)
+ start_date (string)
+ end_date (string)
+ days_requested (number)
+ days_returned (number)
+ status (string)
+ compute_time (number)
+ current_dds (number, nullable)
+ future_dds (number, nullable)
+ data (array)
+ (object, optional)
+ date (string)
+ dd (number)
+ cum_dd (number)
+ forecast (array)
+ (object, optional)
+ date (string)
+ dd (number)
+ cum_dd (number)
## Pest forecast database info [GET /pest_forecasts/info]
+ Response 200 (application/json; charset=utf-8)
+ Attributes (object)
+ pest_names (array) - list available pest names
+ lat_range (array) - min, max
+ long_range (array) - min, max
+ date_range (array) - min, max
+ actual_days (number) - days in database
+ missing_days (array)
+ compute_time (number)
# Group Precipitations
## index [/precips]
### Get precip data for point and date range [GET /precips{?lat,long,start_date,end_date,units}]
+ Parameters
+ lat: `45.0` (number)
+ long: `-90.0` (number)
+ start_date: `2021-01-01`
+ end_date: `2021-10-10`
+ units: `mm` (string, optional) - units, either mm or in
+ Response 200 (application/json; charset=utf-8)
+ Attributes (object)
+ info (object)
+ status (string)
+ lat (number)
+ long (number)
+ start_date (string)
+ end_date (string)
+ days_requested (number)
+ days_returned (number)
+ units (string)
+ min_value (number, nullable)
+ max_value (number, nullable)
+ total (number, nullable)
+ compute_time (number)
+ data (array)
+ (object, optional)
+ date (string)
+ value (number)
+ cumulative_value (number)
### Download csv [GET /precips.csv{?lat,long,start_date,end_date,units}]
+ Parameters
+ lat: `45.0` (number)
+ long: `-90.0` (number)
+ start_date: `2021-01-01`
+ end_date: `2021-10-10`
+ units: `mm` (string, optional) - units, either mm or in
+ Response 200 (text/csv)
## grid [/precips/grid]
### Return hash grid of values keyed by lat/long [GET /precips/grid{?start_date,end_date,lat_range,long_range,units}]
+ Parameters
+ start_date: `2020-01-01` (string, optional) - the start date (default: first of year)
+ end_date: `2020-10-10` (string, optional) - end date (default: current date)
+ lat_range: `45.0,50.0` (string, optional) - rescrict latitude range in response
+ long_range: `-90.0,-85.0` (string, optional) - restrict longitude range in response
+ units: `mm` (string, optional) - units, either mm or in
+ Response 200 (application/json; charset=utf-8)
+ Attributes (object)
+ info (object)
+ status (string) - status of request
+ start_date (string, optional) - start date of the data
+ end_date (string, optional) - end date of the data
+ date (string, optional) - date of the data (for single day)
+ days_requested (number) - number of days requested
+ days_returned (number) - number of days of data returned
+ grid_points (number) - number of grid points returned
+ units (string) - value units
+ min_value (number, nullable) - minimum value across grid
+ max_value (number, nullable) - maximum value across grid
+ compute_time (number)
+ data (object)
### Return csv of grid [GET /precips/grid.csv{?start_date,end_date,lat_range,long_range,units}]
+ Parameters
+ pest: `potato_blight_dsv` (string) - column name of pest data
+ start_date: `2020-01-01` (string, optional) - the start date (default: first of year)
+ end_date: `2020-10-10` (string, optional) - end date (default: current date)
+ lat_range: `45.0,50.0` (string, optional) - rescrict latitude range in response
+ long_range: `-90.0,-85.0` (string, optional) - restrict longitude range in response
+ units: `mm` (string, optional) - units, either mm or in
+ Response 200 (text/csv)
## map [/precips/map]
### Get map image url [GET /precips/map{?date}]
+ Parameters
+ date: `2020-01-01` (string)
+ Response 200 (application/json; charset=utf-8)
+ Attributes (object)
+ info (object)
+ filename: `map.png` (string, nullable)
+ url: `path/to/map.png` (string, nullable)
## Precipitation database info [GET /precips/info]
+ Response 200 (application/json; charset=utf-8)
+ Attributes (object)
+ data_cols (array) - column names in database
+ lat_range (array) - min, max
+ long_range (array) - min, max
+ value_range (array) - min, max
+ date_range (array) - min, max
+ expected_days (number)
+ actual_days (number)
+ missing_days (array)
+ compute_time (number)
# Group Weather
## index [/weather]
### Get precip data for point and date range [GET /weather{?lat,long,start_date,end_date,units}]
+ Parameters
+ lat: `45.0` (number)
+ long: `-90.0` (number)
+ start_date: `2021-01-01`
+ end_date: `2021-10-10`
+ units: `f` (string, optional) - units, either f/F or c/C
+ Response 200 (application/json; charset=utf-8)
+ Attributes (object)
+ info (object)
+ status (string)
+ lat (number)
+ long (number)
+ start_date (string)
+ end_date (string)
+ days_requested (number)
+ days_returned (number)
+ units (object)
+ temp (string)
+ pressure (string)
+ rh (string)
+ compute_time (number)
+ data (array)
+ (object, optional)
+ date (string)
+ min_temp (number)
+ max_temp (number)
+ avg_temp (number)
+ dew_point (number)
+ vapor_pressure (number)
+ min_rh (number)
+ max_rh (number)
+ avg_rh (number)
+ hours_rh_over_90 (number)
+ avg_temp_rh_over_90 (number)
+ frost (boolean)
+ freezing (boolean)
### Download csv [GET /weather.csv{?lat,long,start_date,end_date,units}]
+ Parameters
+ lat: `45.0` (number)
+ long: `-90.0` (number)
+ start_date: `2021-01-01`
+ end_date: `2021-10-10`
+ units: `f` (string, optional) - units, either f/F or c/C
+ Response 200 (text/csv)
## grid [/weather/grid]
### Return hash grid of values keyed by lat/long [GET /weather/grid{?date,lat_range,long_range,units}]
+ Parameters
+ date: `2020-10-10` (string, optional) - default: current date
+ lat_range: `45.0,50.0` (string, optional) - rescrict latitude range in response
+ long_range: `-90.0,-85.0` (string, optional) - restrict longitude range in response
+ units: `f` (string, optional) - units, either f or c
+ Response 200 (application/json; charset=utf-8)
+ Attributes (object)
+ info (object)
+ status (string) - status of request
+ date (string) - date of the data
+ days_requested (number) - number of days requested
+ lat_range (string) - latitude range given
+ long_range (string) - longitude range given
+ grid_points (number) - number of grid points returned
+ units (object)
+ temp (string)
+ pressure (string)
+ rh (string)
+ compute_time (number)
+ data (object)
### Return csv of grid [GET /weather/grid.csv{?start_date,end_date,lat_range,long_range,units}]
+ Parameters
+ date: `2020-10-10` (string, optional) - default: current date
+ lat_range: `45.0,50.0` (string, optional) - rescrict latitude range in response
+ long_range: `-90.0,-85.0` (string, optional) - restrict longitude range in response
+ units: `f` (string, optional) - units, either f or c
+ Response 200 (text/csv)
## grid [/weather/freeze_grid]
### Return hash grid of values keyed by lat/long [GET /weather/freeze_grid{?start_date,end_date,lat_range,long_range}]
+ Parameters
+ start_date: `2020-01-01` (string, optional) - the start date (default: first of year)
+ end_date: `2020-10-10` (string, optional) - end date (default: current date)
+ lat_range: `45.0,50.0` (string, optional) - rescrict latitude range in response
+ long_range: `-90.0,-85.0` (string, optional) - restrict longitude range in response
+ Response 200 (application/json; charset=utf-8)
+ Attributes (object)
+ info (object)
+ status (string) - status of request
+ start_date (string)
+ end_date (string)
+ days_requested (number)
+ lat_range (string)
+ long_range (string)
+ grid_points (number)
+ units (string)
+ compute_time (number)
+ data (object)
## map [/weather/map]
### Get map image url [GET /weather/map{?date}]
+ Parameters
+ date: `2020-01-01` (string)
+ Response 200 (application/json; charset=utf-8)
+ Attributes (object)
+ info (object)
+ filename: `map.png` (string, nullable)
+ url: `path/to/map.png` (string, nullable)
## Weather database info [GET /precips/info]
+ Response 200 (application/json; charset=utf-8)
+ Attributes (object)
+ data_cols (array) - column names in database
+ lat_range (array) - min, max
+ long_range (array) - min, max
+ value_range (array) - min, max
+ date_range (array) - min, max
+ expected_days (number)
+ actual_days (number)
+ missing_days (array)
+ compute_time (number)