We recently finished a large project designing and building a web application to visualize historic weather and snow data for the Bridger-Teton Avalanche Center (BTAC) in Jackson, Wyoming. This unique dataset spans 42 seasons with daily records beginning in the winter of 1974-75. The web application dashboard provides an interface to quickly visualize and search both historic and current data. This project started in November, 2016 and was completed in early June, 2017. Here is a screenshot of the final product, showing the first two panels:

screenshot

The full web app is available here:

http://www.snowpacktracker.com/btac

The page will also be linked to the public BTAC website.

Project Goals

A programming project at the University of Montana in 2014 was the first time I started experimenting with publicly available data from the BTAC and generating graphs for recent snow and weather conditions. The opportunity to build a professional level visualization tool for the BTAC allowed us to explore further tools and build the application out. Our overall project goals included:

  • Display of historic data, searchable to 1974
  • Display of current data with a database connection for automatic daily updates
  • Ability to switch between data sources from various weather station locations
  • Written in Python, using a modern plotting library with high quality visualizations
  • Fast speeds for initial page load and interactive response times
  • Meets needs of avalanche forecasters and other experts, yet is still accessible to the general user


Data Sources

The plots display long-term historical data (or "white sheet" data) from the BTAC. This data comes from weather stations at Jackson Hole Mountain Resort, including the Rendezvous Bowl plot (9,580'), Raymer plot (9,360'), Mid-Mountain plot (8,180'), and Rendezvous Summit (10,450').

Displayed data includes: Avalanche events and crown depth, 24-hr new snow and snow water equivalent (SWE), total snow depth, 24-hr snow settlement, cumulative SWE over multi-day periods, new snow density, 24-hr min and max air temperature, and 24-hr total wind miles. 24-hr new snow and SWE are manually measured each day by BTAC and Jackson Hole Ski Patrol staff. Snow depth, air temperature and wind speed are automated values reported by weather station sensors. New snow density, snow settlement, and cumulative SWE are derived variables calculated from the raw data (see recent publications from ISSW 2016 and The Avalanche Review that use multiday cumulative SWE to analyze avalanche events).

Here is a photo of the Rendezvous Bowl plot at Jackson Hole Mountain Resort (9,580'):

RBowl


Locations of all study plots used in this project:

photo

Technical

We utilized the Bokeh visualization library, which offers high quality interactive plotting in the style of D3.js. Bokeh allows users to write plotting code in Python which is then rendered in a browser via BokehJS, Bokeh's javascript client library. We utilized the Bokeh server to enable user interactions with widgets such as buttons and drop-down menus. Bokeh also provides some very nice built-in tools such as panning, zooming, and a hover tool to display actual data values.

The web application is deployed and hosted on Heroku, using an Amazon S3 bucket as the persistence layer containing the underlying data. To reduce file sizes and achieve faster data read times we store the dataset as a Python pickle (a serialized Python object). We encountered some problems gaining a direct connection to the SQL Server database at Jackson Hole Mountain Resort where the historic data resides. As a solution, we collaborated with BTAC to generate daily e-mails with data updates that are automatically added to the Python pickle and updated on the web app. This solution ended up being a reliable way to achieve daily updates and was a good exercise in using the Google API methods for automatically searching e-mails based on a subject query and downloading attachments.

Fast load speeds and widget interaction response times were achieved by rendering only single seasons at a time. When a user requests a new year or a new location via widget interactions, the Bokeh server is called to build new Column Data Sources for each panel. Although the data interaction is not happening entirely on the client's browser, this solution provides surprisingly fast response times. With each user interaction, a new "slice" of the data is pulled from the underlying pickled data store and rendered in the browser.

An addition of custom HTML/CSS content adds relevant information for the user, and enables javascript to control a spinning wheel indicator for initial page loading.

This project has provided Inversion Labs with a robust toolset that can be extended to any large dataset, with many capabilities for interactive options. We plan to explore additional Python-based plotting tools as well as Javascript plotting libraries as we continue to develop interactive visualization tools. Much thanks to the forecasting staff at BTAC for providing support and feedback throughout the development of this project.