In [8]:
%matplotlib inline
In [9]:
import pandas
In [21]:
df = pandas.read_csv(r'D:\Dev\varsomdata2\localstorage\aval_danger.csv', index_col=0, parse_dates=['date'])
df.info()
<class 'pandas.core.frame.DataFrame'>
Int64Index: 5 entries, 0 to 4
Data columns (total 57 columns):
avalanche_forecast 5 non-null object
avalanche_nowcast 0 non-null float64
avalanche_problem_1_aval_size 5 non-null object
avalanche_problem_1_aval_size_tid 5 non-null int64
avalanche_problem_1_aval_type 5 non-null object
avalanche_problem_1_aval_type_tid 5 non-null int64
avalanche_problem_1_cause_name 5 non-null object
avalanche_problem_1_cause_tid 5 non-null int64
avalanche_problem_1_main_cause 0 non-null float64
avalanche_problem_1_problem 5 non-null object
avalanche_problem_1_problem_tid 5 non-null int64
avalanche_problem_1_source 3 non-null object
avalanche_problem_2_aval_size 5 non-null object
avalanche_problem_2_aval_size_tid 5 non-null int64
avalanche_problem_2_aval_type 5 non-null object
avalanche_problem_2_aval_type_tid 5 non-null int64
avalanche_problem_2_cause_name 5 non-null object
avalanche_problem_2_cause_tid 5 non-null int64
avalanche_problem_2_main_cause 0 non-null float64
avalanche_problem_2_problem 5 non-null object
avalanche_problem_2_problem_tid 5 non-null int64
avalanche_problem_2_source 0 non-null float64
avalanche_problem_3_aval_size 5 non-null object
avalanche_problem_3_aval_size_tid 5 non-null int64
avalanche_problem_3_aval_type 5 non-null object
avalanche_problem_3_aval_type_tid 5 non-null int64
avalanche_problem_3_cause_name 5 non-null object
avalanche_problem_3_cause_tid 5 non-null int64
avalanche_problem_3_main_cause 0 non-null float64
avalanche_problem_3_problem 5 non-null object
avalanche_problem_3_problem_tid 5 non-null int64
avalanche_problem_3_source 0 non-null float64
danger_level 5 non-null int64
danger_level_name 5 non-null object
data_table 5 non-null object
date 5 non-null datetime64[ns]
main_message_en 0 non-null float64
main_message_no 5 non-null object
metadata 5 non-null object
mountain_weather_change_hour_of_day_start 5 non-null int64
mountain_weather_change_hour_of_day_stop 5 non-null int64
mountain_weather_change_wind_direction 2 non-null object
mountain_weather_change_wind_speed 2 non-null object
mountain_weather_fl_hour_of_day_start 5 non-null int64
mountain_weather_fl_hour_of_day_stop 5 non-null int64
mountain_weather_freezing_level 5 non-null float64
mountain_weather_precip_most_exposed 5 non-null float64
mountain_weather_precip_region 5 non-null float64
mountain_weather_temperature_elevation 5 non-null float64
mountain_weather_temperature_max 5 non-null float64
mountain_weather_temperature_min 5 non-null float64
mountain_weather_wind_direction 5 non-null object
mountain_weather_wind_speed 5 non-null object
nick 5 non-null object
region_name 5 non-null object
region_regobs_id 5 non-null int64
source 5 non-null object
dtypes: datetime64[ns](1), float64(13), int64(18), object(25)
memory usage: 2.3+ KB
In [22]:
df.plot(x='date', y='avalanche_problem_1_aval_size_tid')
Out[22]:
<matplotlib.axes._subplots.AxesSubplot at 0x2b7cff7a860>
In [23]:
# implement a default - check values for not given at api.nve.no
df.head(5)
Out[23]:
avalanche_forecast
avalanche_nowcast
avalanche_problem_1_aval_size
avalanche_problem_1_aval_size_tid
avalanche_problem_1_aval_type
avalanche_problem_1_aval_type_tid
avalanche_problem_1_cause_name
avalanche_problem_1_cause_tid
avalanche_problem_1_main_cause
avalanche_problem_1_problem
...
mountain_weather_precip_region
mountain_weather_temperature_elevation
mountain_weather_temperature_max
mountain_weather_temperature_min
mountain_weather_wind_direction
mountain_weather_wind_speed
nick
region_name
region_regobs_id
source
0
De få snøflekkene som ligger igjen høyt til fj...
NaN
Not given
0
Not given
0
Not given
0
NaN
Not given
...
0.0
1400.0
-2.0
-7.0
S
Liten kuling
Andreas@nve
Trollheimen
3022
Forecast
1
De få snøflekkene som ligger igjen høyt til fj...
NaN
Not given
0
Not given
0
Not given
0
NaN
Not given
...
0.0
1400.0
-2.0
-13.0
S
Frisk bris
Andreas@nve
Trollheimen
3022
Forecast
2
Ny nedbør og økende vind fra nordvest kan føre...
NaN
1 - Små
1
Tørre flakskred
20
Nedføyket svakt lag med nysnø
10
NaN
Nysnø - flakskred
...
4.0
1400.0
-2.0
-6.0
SW
Bris
Andreas@nve
Trollheimen
3022
Forecast
3
Vind og nysnø vil føre til danning av ferske n...
NaN
2 - Middels
2
Tørre flakskred
20
Nedføyket svakt lag med nysnø
10
NaN
Nysnø - flakskred
...
16.0
1400.0
-6.0
-12.0
NW
Stiv kuling
Andreas@nve
Trollheimen
3022
Forecast
4
Nysnø og vind vil legge opp fersk fokksnø i le...
NaN
2 - Middels
2
Tørre flakskred
20
Nedføyket svakt lag med nysnø
10
NaN
Nysnø - flakskred
...
8.0
1400.0
-6.0
-12.0
W
Liten kuling
torolav@obskorps
Trollheimen
3022
Forecast
5 rows × 57 columns
In [ ]:
Content source: kmunve/APS
Similar notebooks: