Skip to content

Commit

Permalink
Guided tours for containers (#105)
Browse files Browse the repository at this point in the history
* Added tour for InplaceVolumesOneByOne
* Added tour for ReservoirSimulationTimeSeriesOneByOne
  • Loading branch information
HansKallekleiv authored Oct 3, 2019
1 parent 942b8b4 commit fc27e6c
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 4 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"scipy~=1.2",
"dash-daq~=0.1",
"matplotlib~=3.0",
"webviz-config>=0.0.23",
"webviz-config>=0.0.24",
"webviz-subsurface-components>=0.0.3",
"pillow~=6.1",
"xtgeo~=2.1",
Expand Down
67 changes: 66 additions & 1 deletion webviz_subsurface/containers/_inplace_volumes_onebyone.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ def make_uuids(self):
self.tornadowrapper_id = f"tornadowrapper-{uuid}"
self.source_id = f"source-{uuid}"
self.ensemble_id = f"ensemble-{uuid}"
self.filter_selectors_id = f"filter-selectors-{uuid}"
self.selectors_id = {x: f"{x}{uuid}" for x in self.selectors}

def add_webvizstore(self):
Expand All @@ -139,6 +140,67 @@ def add_webvizstore(self):
),
]

@property
def tour_steps(self):
return [
{
"id": self.graph_id,
"content": "The chart shows inplace volumetrics results.",
},
{
"id": self.table_id,
"content": (
"The table shows statistics per sensitivity parameter. "
"Rows can be filtered by searching, and sorted by "
"clicking on a column header."
),
},
{
"id": self.response_id,
"content": "Select the volumetric calculation to display.",
},
{
"id": self.plot_type_id,
"content": (
"Controls the type of the visualized chart. "
"Per realization shows bars per realization, "
"while the boxplot shows the range per sensitivity."
),
},
{
"id": self.tornadowrapper_id,
"content": (
"Displays tornado plot for the currently selected data. "
"Differences references can be set and sensitivities "
"smaller than the reference can be filtered out. "
"Click on the bar of a sensitivity to highlight the "
"relevant realizations in the main chart."
),
},
{
"id": self.ensemble_id,
"content": (
"If several ensembles are available, the active ensemble "
"can be selected here."
),
},
{
"id": self.source_id,
"content": (
"If volumes have been calculated for different grids. "
"E.g. geogrid and eclipsegrid, the active grid can be selected here."
),
},
{
"id": self.filter_selectors_id,
"content": (
"Filter on different combinations of e.g. zones, facies and regions "
"(The options will vary dependent on what was included "
"in the calculation.)"
),
},
]

@property
def vol_columns(self):
"""List of all columns in dataframe"""
Expand Down Expand Up @@ -289,7 +351,10 @@ def layout(self):
self.ensemble_selector,
self.source_selector,
html.Label("Filters"),
html.Div(self.filter_selectors),
html.Div(
id=self.filter_selectors_id,
children=self.filter_selectors,
),
]
),
html.Div(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,37 @@ def __init__(
def make_uuids(self):
uuid = f"{uuid4()}"
self.smry_col_id = f"smry-col-{uuid}"
self.date_id = f"date-{uuid}"
self.date_label = f"date-label{uuid}"
self.ensemble_id = f"ensemble-{uuid}"
self.table_id = f"table-{uuid}"
self.graph_id = f"graph-{uuid}"
self.graph_wrapper_id = f"graph-wrapper-{uuid}"
self.tornadowrapper_id = f"tornadowrapper-{uuid}"

@property
def tour_steps(self):
return [
{"id": self.smry_col_id, "content": "Select time series"},
{"id": self.ensemble_id, "content": "Select ensemble"},
{
"id": self.graph_id,
"content": (
"Selected time series displayed per realization. "
"Click in the plot to calculate tornadoplot for the "
"corresponding date"
),
},
{
"id": self.tornadowrapper_id,
"content": (
"Tornado plot for the currently displayed data. "
"Differences references can be set and sensitivities "
"smaller than the reference can be filtered out. "
"Click on the bar of a sensitivity to highlight the "
"relevant realizations in the main chart."
),
},
]

@property
def ensemble_selector(self):
Expand Down Expand Up @@ -214,7 +239,7 @@ def layout(self):
),
]
),
self.tornadoplot.layout,
html.Div(id=self.tornadowrapper_id, children=self.tornadoplot.layout),
],
)

Expand Down

0 comments on commit fc27e6c

Please sign in to comment.