-
1.1. Loading
1.2. Plotting
-
2.1. Data Viewer
2.2. PreProcessing
2.3. Prediction of Ice thickness
2.4 Ice Cam
We have compiled relevant data in the file Time-Series_DATA.txt
The file is composed of two parts:
- Sources and metadata
- Description and source for every column
- Explanation of modification of original data when necessary
- Data
- Comma-separated values of the data
- At the moment the contents of the files are:
- Air temperature
- Predicted ice thickness
- Rainfall
- Snowfall
- Snow depth
- Water temperature
- Discharge
- Air temperature
- Wind speed
- Ice thickness
- Cloud coverage
- Solar radiation
- (Nearby) Glacial temperature, mass balance, precipitation
- Global climate oscillation parameters
As we are working with time-series it is recommended to load the data as a dataframe with the following command
Data=pd.read_csv('Time_series_DATA.txt',skiprows=149,index_col=0)`
Data.index=pd.to_datetime(Data.index):
The skiprows
, is included to avoid loading the sources/licences and metadata of our individual timeseries.
A quick inspection of the data can now be easily made with
Data.info()
The module make_plots.py
contains some useful function that may help to explore/inspect the contents of the data.
In particular
-
explore_data(Data)
Makes a plot for each column in the dataframe.
-
interactive_data(Data)
Makes an interactive plot with some of the most relevant columns
Alternatively, we can use the function numpyfy
to convert the dataframe to a numpy array.
Using pandas it is really easy to plot specific columns by simply specifying the column name.
plt.plot(Data.index,Data['colname'])
The index of Data correspond to the datetime-object YYYY-MM-DD
associated with that value.
Alternatively it can be useful to use another x-axis, we have multiple options
Data.index.year
Data.index.month
Data.index.day
But more useful for our use-case we may need normalize dates such as
Data['Days since start of year']
Data['Days to break up ']
In some particularly sparse columns such as Data['IceThickness [cm]']
the simple plt.plot
command does not work properly ( plt.scatter works just fine).
In this cases the solution is to create a copy, eliminate nan
values so the df is no longer sparse.
Data_ice= Data.dropna(subset=['IceThickness [cm]']).copy()
plt.plot(Data_ice.index,Data_ice['IceThickness [cm]'])
Notebook with a multitude of p
lots that characterize the contents of the dataframe. USeful to get a feeling for the contents of Time_series_DATA.txt
Notebook with plot that more relevant to try to uncover tendencies or relationship between the variables that may allow to predict the data
Notebook were the Ashton model is implemented to predict ice thickness in term of temperatures
Notebook use to create a video and very light processing of the picture obtained form Nenana Ice Classic webpage
The resulting videos can be found here