Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Taipan Environmental Monitor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Anthony Horton
Taipan Environmental Monitor
Commits
fc7b63e9
Commit
fc7b63e9
authored
4 years ago
by
Anthony Horton
Browse files
Options
Downloads
Patches
Plain Diff
Slightly more responsive plot size, add data picker
parent
1501a985
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/taipanenv/datautils.py
+1
-1
1 addition, 1 deletion
src/taipanenv/datautils.py
src/taipanenv/rundash.py
+13
-2
13 additions, 2 deletions
src/taipanenv/rundash.py
with
14 additions
and
3 deletions
src/taipanenv/datautils.py
+
1
−
1
View file @
fc7b63e9
...
...
@@ -73,6 +73,6 @@ def make_plotly_plots(data_frame):
fig
.
update_yaxes
(
title_text
=
"
hPa
"
,
row
=
3
,
col
=
1
)
fig
.
update_yaxes
(
title_text
=
"
μg/m³
"
,
row
=
4
,
col
=
1
)
fig
.
update_layout
(
height
=
810
,
showlegend
=
False
)
fig
.
update_layout
(
autosize
=
True
,
showlegend
=
False
)
return
fig
This diff is collapsed.
Click to expand it.
src/taipanenv/rundash.py
+
13
−
2
View file @
fc7b63e9
"""
Runs the web dashboard.
"""
import
datetime
import
dash
import
dash_core_components
as
dcc
import
dash_html_components
as
html
...
...
@@ -47,7 +49,7 @@ app.layout = html.Div(children=[
className
=
'
three columns
'
),
html
.
Div
(
daq
.
Gauge
(
id
=
'
pressure_gauge
'
,
label
=
"
Pressure (hPa)
"
,
scale
=
{
'
start
'
:
900
,
'
interval
'
:
10
,
'
labelInterval
'
:
2
},
scale
=
{
'
start
'
:
900
,
'
interval
'
:
10
,
'
labelInterval
'
:
5
},
min
=
900
,
max
=
1100
,
showCurrentValue
=
True
),
...
...
@@ -68,8 +70,17 @@ app.layout = html.Div(children=[
'
marginBottom
'
:
'
0
'
},
className
=
'
row
'
),
html
.
Div
(
dcc
.
Graph
(
id
=
'
live-plots
'
)
html
.
Div
([
"
Plot date range:
"
,
dcc
.
DatePickerRange
(
id
=
'
plot-date-range
'
,
display_format
=
'
YYYY-MM-DD
'
,
start_date
=
datetime
.
date
.
today
()
-
datetime
.
timedelta
(
days
=
1
))
],
style
=
{
'
textAlign
'
:
'
center
'
}),
html
.
Div
(
dcc
.
Graph
(
id
=
'
live-plots
'
,
style
=
{
'
height
'
:
'
55vh
'
,
'
minHeight
'
:
'
550px
'
})
),
dcc
.
Interval
(
id
=
'
interval-component
'
,
interval
=
60
*
1000
,
# in milliseconds
n_intervals
=
0
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment