Skip to content

Commit

Permalink
MRG: Merge remote-tracking branch 'origin/enhancement/pre-process-sen…
Browse files Browse the repository at this point in the history
…sor-data' into enhancement/pre-process-sensor-data
  • Loading branch information
time-trader committed Mar 13, 2023
2 parents 1776f62 + 0400594 commit 81cef20
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 43 deletions.
2 changes: 1 addition & 1 deletion dashboard/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
from dash import Input, Output, State

from aerosense_tools.plots import plot_connection_statistic, plot_pressure_bar_chart, plot_sensors
from aerosense_tools.queries import ROW_LIMIT, BigQuery
from aerosense_tools.preprocess import RawSignal
from aerosense_tools.queries import ROW_LIMIT, BigQuery
from aerosense_tools.utils import generate_time_range, get_cleaned_sensor_column_names


Expand Down
127 changes: 88 additions & 39 deletions dashboard/layouts.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,45 +39,94 @@ def create_sensors_tab_layout(app, tab_name, sensor_names, graph_id, data_limit_
html.Label(html.B("Time range")),
TimeRangeSelect(),
html.Br(),
html.Label("Custom time range"),
html.Div([html.Div([html.Label("Start datetime"),
dcc.DatePickerSingle(id="start-date",
date=datetime.datetime.now().date().isoformat(),
display_format="Do MMM Y",
persistence=True,
disabled=True, ), ],
style={'display': 'inline-block'}),
html.Div([html.Label("Hour"),
dash_daq.NumericInput(id="start-hour", value=0, min=0, max=23,
persistence=True), ],
style={'display': 'inline-block'}),
html.Div([html.Label("Minute"),
dash_daq.NumericInput(id="start-minute", value=0, min=0, max=59,
persistence=True), ],
style={'display': 'inline-block'}),
html.Div([html.Label("Second"),
dash_daq.NumericInput(id="start-second", value=0, min=0, max=59,
persistence=True), ],
style={'display': 'inline-block'}),
], style={'margin': '10px 0'}),

html.Div([html.Div([html.Label("End datetime"),
dcc.DatePickerSingle(id="end-date", display_format="Do MMM Y",
persistence=True, disabled=True, ), ],
style={'display': 'inline-block'}),
html.Div([html.Label("Hour"),
dash_daq.NumericInput(id="end-hour", value=0, min=0, max=23,
persistence=True), ],
style={'display': 'inline-block'}),
html.Div([html.Label("Minute"),
dash_daq.NumericInput(id="end-minute", value=0, min=0, max=59,
persistence=True), ],
style={'display': 'inline-block'}),
html.Div([html.Label("Second"),
dash_daq.NumericInput(id="end-second", value=0, min=0, max=59,
persistence=True), ],
style={'display': 'inline-block'}),
], style={'margin': '10px 0'}),
html.Label(html.B("Custom time range")),
html.Div(
[
html.Div(
[
html.Label("Start datetime"),
dcc.DatePickerSingle(
id="start-date",
date=datetime.datetime.now().date().isoformat(),
display_format="Do MMM Y",
persistence=True,
disabled=True,
),
],
style={"display": "inline-block"},
),
html.Div(
[
html.Label("Hour"),
dash_daq.NumericInput(
id="start-hour", value=0, min=0, max=23, persistence=True
),
],
style={"display": "inline-block"},
),
html.Div(
[
html.Label("Minute"),
dash_daq.NumericInput(
id="start-minute", value=0, min=0, max=59, persistence=True
),
],
style={"display": "inline-block"},
),
html.Div(
[
html.Label("Second"),
dash_daq.NumericInput(
id="start-second", value=0, min=0, max=59, persistence=True
),
],
style={"display": "inline-block"},
),
],
style={"margin": "10px 0"},
),
html.Div(
[
html.Div(
[
html.Label("End datetime"),
dcc.DatePickerSingle(
id="end-date",
display_format="Do MMM Y",
persistence=True,
disabled=True,
),
],
style={"display": "inline-block"},
),
html.Div(
[
html.Label("Hour"),
dash_daq.NumericInput(id="end-hour", value=0, min=0, max=23, persistence=True),
],
style={"display": "inline-block"},
),
html.Div(
[
html.Label("Minute"),
dash_daq.NumericInput(
id="end-minute", value=0, min=0, max=59, persistence=True
),
],
style={"display": "inline-block"},
),
html.Div(
[
html.Label("Second"),
dash_daq.NumericInput(
id="end-second", value=0, min=0, max=59, persistence=True
),
],
style={"display": "inline-block"},
),
],
style={"margin": "10px 0"},
),
html.Br(),
html.Button("Plot", id="refresh-button", n_clicks=0),
html.Button("Check for new installations", id="installation-check-button", n_clicks=0),
Expand Down
1 change: 0 additions & 1 deletion docs/source/deploying_the_dashboard.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@

Deployment
==========

2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Aerosense Dashboard

``aerosense-dashboard`` is a data dashboard allowing high-level visualisation of data from the aerosense system.

- The ``data-gateway`` library is responsible for the data collection and ingress to GretaDB and GretaStore.
- The ``data-gateway`` library is responsible for the data collection and ingress to GretaDB and GretaStore.
- The ``aerosense-tools`` library can access and manipulate data from GretaDB or the GretaStore by any python client.

This dashboard uses a combination of its own code and ``aerosense-tools`` to access and visualise data from GretaDB.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[tool.poetry]
name = "aerosense-dashboard"
version = "0.5.0"
version = "0.4.5"
description = "High-level visualisation for aerosense"
authors = ["Tom Clark", "Marcus Lugg", "Yuriy Marykovsky"]
license = "BSD-3"
Expand Down

0 comments on commit 81cef20

Please sign in to comment.