Skip to content

Commit

Permalink
Adding EDA page
Browse files Browse the repository at this point in the history
  • Loading branch information
JBris committed Sep 12, 2024
1 parent f5f15e3 commit b646509
Show file tree
Hide file tree
Showing 19 changed files with 1,247 additions and 46 deletions.
1 change: 1 addition & 0 deletions app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def define_ui(app: Dash) -> None:
app.layout = html.Div(
[
dcc.Store(id="store-simulation-run", storage_type="local", data=[]),
dcc.Store(id="store-eda-data", storage_type="local", data=[]),
dcc.Store(id="store-observed-data", storage_type="local", data=[]),
dcc.Loading(
id="loading_page_content",
Expand Down
4 changes: 2 additions & 2 deletions app/conf/calibration_form/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -316,10 +316,10 @@ components:
children: Load observed data
- id: clear-obs-data-file-button
label: Clear
help: Clear the observed data from the upload component
help: Clear the observed data
class_name: dash_bootstrap_components.Button
kwargs:
children: Clear upload data
children: Clear data
color: primary
className: me-1
abc:
Expand Down
1 change: 1 addition & 0 deletions app/conf/config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
defaults:
- _self_
- calibration_form: common
- eda_form: common
- experiment: mlflow
- object_storage: minio
- orchestration: prefect
Expand Down
133 changes: 133 additions & 0 deletions app/conf/eda_form/common.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
_target_: deeprootgen.data_model.FormModel
components:
parameters:
collapsible: true
children:
- id: select-x-axis-dropdown
param: x_axis_column
label: X axis
help: Select the column for the x axis
class_name: dash.dcc.Dropdown
handler: dropdown
options_func: list
kwargs:
multi: false
searchable: true
clearable: true
placeholder: Select x axis
- id: select-y-axis-dropdown
param: y_axis_column
label: Y axis
help: Select the column for the y axis
class_name: dash.dcc.Dropdown
handler: dropdown
options_func: list
kwargs:
multi: false
searchable: true
clearable: true
placeholder: Select y axis
- id: select-group-by-dropdown
param: group_by_column
label: Group by
help: Select the column to group data by
class_name: dash.dcc.Dropdown
handler: dropdown
options_func: list
kwargs:
multi: false
searchable: true
clearable: true
placeholder: Select group by
- id: select-left-summary-stats-dropdown
param: left_summary_statistics
label: Left summary statistic
help: Select summary statistics for the left visualisation
class_name: dash.dcc.Dropdown
handler: dropdown
options_func: deeprootgen.statistics.get_summary_statistics
kwargs:
multi: false
searchable: true
clearable: true
placeholder: Select left summary statistic
- id: select-right-summary-stats-dropdown
param: right_summary_statistics
label: Right summary statistic
help: Select summary statistics for the right visualisation
class_name: dash.dcc.Dropdown
handler: dropdown
options_func: deeprootgen.statistics.get_summary_statistics
kwargs:
multi: false
searchable: true
clearable: true
placeholder: Select right summary statistic
data:
collapsible: true
children:
- id: upload-obs-data-file-button
label: Upload
help: Upload observed data from a csv file
class_name: dash.dcc.Upload
handler: file_upload
kwargs:
children: Load observed data
- id: clear-obs-data-file-button
label: Clear
help: Clear the observed data
class_name: dash_bootstrap_components.Button
kwargs:
children: Clear data
color: primary
className: me-1
results:
children:
- id: scatter-xy-plot
label: Scatter
help: Scatter plot for the data
class_name: dash.dcc.Graph
kwargs:
responsive: auto
- id: heatmap-xy-plot
label: Heatmap
help: Heatmap plot for the data
class_name: dash.dcc.Graph
kwargs:
responsive: auto
- id: histogram-x-plot
label: X histogram
help: Histogram for data on the x axis
class_name: dash.dcc.Graph
kwargs:
responsive: auto
- id: histogram-y-plot
label: Y histogram
help: Histogram for data on the y axis
class_name: dash.dcc.Graph
kwargs:
responsive: auto
- id: box-x-plot
label: X box
help: Box plot for data on the x axis
class_name: dash.dcc.Graph
kwargs:
responsive: auto
- id: box-y-plot
label: Y box
help: Box plot for data on the y axis
class_name: dash.dcc.Graph
kwargs:
responsive: auto
- id: left-summary-statistic-plot
label: Left summary statistic
help: Visualisation for summary statistic data
class_name: dash.dcc.Graph
kwargs:
responsive: auto
- id: right-summary-statistic-plot
label: Right summary statistic
help: Visualisation for summary statistic data
class_name: dash.dcc.Graph
kwargs:
responsive: auto
6 changes: 3 additions & 3 deletions app/pages/abc_root_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
)

from deeprootgen.form import get_common_layout
from deeprootgen.io import load_runs_from_file, s3_upload_file
from deeprootgen.io import load_data_from_file, s3_upload_file
from deeprootgen.pipeline import (
dispatch_new_run,
load_form_parameters,
Expand Down Expand Up @@ -236,7 +236,7 @@ def load_runs(list_of_contents: list, list_of_names: list) -> tuple:
if list_of_contents[0] is None or list_of_contents[0] == 0:
return no_update

simulation_runs, toast_message = load_runs_from_file(
simulation_runs, toast_message = load_data_from_file(
list_of_contents, list_of_names
)
return simulation_runs, True, toast_message
Expand Down Expand Up @@ -358,7 +358,7 @@ def run_root_model(
[Input(f"{PAGE_ID}-data-collapse-button", "n_clicks")],
[State(f"{PAGE_ID}-data-collapse", "is_open")],
)
def toggle_statistics_collapse(n: int, is_open: bool) -> bool:
def toggle_data_collapse(n: int, is_open: bool) -> bool:
"""Toggle the collapsible for statistics.
Args:
Expand Down
Loading

0 comments on commit b646509

Please sign in to comment.