API NOAA Reports

From Cumulus Wiki
Revision as of 15:59, 18 October 2020 by Mcrossley (talk | contribs) (Mcrossley moved page API Get Reports to API NOAA Reports without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Back to Cumulus MX Local API

Get Year Reports

The general format of the NOAA Year Report API request is as follows...

http://localhost:8998:/api/reports/noaayear&year=NNNN

Where NNNN is the year requested.

The report is returned as a partial JSON structure. A simple array of strings, each string composed of one line of the report...

[
   "                   Annual Climatological Summary for 2019",
   "",
   "Name: Wilmslow Astro   City: Wilmslow   State: Cheshire, UK",
   "Elevation: 70 m  Lat: N 53 19 32   Lon: W 002 14 33",
   "",
   "                  Temperature (°C), Heat Base: 15.5  Cool Base: 18.3",
   "                          Dep.  Heat  Cool                       Max  Max  Min  Min",
   "        Mean  Mean        From  Deg   Deg                        >=   <=   <=   <=",
   " YR MO  Max   Min   Mean  Norm  Days  Days  Hi  Date  Low  Date 27.0  0.0  0.0 -18.0",
   "------------------------------------------------------------------------------------",
   " 19  1   5.9   1.2   3.8  -0.4   361     0  10.8   7  -3.7   31    0    0   15    0",
   " 19  2  11.6   3.0   7.2   2.7   235     0  20.2  26  -6.1    3    0    0    4    0",
   ... etc
]


Get Month Reports

The general format of the NOAA Month Report API request is as follows...

http://localhost:8998:/api/reports/noaamonth&year=NNNN&month=XX

Where NNNN is the year requested, and XX the month.

The report is returned as a partial JSON structure. A simple array of strings, each string composed of one line of the report...

[
   "                   Monthly Climatological Summary for Jun 2019",
   "",
   "Name: Wilmslow Astro   City: Wilmslow   State: Cheshire, UK",
   "Elevation: 70 m  Lat: N 53 19 32   Lon: W 002 14 33",
   "",
   "                  Temperature (°C), Rain (mm), Wind Speed (mph)",
   "",
   "                                      Heat  Cool        Avg",
   "    Mean                              Deg   Deg         Wind                 Dom",
   "Day Temp  High   Time   Low    Time   Days  Days  Rain  Speed High   Time    Dir",
   "----------------------------------------------------------------------------------",
   "01  17.3  21.7   16:30  13.4   01:51   0.6   0.9   0.0   2.5  14.0   13:07   SSW",
   "02  17.2  20.6   11:18  13.2   23:43   0.4   0.3   4.8   5.7  24.0   16:54   SSW",
   ... etc
]


Regenerate Year Report

The general format of the API request to regenerate a NOAA year report from the data logs is as follows...

http://localhost:8998:/api/genreports?year=NNNN

Where NNNN is the year to regenerate.

Cumulus MX will return the new report in the format described above.

Regenerate Month Reports

The general format of the API request to regenerate a NOAA monthly reports from the data logs is as follows...

http://localhost:8998:/api/genreports/noaamonth&year=NNNN&month=XX

Where NNNN is the year requested, and XX the month.

Cumulus MX will return the new report in the format described above.