Sign Up for the Utah Snow and Avalanche Workshop (USAW) on December 7th!
Ad

Forecast JSON

Getting the data
Users interested in getting the raw data for the daily forecast should GET the following endpoint: https://utahavalanchecenter.org/forecast/[region]/json
where [region] is one of:
logan, ogden, uintas, salt-lake, provo, skyline, moab, abajos, southwest
Configuring your software
You will need to configure the User Agent string in your script/application. If you're using "off-the-shelf" tools like wget, curl or standard libraries for PHP, Python, Perl, etc. you may find your queries are being blocked or return a 400 HTTP status code. We recommend setting your User Agent string to something logical that includes a contact email address, a URL back to your site, and/or a product identifier.

Please keep the number of queries to a sane amount. Forecasts are generally issued daily between 5 and 8 AM. It's extremely rare for a forecast to be updated after it's been published. This means you don't need to hit the JSON endpoint every 5 seconds. Instead, we recommend every 15 minutes between 5 and 8 AM or until the forecast has been issued for that day.

Making sense of the data
The output is an array of all forecast fields including danger roses. While most field values should be obvious, decoding the values for the danger rose requires a brief explanation.

Each element of the rose array corresponds to a position on the rose, starting from the highest elevation, northern aspect and proceeds clockwise. The first position of the array, array[0] is the inner-most (highest) elevation segment on the N aspect. The next position, array[1] is NE and so on. Ex. the position for S aspect at the lowest elevation is array[20].

The value of each element corresponds to the danger rating scale.
  • 0 = No rating
  • 1 = Pockets of low danger
  • 2 = Low danger
  • 3 = Pockets of moderate danger
  • 4 = Moderate danger
  • 5 = Pockets of considerable danger
  • 6 = Considerable danger
  • 7 = Pockets of high danger
  • 8 = High danger
  • 9 = Pockets of extreme danger
  • 10 = Extreme danger
*Note: this only applies to 'overall_danger_rose'; the value ranges used in 'danger_rose_1', 'danger_rose_2' and 'danger_rose_3' changed for the 2018/19 season. The value is only used to indicate the location of the avalanche problem, the value itself is irrelevant.

To further illustrate the danger rose and values, use the following danger rose and corresponding 'overall_danger_rose' array as an example.

array(6,6,6,6,6,6,6,6,4,4,4,4,4,4,4,4,4,4,4,2,2,2,4,4)