-
Notifications
You must be signed in to change notification settings - Fork 0
/
plot_from_parquet.py
84 lines (77 loc) · 2.39 KB
/
plot_from_parquet.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import numpy as np
import dash
import dash_core_components as dcc
import dash_html_components as html
import pandas as pd
import plotly.graph_objs as go
external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css']
app = dash.Dash(__name__, external_stylesheets=external_stylesheets)
df = pd.read_parquet('data.parquet')
app.layout = html.Div([
html.Div([
html.Div([
html.H3('Column 1'),
dcc.Graph(
id='time-vs-sinr',
figure={
'data': [
go.Scatter(
x=df['t_sec'],
y=df['sinr_dB'],
name='SINR'
),
go.Scatter(
x=df['t_sec'],
y=df['sinr_dB']+10,
name='Offset SINR'
)
],
'layout': go.Layout(
xaxis={'type': 'linear', 'title': 'Time (seconds)'},
yaxis={'title': 'SINR (dB)'},
hovermode='closest'
)
}
)
], className='six columns'),
html.Div([
html.H3('Column 2'),
dcc.Graph(
id='sinr-histogram',
figure={
'data': [
go.Histogram(
x=df['sinr_dB'],
histnorm='probability'
)
],
'layout': go.Layout(
xaxis={'type': 'linear', 'title': 'SINR (dB)'},
yaxis={'title': 'Probability'},
hovermode='closest'
)
}
)
], className='six columns'),
], className='row'),
html.Div([
dcc.Graph(
id='time-vs-bigNum',
figure={
'data': [
go.Scatter(
x=df['t_sec'],
y=np.log2(df['bigNum']),
)
],
'layout': go.Layout(
xaxis={'type': 'linear', 'title': 'Time (seconds)'},
yaxis={'title': 'bigNum (# bits)'},
hovermode='closest'
)
}
)
])
])
if __name__ == '__main__':
app.run_server(debug=True)