|
|
|
@ -107,6 +107,7 @@ def parse_contents(contents, filename):
|
|
|
|
|
json_data['timeseries'] = df.to_json(orient='table')
|
|
|
|
|
json_data['spectrum'] = dfs.to_json(orient='table')
|
|
|
|
|
json_data['statistics'] = stats.to_json(orient='table')
|
|
|
|
|
json_data['filename'] = filename
|
|
|
|
|
|
|
|
|
|
return json.dumps(json_data)
|
|
|
|
|
|
|
|
|
@ -132,7 +133,8 @@ def read_json_data(json_data):
|
|
|
|
|
trace = go.Scatter(x=df.index, y=df[col], name=col, opacity=0.8)
|
|
|
|
|
ts.append(trace)
|
|
|
|
|
|
|
|
|
|
layout = {'title': 'basename', 'xaxis': {'rangeslider': {}}}
|
|
|
|
|
filename = json.loads(json_data)['filename']
|
|
|
|
|
layout = {'title': filename, 'xaxis': {'rangeslider': {}}}
|
|
|
|
|
graph_timeseries = dcc.Graph(id='time-series',
|
|
|
|
|
figure={
|
|
|
|
|
'data': ts,
|
|
|
|
|