Analysis of surface hoar as an avalanche problem in Norway


In [13]:
# imports
import numpy as np
import pandas as pd
#import geopandas as gpd

import plotly.io as pio
import plotly.graph_objects as go
import plotly.express as px
pio.templates.default = "plotly_white"

In [29]:
s1617 = pd.read_csv(r'./data/norwegian_avalanche_warnings_season_16_17.csv', sep=";", header=0)
s1617['season'] = '2016/2017'
s1718 = pd.read_csv(r'./data/norwegian_avalanche_warnings_season_17_18.csv', sep=";", header=0)
s1819 = pd.read_csv(r'./data/norwegian_avalanche_warnings_season_18_19.csv', sep=";", header=0)

s1819


Out[29]:
index reg_id region_id region_name date_valid region_type_id region_type_name utm_east utm_north utm_zone ... avalanche_problem_3_probability_name avalanche_problem_3_trigger_simple_id avalanche_problem_3_trigger_simple_name avalanche_problem_3_distribution_id avalanche_problem_3_distribution_name avalanche_problem_3_exposed_height_fill avalanche_problem_3_exposed_height_1 avalanche_problem_3_exposed_height_2 avalanche_problem_3_valid_expositions avalanche_problem_3_advice
0 0 169485 3003 Nordenskiöld Land 2018-11-30 10 A 520332 8663904 33 ... Not given 0 Not given 0 Not given 0 0 0 0 Not given
1 1 169531 3003 Nordenskiöld Land 2018-12-01 10 A 520332 8663904 33 ... Not given 0 Not given 0 Not given 0 0 0 0 Not given
2 2 169419 3007 Vest-Finnmark 2018-12-01 10 A 802123 7794717 33 ... Not given 0 Not given 0 Not given 0 0 0 0 Not given
3 3 169439 3009 Nord-Troms 2018-12-01 10 A 750984 7742562 33 ... Not given 0 Not given 0 Not given 0 0 0 0 Not given
4 4 169620 3010 Lyngen 2018-12-01 10 A 692056 7719872 33 ... Not given 0 Not given 0 Not given 0 0 0 0 Not given
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
3952 3952 195949 3031 Voss 2019-05-31 10 A 28607 6779054 33 ... Not given 0 Not given 0 Not given 0 0 0 0 Not given
3953 3953 195950 3032 Hallingdal 2019-05-31 10 A 150188 6763814 33 ... Not given 0 Not given 0 Not given 0 0 0 0 Not given
3954 3954 195951 3034 Hardanger 2019-05-31 10 A 62473 6692016 33 ... Not given 0 Not given 0 Not given 0 0 0 0 Not given
3955 3955 195952 3035 Vest-Telemark 2019-05-31 10 A 131223 6642571 33 ... Not given 0 Not given 0 Not given 0 0 0 0 Not given
3956 3956 195953 3037 Heiane 2019-05-31 10 A 46852 6517179 33 ... Not given 0 Not given 0 Not given 0 0 0 0 Not given

3957 rows × 103 columns


In [37]:
ap_count1617 = s1617.groupby('avalanche_problem_1_cause_name').count()['index']
print(ap_count1617)
ap_count1718 = (s1718.groupby('avalanche_problem_1_cause_name').count())['index']
print(ap_count1718)
ap_count1819 = (s1819.groupby('avalanche_problem_1_cause_name').count())['index']
print(ap_count1819)


avalanche_problem_1_cause_name
Dårlig binding mellom glatt skare og overliggende snø     157
Dårlig binding mellom lag i fokksnøen                     528
Kantkornet snø over skarelag                              213
Kantkornet snø under skarelag                              26
Kantkornet snø ved bakken                                   1
Nedføyket svakt lag med nysnø                            2026
Nedsnødd eller nedføyket kantkornet snø                   128
Nedsnødd eller nedføyket overflaterim                      48
Not given                                                  21
Opphopning av vann i/over lag i snødekket                 206
Ubunden snø                                               392
Vann ved bakken/smelting fra bakken                        97
Name: index, dtype: int64
avalanche_problem_1_cause_name
Dårlig binding mellom glatt skare og overliggende snø     104
Dårlig binding mellom lag i fokksnøen                     534
Kantkornet snø over skarelag                               73
Kantkornet snø under skarelag                             379
Kantkornet snø ved bakken                                  16
Nedføyket svakt lag med nysnø                            1531
Nedsnødd eller nedføyket kantkornet snø                   334
Nedsnødd eller nedføyket overflaterim                     117
Not given                                                  29
Opphopning av vann i/over lag i snødekket                  87
Ubunden snø                                               664
Vann ved bakken/smelting fra bakken                        14
Name: index, dtype: int64
avalanche_problem_1_cause_name
Dårlig binding mellom glatt skare og overliggende snø      59
Dårlig binding mellom lag i fokksnøen                     576
Kantkornet snø over skarelag                              165
Kantkornet snø under skarelag                              44
Nedføyket svakt lag med nysnø                            1875
Nedsnødd eller nedføyket kantkornet snø                   179
Nedsnødd eller nedføyket overflaterim                      36
Not given                                                  29
Opphopning av vann i/over lag i snødekket                 170
Ubunden snø                                               816
Vann ved bakken/smelting fra bakken                         8
Name: index, dtype: int64

In [30]:
c_filter = ['avalanche_danger', 'avalanche_problem_1_cause_id', 'avalanche_problem_1_cause_name', 'avalanche_problem_2_cause_id', 'avalanche_problem_2_cause_name', 'avalanche_problem_3_cause_id', 'avalanche_problem_3_cause_name', 'region_id', 'region_name']

ap_df = pd.concat([s1617.filter(c_filter), s1718.filter(c_filter), s1819.filter(c_filter)], ignore_index=True)


Out[30]:
avalanche_danger avalanche_problem_1_cause_id avalanche_problem_1_cause_name avalanche_problem_2_cause_id avalanche_problem_2_cause_name avalanche_problem_3_cause_id avalanche_problem_3_cause_name region_id region_name
0 Natt til fredag ventes intense snøfall over 60... 10 Nedføyket svakt lag med nysnø 24 Ubunden snø 0 Not given 3022 Trollheimen
1 Natt til fredag ventes intense snøfall over 60... 10 Nedføyket svakt lag med nysnø 24 Ubunden snø 0 Not given 3023 Romsdal
2 Natt til fredag ventes intense snøfall over 60... 10 Nedføyket svakt lag med nysnø 24 Ubunden snø 0 Not given 3024 Sunnmøre
3 Natt til fredag ventes intense snøfall over 60... 10 Nedføyket svakt lag med nysnø 24 Ubunden snø 0 Not given 3027 Indre Fjordane
4 Natt til fredag ventes intense snøfall over 60... 10 Nedføyket svakt lag med nysnø 24 Ubunden snø 0 Not given 3029 Indre Sogn
... ... ... ... ... ... ... ... ... ...
3838 Det er framleis mogelegheiter for at det kan l... 20 Vann ved bakken/smelting fra bakken 0 Not given 0 Not given 3029 Indre Sogn
3839 Varme og sol vil gi fortsatt god snøsmelting. ... 24 Ubunden snø 20 Vann ved bakken/smelting fra bakken 0 Not given 3031 Voss
3840 Generelt stabile forhold. Smeltevatn nede i sn... 20 Vann ved bakken/smelting fra bakken 0 Not given 0 Not given 3032 Hallingdal
3841 Det er framleis mogelegheiter for at det kan l... 20 Vann ved bakken/smelting fra bakken 24 Ubunden snø 0 Not given 3034 Hardanger
3842 Generelt stabile forhold. Smeltevatn nede i sn... 20 Vann ved bakken/smelting fra bakken 0 Not given 0 Not given 3035 Vest-Telemark

3843 rows × 9 columns


In [ ]:


In [38]:
# setting up a plot.ly figure
fig = go.Figure()

# avalprob_1 = {
#     "type:": "bar",
#     # "mode": "lines",
#     "name": "Avalanche problem frequency",
#     # "line": {"color": c_topo},
#     # "fill": "tozeroy",
#     "x": df['M'],
#     "y": df['Z']
# }

fig.add_trace(go.Histogram(histfunc="count",  x=ap_df['avalanche_problem_1_cause_name'], name="Main"))
fig.add_trace(go.Histogram(histfunc="count",  x=ap_df['avalanche_problem_2_cause_name'], name="Secondary"))
# fig.add_trace(avalprob_1)

p_layout = {"title": {"text": "Avalanche problems 2016-2019"},
            "showlegend": True, "legend": {"orientation": "v"},
            "barmode": "stack"
            # "xaxis": {"rangemode": "nonnegative"},
            # "yaxis": {"rangemode": "nonnegative"}
           }

fig.update_layout(p_layout)
# fig.write_image("ap_16_19.png")
pio.show(fig)


---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-38-95f4c3f07bf0> in <module>
     24 
     25 fig.update_layout(p_layout)
---> 26 fig.write_image("ap_16_19.png")
     27 pio.show(fig)
     28 

C:\ProgramData\Anaconda3\envs\scientific\lib\site-packages\plotly\basedatatypes.py in write_image(self, *args, **kwargs)
   2822         import plotly.io as pio
   2823 
-> 2824         return pio.write_image(self, *args, **kwargs)
   2825 
   2826     # Static helpers

C:\ProgramData\Anaconda3\envs\scientific\lib\site-packages\plotly\io\_orca.py in write_image(fig, file, format, scale, width, height, validate)
   1764     # -------------
   1765     # Do this first so we don't create a file if image conversion fails
-> 1766     img_data = to_image(
   1767         fig, format=format, scale=scale, width=width, height=height, validate=validate
   1768     )

C:\ProgramData\Anaconda3\envs\scientific\lib\site-packages\plotly\io\_orca.py in to_image(fig, format, width, height, scale, validate)
   1530     # Make sure orca sever is running
   1531     # -------------------------------
-> 1532     ensure_server()
   1533 
   1534     # Handle defaults

C:\ProgramData\Anaconda3\envs\scientific\lib\site-packages\plotly\io\_orca.py in ensure_server()
   1359     # Validate psutil
   1360     if psutil is None:
-> 1361         raise ValueError(
   1362             """\
   1363 Image generation requires the psutil package.

ValueError: Image generation requires the psutil package.

Install using pip:
    $ pip install psutil

Install using conda:
    $ conda install psutil

In [54]:
# s1819[s1819['avalanche_problem_1_cause_name']=='Nedsnødd eller nedføyket overflaterim']['avalanche_problem_1_cause_id']

sh_df1617 = s1617[s1617['avalanche_problem_1_cause_id']==11].copy()
sh_df1617['occurrence'] = 1
sh_df1617


Out[54]:
index reg_id region_id region_name date_valid region_type_id region_type_name utm_east utm_north utm_zone ... avalanche_problem_3_trigger_simple_id avalanche_problem_3_trigger_simple_name avalanche_problem_3_distribution_id avalanche_problem_3_distribution_name avalanche_problem_3_exposed_height_fill avalanche_problem_3_exposed_height_1 avalanche_problem_3_exposed_height_2 avalanche_problem_3_valid_expositions avalanche_problem_3_advice occurrence
999 999 110640 3003 Nordenskiöld Land 2017-01-17 10 A 520332 8663904 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
1015 1015 110656 3029 Indre Sogn 2017-01-17 10 A 96001 6816985 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
1016 1016 110657 3031 Voss 2017-01-17 10 A 28607 6779054 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
1018 1018 110659 3034 Hardanger 2017-01-17 10 A 62473 6692016 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
1020 1020 110797 3003 Nordenskiöld Land 2017-01-18 10 A 520332 8663904 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
1036 1036 110813 3029 Indre Sogn 2017-01-18 10 A 96001 6816985 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
1037 1037 110843 3031 Voss 2017-01-18 10 A 28607 6779054 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
1039 1039 110869 3034 Hardanger 2017-01-18 10 A 62473 6692016 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
1041 1041 110946 3003 Nordenskiöld Land 2017-01-19 10 A 520332 8663904 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
1057 1057 110962 3029 Indre Sogn 2017-01-19 10 A 96001 6816985 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
1534 1534 114209 3014 Lofoten og Vesterålen 2017-02-11 10 A 527125 7620981 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
1535 1535 114210 3015 Ofoten 2017-02-11 10 A 602309 7578309 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
1536 1536 114360 3016 Salten 2017-02-11 10 A 533221 7497029 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
1537 1537 114212 3017 Svartisen 2017-02-11 10 A 464133 7381882 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
1549 1549 114379 3007 Vest-Finnmark 2017-02-12 10 A 802123 7794717 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
1550 1550 114333 3009 Nord-Troms 2017-02-12 10 A 750984 7742562 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
1551 1551 114394 3010 Lyngen 2017-02-12 10 A 692056 7719872 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
1552 1552 114400 3011 Tromsø 2017-02-12 10 A 656496 7764237 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
1570 1570 114524 3007 Vest-Finnmark 2017-02-13 10 A 802123 7794717 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
1571 1571 114475 3009 Nord-Troms 2017-02-13 10 A 750984 7742562 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
1572 1572 114527 3010 Lyngen 2017-02-13 10 A 692056 7719872 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
1573 1573 114529 3011 Tromsø 2017-02-13 10 A 656496 7764237 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
1576 1576 114480 3014 Lofoten og Vesterålen 2017-02-13 10 A 527125 7620981 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
1597 1597 114576 3014 Lofoten og Vesterålen 2017-02-14 10 A 527125 7620981 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
2085 2085 118065 3015 Ofoten 2017-03-09 10 A 602309 7578309 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
2197 2197 119018 3028 Jotunheimen 2017-03-14 10 A 155607 6844417 33 ... 10 Stor tilleggsbelastning 2 Noen bratte heng 1 1000 0 1110000 Unngå ferdsel i skredterreng og i utløpsområde... 1
2218 2218 119047 3028 Jotunheimen 2017-03-15 10 A 155607 6844417 33 ... 10 Stor tilleggsbelastning 2 Noen bratte heng 1 900 0 1110000 Unngå ferdsel i skredterreng og i utløpsområde... 1
2239 2239 119214 3028 Jotunheimen 2017-03-16 10 A 155607 6844417 33 ... 21 Liten tilleggsbelastning 3 Mange bratte heng 1 900 0 1110000 Unngå bratte heng og terrengfeller under og et... 1
2260 2260 119531 3028 Jotunheimen 2017-03-17 10 A 155607 6844417 33 ... 21 Liten tilleggsbelastning 2 Noen bratte heng 1 1200 0 1110000 Unngå ferdsel i skredterreng og i utløpsområde... 1
2302 2302 119964 3028 Jotunheimen 2017-03-19 10 A 155607 6844417 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
2323 2323 119974 3028 Jotunheimen 2017-03-20 10 A 155607 6844417 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
2344 2344 120079 3028 Jotunheimen 2017-03-21 10 A 155607 6844417 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
2366 2366 120242 3028 Jotunheimen 2017-03-22 10 A 155607 6844417 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
3150 3150 126069 3003 Nordenskiöld Land 2017-04-29 10 A 520332 8663904 33 ... 10 Stor tilleggsbelastning 2 Noen bratte heng 1 0 0 11111111 Unngå ferdsel i skredterreng og i utløpsområde... 1
3171 3171 126067 3003 Nordenskiöld Land 2017-04-30 10 A 520332 8663904 33 ... 10 Stor tilleggsbelastning 2 Noen bratte heng 1 0 0 11111111 Unngå ferdsel i skredterreng og i utløpsområde... 1
3192 3192 126100 3003 Nordenskiöld Land 2017-05-01 10 A 520332 8663904 33 ... 10 Stor tilleggsbelastning 2 Noen bratte heng 1 0 0 11111111 Unngå ferdsel i skredterreng og i utløpsområde... 1
3213 3213 126223 3003 Nordenskiöld Land 2017-05-02 10 A 520332 8663904 33 ... 10 Stor tilleggsbelastning 2 Noen bratte heng 1 0 0 11111111 Hold god avstand til hverandre ved ferdsel i s... 1
3234 3234 126314 3003 Nordenskiöld Land 2017-05-03 10 A 520332 8663904 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
3255 3255 126404 3003 Nordenskiöld Land 2017-05-04 10 A 520332 8663904 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
3276 3276 126499 3003 Nordenskiöld Land 2017-05-05 10 A 520332 8663904 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
3297 3297 126602 3003 Nordenskiöld Land 2017-05-06 10 A 520332 8663904 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
3318 3318 126806 3003 Nordenskiöld Land 2017-05-07 10 A 520332 8663904 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
3339 3339 126887 3003 Nordenskiöld Land 2017-05-08 10 A 520332 8663904 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
3360 3360 126973 3003 Nordenskiöld Land 2017-05-09 10 A 520332 8663904 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
3381 3381 127062 3003 Nordenskiöld Land 2017-05-10 10 A 520332 8663904 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
3528 3528 127800 3003 Nordenskiöld Land 2017-05-17 10 A 520332 8663904 33 ... 21 Liten tilleggsbelastning 2 Noen bratte heng 1 200 0 11111000 Vær forsiktig i områder brattere enn 30 grader... 1
3549 3549 127832 3003 Nordenskiöld Land 2017-05-18 10 A 520332 8663904 33 ... 21 Liten tilleggsbelastning 2 Noen bratte heng 1 200 0 11111000 Vær forsiktig i områder brattere enn 30 grader... 1
3570 3570 127845 3003 Nordenskiöld Land 2017-05-19 10 A 520332 8663904 33 ... 21 Liten tilleggsbelastning 2 Noen bratte heng 1 200 0 11111000 Vær forsiktig i områder brattere enn 30 grader... 1

48 rows × 104 columns


In [55]:
# setting up a plot.ly figure
fig = go.Figure()

avalprob_1 = {
    "type": "bar",
    "name": "Avalanche problem frequency",
    # "line": {"color": c_topo},
    # "fill": "tozeroy",
    "x": sh_df1617['date_valid'],
    "y": sh_df1617['occurrence']
}

fig.add_trace(avalprob_1)

p_layout = {"title": {"text": "Surface hoar 2016-2017"},
            "showlegend": False, "legend": {"orientation": "h"},
            # "xaxis": {"rangemode": "nonnegative"},
            "yaxis": {"title": "#Regions with SH problem"}
           }

fig.update_layout(p_layout)
# fig.write_image("ap_16_19.png")
pio.show(fig)



In [ ]:


In [56]:
# s1718[s1718['avalanche_problem_1_cause_name']=='Nedsnødd eller nedføyket overflaterim']['avalanche_problem_1_cause_id']

sh_df1718 = s1718[s1718['avalanche_problem_1_cause_id']==11].copy()
sh_df1718['occurrence'] = 1
sh_df1718


Out[56]:
index reg_id region_id region_name date_valid region_type_id region_type_name utm_east utm_north utm_zone ... avalanche_problem_3_trigger_simple_id avalanche_problem_3_trigger_simple_name avalanche_problem_3_distribution_id avalanche_problem_3_distribution_name avalanche_problem_3_exposed_height_fill avalanche_problem_3_exposed_height_1 avalanche_problem_3_exposed_height_2 avalanche_problem_3_valid_expositions avalanche_problem_3_advice occurrence
45 45 133407 3022 Trollheimen 2017-12-02 10 A 210810 6991060 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
46 46 133408 3023 Romsdal 2017-12-02 10 A 123434 6960580 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
47 47 133409 3024 Sunnmøre 2017-12-02 10 A 62473 6916553 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
48 48 133410 3027 Indre Fjordane 2017-12-02 10 A 34025 6868801 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
51 51 133413 3031 Voss 2017-12-02 10 A 28607 6779054 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
2242 2242 150321 3032 Hallingdal 2018-03-15 10 A 150188 6763814 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
2249 2249 150520 3011 Tromsø 2018-03-16 10 A 656496 7764237 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
2255 2255 150526 3017 Svartisen 2018-03-16 10 A 464133 7381882 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
2263 2263 150534 3032 Hallingdal 2018-03-16 10 A 150188 6763814 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
3016 3016 160403 3003 Nordenskiöld Land 2018-04-21 10 A 520332 8663904 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1

117 rows × 104 columns


In [57]:
# setting up a plot.ly figure
fig = go.Figure()

avalprob_1 = {
    "type": "bar",
    "name": "Avalanche problem frequency",
    # "line": {"color": c_topo},
    # "fill": "tozeroy",
    "x": sh_df1718['date_valid'],
    "y": sh_df1718['occurrence']
}

fig.add_trace(avalprob_1)

p_layout = {"title": {"text": "Surface hoar 2017-2018"},
            "showlegend": False, "legend": {"orientation": "h"},
            # "xaxis": {"rangemode": "nonnegative"},
            "yaxis": {"title": "#Regions with SH problem"}
           }

fig.update_layout(p_layout)
# fig.write_image("ap_16_19.png")
pio.show(fig)



In [ ]:


In [52]:
# s1819[s1819['avalanche_problem_1_cause_name']=='Nedsnødd eller nedføyket overflaterim']['avalanche_problem_1_cause_id']

sh_df1819 = s1819[s1819['avalanche_problem_1_cause_id']==11].copy()
sh_df1819['occurrence'] = 1
sh_df1819


Out[52]:
index reg_id region_id region_name date_valid region_type_id region_type_name utm_east utm_north utm_zone ... avalanche_problem_3_trigger_simple_id avalanche_problem_3_trigger_simple_name avalanche_problem_3_distribution_id avalanche_problem_3_distribution_name avalanche_problem_3_exposed_height_fill avalanche_problem_3_exposed_height_1 avalanche_problem_3_exposed_height_2 avalanche_problem_3_valid_expositions avalanche_problem_3_advice occurrence
58 58 169768 3028 Jotunheimen 2018-12-03 10 A 155607 6844417 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
79 79 169893 3028 Jotunheimen 2018-12-04 10 A 155607 6844417 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
311 311 171335 3029 Indre Sogn 2018-12-15 10 A 96001 6816985 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
332 332 171434 3029 Indre Sogn 2018-12-16 10 A 96001 6816985 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
353 353 171558 3029 Indre Sogn 2018-12-17 10 A 96001 6816985 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
374 374 171662 3029 Indre Sogn 2018-12-18 10 A 96001 6816985 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
395 395 171780 3029 Indre Sogn 2018-12-19 10 A 96001 6816985 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
418 418 171924 3032 Hallingdal 2018-12-20 10 A 150188 6763814 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
460 460 172166 3032 Hallingdal 2018-12-22 10 A 150188 6763814 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
480 480 172270 3031 Voss 2018-12-23 10 A 28607 6779054 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
481 481 172271 3032 Hallingdal 2018-12-23 10 A 150188 6763814 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
1011 1011 175853 3017 Svartisen 2019-01-17 10 A 464133 7381882 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
1032 1032 176049 3017 Svartisen 2019-01-18 10 A 464133 7381882 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
1053 1053 176252 3017 Svartisen 2019-01-19 10 A 464133 7381882 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
1308 1308 178300 3024 Sunnmøre 2019-01-31 10 A 62473 6916553 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
1327 1327 178469 3022 Trollheimen 2019-02-01 10 A 210810 6991060 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
1328 1328 178470 3023 Romsdal 2019-02-01 10 A 123434 6960580 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
1329 1329 178471 3024 Sunnmøre 2019-02-01 10 A 62473 6916553 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
1348 1348 178631 3022 Trollheimen 2019-02-02 10 A 210810 6991060 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
1349 1349 178632 3023 Romsdal 2019-02-02 10 A 123434 6960580 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
1350 1350 178633 3024 Sunnmøre 2019-02-02 10 A 62473 6916553 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
1370 1370 178767 3023 Romsdal 2019-02-03 10 A 123434 6960580 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
1371 1371 178768 3024 Sunnmøre 2019-02-03 10 A 62473 6916553 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
1670 1670 181299 3022 Trollheimen 2019-02-17 10 A 210810 6991060 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
1692 1692 181457 3022 Trollheimen 2019-02-18 10 A 210810 6991060 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
2113 2113 185033 3023 Romsdal 2019-03-09 10 A 123434 6960580 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
2222 2222 185871 3022 Trollheimen 2019-03-14 10 A 210810 6991060 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
2838 2838 190548 3010 Lyngen 2019-04-11 10 A 692056 7719872 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
2839 2839 190549 3011 Tromsø 2019-04-11 10 A 656496 7764237 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
2840 2840 190550 3012 Sør-Troms 2019-04-11 10 A 594858 7642656 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
2860 2860 190702 3010 Lyngen 2019-04-12 10 A 692056 7719872 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
2861 2861 190703 3011 Tromsø 2019-04-12 10 A 656496 7764237 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
2862 2862 190704 3012 Sør-Troms 2019-04-12 10 A 594858 7642656 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
2882 2882 190863 3010 Lyngen 2019-04-13 10 A 692056 7719872 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
2884 2884 190865 3012 Sør-Troms 2019-04-13 10 A 594858 7642656 33 ... 0 Not given 0 Not given 0 0 0 0 Not given 1
2904 2904 191004 3010 Lyngen 2019-04-14 10 A 692056 7719872 33 ... 22 Naturlig utløst 1 Få bratte heng 1 400 400 11111111 Hold god avstand til hverandre ved ferdsel i s... 1

36 rows × 104 columns


In [53]:
# setting up a plot.ly figure
fig = go.Figure()

avalprob_1 = {
    "type": "bar",
    "name": "Avalanche problem frequency",
    # "line": {"color": c_topo},
    # "fill": "tozeroy",
    "x": sh_df1819['date_valid'],
    "y": sh_df1819['occurrence']
}

fig.add_trace(avalprob_1)

p_layout = {"title": {"text": "Surface hoar 2018-2019"},
            "showlegend": False, "legend": {"orientation": "h"},
            # "xaxis": {"rangemode": "nonnegative"},
            "yaxis": {"title": "#Regions with SH problem"}
           }

fig.update_layout(p_layout)
# fig.write_image("ap_16_19.png")
pio.show(fig)



In [ ]: