Preliminary Investigation of Avalanche Features¶
The Utah Avalanche Center has a dataset containing reports of avalanches dating back to 1914. While it isn't comprehensive, I believe it can be used as part of a collection of datasets to predict avalanches. Just so I can get more intimate with this data set, in this notebook, I'll hone in on five attributes that were recorded:
- Region of avalanche
- Day of week of avalanche
- Elevation of avalanche
- Aspect of avalanche
- Month of avalanche
For each of these, I'll look into both the number of deaths, the number of avalanches, and the number of deaths per the number of avalanches to see which levels of these attributes are most dangerous.
import sqlalchemy
sqlalchemy.create_engine('postgresql://john@localhost/avy')
%load_ext sql
%sql postgresql:///avy
1) Region of avalanche¶
There are ten regions included in the dataset: Salt Lake, Provo, Skyline, Uintas, Ogden, Logan, Moab, Abajos, SE Idaho, and Southwest. A fatality has never been recorded in the Abajos region and only one in the SE Idaho region but no coordinates were provided. That's why the Abajos and SE Idaho regions aren't in the legend for the map.
In the following graphic, we can see that most observed avalanches occur in Salt Lake. However, the Salt Lake region has the second lowest number of deaths per avalanche reports: 2.09 per 100 avalanche reports.
At first glance, perhaps the Southwest region looks the most dangerous. But there's only 17 recorded avalanches for the Southwest region, so the sample size is too small to draw firm conclusions in this regard. The Ogden region seems a more likely candidate for the most dangerous region with 5.47 deaths per 100 reported avalanches. That's over twice as many deaths per avalanche reportings as Salt Lake.
%%html
<div class='tableauPlaceholder' id='viz1588781913759' style='position: relative'><noscript><a href='#'><img alt=' ' src='https://public.tableau.com/static/images/Av/AvalancheDangerbyRegion/deathRatio/1_rss.png' style='border: none' /></a></noscript><object class='tableauViz' style='display:none;'><param name='host_url' value='https%3A%2F%2Fpublic.tableau.com%2F' /> <param name='embed_code_version' value='3' /> <param name='site_root' value='' /><param name='name' value='AvalancheDangerbyRegion/deathRatio' /><param name='tabs' value='no' /><param name='toolbar' value='yes' /><param name='static_image' value='https://public.tableau.com/static/images/Av/AvalancheDangerbyRegion/deathRatio/1.png' /> <param name='animate_transition' value='yes' /><param name='display_static_image' value='yes' /><param name='display_spinner' value='yes' /><param name='display_overlay' value='yes' /><param name='display_count' value='yes' /></object></div> <script type='text/javascript'> var divElement = document.getElementById('viz1588781913759'); var vizElement = divElement.getElementsByTagName('object')[0]; if ( divElement.offsetWidth > 800 ) { vizElement.style.minWidth='420px';vizElement.style.maxWidth='850px';vizElement.style.width='100%';vizElement.style.minHeight='587px';vizElement.style.maxHeight='887px';vizElement.style.height=(divElement.offsetWidth*0.75)+'px';} else if ( divElement.offsetWidth > 500 ) { vizElement.style.minWidth='420px';vizElement.style.maxWidth='850px';vizElement.style.width='100%';vizElement.style.minHeight='587px';vizElement.style.maxHeight='887px';vizElement.style.height=(divElement.offsetWidth*0.75)+'px';} else { vizElement.style.width='100%';vizElement.style.height='777px';} var scriptElement = document.createElement('script'); scriptElement.src = 'https://public.tableau.com/javascripts/api/viz_v1.js'; vizElement.parentNode.insertBefore(scriptElement, vizElement); </script>
2) Day of Week of Avalanche¶
Avalanches, of course, occur at the same rate on each day of the week without human activity. But there's increased traffic on the weekends and maybe that causes avalanches to occur more. In the following SQL printouts we can see the breakdown of avalanches by day of the week. Both avalanche observations and fatalities occur more frequently on the weekends. Of note: Tuesday sees the least amount of fatalities by quite a large margin: Only 5.7% of all recorded avalanche fatalities in Utah have happened on Tuesdays.
I didn't include the printout for brevity, but of the 26 avalanche fatalities that have occured since the 2009/2010 season, none have occurred on a Monday or Tuesday.
%%sql
SELECT *
FROM uac
FETCH FIRST 5 ROWS ONLY;
* postgresql:///avy 5 rows affected.
| id | date_ymd | region | depth_in | aspect | elev_ft | deaths | lat | lon |
|---|---|---|---|---|---|---|---|---|
| 0 | 2020-04-04 | Salt Lake | None | S | 10000 | 0 | None | None |
| 1 | 2020-04-03 | Uintas | 36 | NW | 10900 | 0 | 40.708555829 | -110.941507804 |
| 2 | 2020-04-03 | Logan | 12 | NE | 9200 | 0 | 41.891352199 | -111.661283957 |
| 3 | 2020-04-02 | Salt Lake | 0 | NE | 10300 | 0 | 40.588582785 | -111.601479093 |
| 4 | 2020-04-02 | Logan | 12 | E | 9300 | 0 | 41.935838466 | -111.664631354 |
%%sql
SELECT x.day_alpha AS day_of_week, x.avy_count AS avy_count, x.per AS percentage FROM (
SELECT to_char(date_ymd, 'Day') AS day_alpha, date_part('isodow', date_ymd) AS day_numeric,
COUNT(*) AS avy_count, ROUND(100 * COUNT(*) / SUM(COUNT(*)) OVER(), 1) AS per
FROM uac
GROUP BY date_part('isodow', date_ymd), to_char(date_ymd, 'Day')
ORDER BY date_part('isodow', date_ymd)) AS x;
* postgresql:///avy 7 rows affected.
| day_of_week | avy_count | percentage |
|---|---|---|
| Monday | 612 | 12.4 |
| Tuesday | 549 | 11.1 |
| Wednesday | 616 | 12.5 |
| Thursday | 620 | 12.6 |
| Friday | 756 | 15.3 |
| Saturday | 939 | 19.0 |
| Sunday | 844 | 17.1 |
And also, the breakdown of fatalities over the days of the week:
%%sql
SELECT x.day_alpha AS day_of_week, x.fat_count AS fatality_count, x.per AS percentage FROM (
SELECT to_char(date_ymd, 'Day') AS day_alpha, date_part('isodow', date_ymd) AS day_numeric,
COUNT(*) AS fat_count, ROUND(100 * COUNT(*) / SUM(COUNT(*)) OVER(), 1) AS per
FROM uac
WHERE deaths > 0
GROUP BY date_part('isodow', date_ymd), to_char(date_ymd, 'Day')
ORDER BY date_part('isodow', date_ymd)) AS x;
* postgresql:///avy 7 rows affected.
| day_of_week | fatality_count | percentage |
|---|---|---|
| Monday | 10 | 9.4 |
| Tuesday | 6 | 5.7 |
| Wednesday | 10 | 9.4 |
| Thursday | 13 | 12.3 |
| Friday | 18 | 17.0 |
| Saturday | 32 | 30.2 |
| Sunday | 17 | 16.0 |
3) Elevation of avalanche¶
No big surprises here. The first two bar graphs show fatalities across different elevations. I was also curious to see what portion of avalanches at a given elevation occur over the course of the winter. For example, I wondered if avalanches below 7,000 feet only occur in the middle of winter. This seems to be true: if the months April, May, June, October, and November are selected from the legend (ctrl-click to multi-select) then we can see that, proportionally, very few avalanches occur in general but hardly any occur below 7,000 feet.
Also, it's just kinda interesting to mountain nerds that there've only been 8 avalanche reportings above 12,000 ft in Utah. If we look, we see that they're all in the Moab region which means they were in the La Sal mountain range.
%%html
<div class='tableauPlaceholder' id='viz1723740394778' style='position: relative'><noscript><a href='#'><img alt='avy_deathElev ' src='https://public.tableau.com/static/images/Av/AvalancheDangerbyElevation/avy_deathElev/1_rss.png' style='border: none' /></a></noscript><object class='tableauViz' style='display:none;'><param name='host_url' value='https%3A%2F%2Fpublic.tableau.com%2F' /> <param name='embed_code_version' value='3' /> <param name='site_root' value='' /><param name='name' value='AvalancheDangerbyElevation/avy_deathElev' /><param name='tabs' value='no' /><param name='toolbar' value='yes' /><param name='static_image' value='https://public.tableau.com/static/images/Av/AvalancheDangerbyElevation/avy_deathElev/1.png' /> <param name='animate_transition' value='yes' /><param name='display_static_image' value='yes' /><param name='display_spinner' value='yes' /><param name='display_overlay' value='yes' /><param name='display_count' value='yes' /><param name='language' value='en-US' /></object></div> <script type='text/javascript'> var divElement = document.getElementById('viz1723740394778'); var vizElement = divElement.getElementsByTagName('object')[0]; if ( divElement.offsetWidth > 800 ) { vizElement.style.minWidth='420px';vizElement.style.maxWidth='850px';vizElement.style.width='100%';vizElement.style.minHeight='587px';vizElement.style.maxHeight='887px';vizElement.style.height=(divElement.offsetWidth*0.75)+'px';} else if ( divElement.offsetWidth > 500 ) { vizElement.style.minWidth='420px';vizElement.style.maxWidth='850px';vizElement.style.width='100%';vizElement.style.minHeight='587px';vizElement.style.maxHeight='887px';vizElement.style.height=(divElement.offsetWidth*0.75)+'px';} else { vizElement.style.width='100%';vizElement.style.height='977px';} var scriptElement = document.createElement('script'); scriptElement.src = 'https://public.tableau.com/javascripts/api/viz_v1.js'; vizElement.parentNode.insertBefore(scriptElement, vizElement); </script>
%%sql
SELECT *
FROM uac
WHERE elev_ft >= 12000;
* postgresql:///avy 8 rows affected.
| id | date_ymd | region | depth_in | aspect | elev_ft | deaths | lat | lon |
|---|---|---|---|---|---|---|---|---|
| 840 | 2019-01-25 | Moab | 48 | E | 12200 | 1 | 38.456579717 | -109.237081992 |
| 2412 | 2015-01-17 | Moab | 48 | NE | 12100 | 0 | 38.447261052 | -109.263967158 |
| 3008 | 2013-12-07 | Moab | 36 | NE | 12000 | 0 | 38.441432 | -109.261385 |
| 4019 | 2011-02-08 | Moab | None | N | 12200 | 0 | None | None |
| 4098 | 2011-01-11 | Moab | 24 | N | 12200 | 0 | 38.464813 | -109.234486 |
| 4163 | 2010-12-23 | Moab | 48 | N | 12400 | 0 | 38.44001 | -109.229422 |
| 4322 | 2010-03-14 | Moab | 24 | N | 12200 | 0 | 38.440951 | -109.259248 |
| 4485 | 2010-02-20 | Moab | 48 | NE | 12000 | 0 | 38.455807 | -109.239292 |
4) Aspect¶
It's generally known that north and east-facing slopes see less sun, hold more snow, and are a greater avalanche hazard. This can be seen in the following graphic. I was also curious about the distribution of the depth of avalanches across aspects. It does appear that northwest aspects are more dangerous, per avalanche (look at the bottom bar graph) but I don't have an explanation for this.
%%html
<div class='tableauPlaceholder' id='viz1723740646607' style='position: relative'><noscript><a href='#'><img alt='byasp ' src='https://public.tableau.com/static/images/Av/AvalancheDangerbyAspect/byasp/1_rss.png' style='border: none' /></a></noscript><object class='tableauViz' style='display:none;'><param name='host_url' value='https%3A%2F%2Fpublic.tableau.com%2F' /> <param name='embed_code_version' value='3' /> <param name='site_root' value='' /><param name='name' value='AvalancheDangerbyAspect/byasp' /><param name='tabs' value='no' /><param name='toolbar' value='yes' /><param name='static_image' value='https://public.tableau.com/static/images/Av/AvalancheDangerbyAspect/byasp/1.png' /> <param name='animate_transition' value='yes' /><param name='display_static_image' value='yes' /><param name='display_spinner' value='yes' /><param name='display_overlay' value='yes' /><param name='display_count' value='yes' /><param name='language' value='en-US' /></object></div> <script type='text/javascript'> var divElement = document.getElementById('viz1723740646607'); var vizElement = divElement.getElementsByTagName('object')[0]; if ( divElement.offsetWidth > 800 ) { vizElement.style.minWidth='420px';vizElement.style.maxWidth='850px';vizElement.style.width='100%';vizElement.style.minHeight='587px';vizElement.style.maxHeight='887px';vizElement.style.height=(divElement.offsetWidth*0.75)+'px';} else if ( divElement.offsetWidth > 500 ) { vizElement.style.minWidth='420px';vizElement.style.maxWidth='850px';vizElement.style.width='100%';vizElement.style.minHeight='587px';vizElement.style.maxHeight='887px';vizElement.style.height=(divElement.offsetWidth*0.75)+'px';} else { vizElement.style.width='100%';vizElement.style.height='977px';} var scriptElement = document.createElement('script'); scriptElement.src = 'https://public.tableau.com/javascripts/api/viz_v1.js'; vizElement.parentNode.insertBefore(scriptElement, vizElement); </script>
5) Month¶
This attribute also holds no surprises. Everyone knows that avalanches happen between the start of the season and begin to chill out in April. That's what we see here.
%%html
<div class='tableauPlaceholder' id='viz1723740684842' style='position: relative'><noscript><a href='#'><img alt='avy_dangMonth ' src='https://public.tableau.com/static/images/Av/AvalancheDangerbyMonth/avy_dangMonth/1_rss.png' style='border: none' /></a></noscript><object class='tableauViz' style='display:none;'><param name='host_url' value='https%3A%2F%2Fpublic.tableau.com%2F' /> <param name='embed_code_version' value='3' /> <param name='site_root' value='' /><param name='name' value='AvalancheDangerbyMonth/avy_dangMonth' /><param name='tabs' value='no' /><param name='toolbar' value='yes' /><param name='static_image' value='https://public.tableau.com/static/images/Av/AvalancheDangerbyMonth/avy_dangMonth/1.png' /> <param name='animate_transition' value='yes' /><param name='display_static_image' value='yes' /><param name='display_spinner' value='yes' /><param name='display_overlay' value='yes' /><param name='display_count' value='yes' /><param name='language' value='en-US' /></object></div> <script type='text/javascript'> var divElement = document.getElementById('viz1723740684842'); var vizElement = divElement.getElementsByTagName('object')[0]; if ( divElement.offsetWidth > 800 ) { vizElement.style.minWidth='420px';vizElement.style.maxWidth='850px';vizElement.style.width='100%';vizElement.style.minHeight='587px';vizElement.style.maxHeight='887px';vizElement.style.height=(divElement.offsetWidth*0.75)+'px';} else if ( divElement.offsetWidth > 500 ) { vizElement.style.minWidth='420px';vizElement.style.maxWidth='850px';vizElement.style.width='100%';vizElement.style.minHeight='587px';vizElement.style.maxHeight='887px';vizElement.style.height=(divElement.offsetWidth*0.75)+'px';} else { vizElement.style.width='100%';vizElement.style.height='877px';} var scriptElement = document.createElement('script'); scriptElement.src = 'https://public.tableau.com/javascripts/api/viz_v1.js'; vizElement.parentNode.insertBefore(scriptElement, vizElement); </script>