In [3]:
# This assumes that you already ran: download_synapse_data.py and convert_to_csv.py
import plotly.offline as py
import plotly.graph_objs as go
py.init_notebook_mode() # plotly offline mode
import pandas as pd
import glob
import os
csv_files = ['inertial_signals_test.csv']
def plot_df(df, title):
ax = ['body_acc_x',
'body_acc_y',
'body_acc_z',
#'body_gyro_x',
#'body_gyro_y',
#'body_gyro_z',
#'total_acc_x',
#'total_acc_y',
#'total_acc_z'
]
data = [go.Scatter(y=df[a], name=a) for a in ax]
layout = go.Layout(title=title,
xaxis=go.XAxis(title='Timestep'),
yaxis=go.YAxis(title='{x, y, z} coordinates in Gs'))
py.iplot({'data': data, 'layout': layout}, show_link=False)
for csv_file in csv_files:
df = pd.read_csv(csv_file)
df.describe()
plot_df(df, csv_file_path)