smart_data_hub.SmartGUI
Attributes
|
|
Functions
|
Parse the filter part of the filter string. Adopted from the Dash documentation [https://dash.plotly.com/datatable/filtering] accessed on 13/10/2025. |
|
Convert list in pandas DataFrame to string for better display in Dash DataTable. |
|
Convert strings in pandas DataFrame to list. |
|
_summary_ |
|
Combine geological time scale to a list. |
|
Create a stratigrahic table follows the style of the international chronostratigraphic chart. |
|
Filter the properties table based on the filter query. Adopted from the Dash documentation [https://dash.plotly.com/datatable/filtering] accessed on 13/10/2025. |
|
Load the vtk data for the 3D structural geomodel of the selected site. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Module Contents
- smart_data_hub.SmartGUI.operators = [['ge ', '>='], ['le ', '<='], ['lt ', '<'], ['gt ', '>'], ['ne ', '!='], ['eq ', '='],...[source]
- smart_data_hub.SmartGUI.split_filter_part(filter_part)[source]
Parse the filter part of the filter string. Adopted from the Dash documentation [https://dash.plotly.com/datatable/filtering] accessed on 13/10/2025.
- smart_data_hub.SmartGUI.list2str(property_df)[source]
Convert list in pandas DataFrame to string for better display in Dash DataTable.
- Parameters:
property_df (pd.DataFrame) – A pandas DataFrame that contains the properties of a rock layer.
- Returns:
A pandas DataFrame with list converted to string.
- Return type:
pd.DataFrame
- smart_data_hub.SmartGUI.str2list(property_df)[source]
Convert strings in pandas DataFrame to list.
- Parameters:
property_df (pd.DataFrame) – A pandas DataFrame that contains the properties of a rock layer.
- Returns:
A pandas DataFrame with string converted to list.
- Return type:
pd.DataFrame
- smart_data_hub.SmartGUI.RGBtxt_to_dict(file_path, color_type)[source]
_summary_
- Parameters:
- Raises:
ValueError – Valid value for color_type: [‘to_hex’, ‘to_rgb’]
ValueError – No tuple, please make sure the dictionary has the right structure!
- Returns:
Dictionary with keys as geological time scale and values as hex color or rgb color.
- Return type:
- smart_data_hub.SmartGUI.get_geological_time(row)[source]
Combine geological time scale to a list.
- Parameters:
row (pd.DataFrame) – A row of pandas DataFrame that contains geological time scale and rock layer name.
- Returns:
A list of combined geological time scale.
- Return type:
- smart_data_hub.SmartGUI.create_stratigraphic_table(site_strata, strata_props_descriptions)[source]
Create a stratigrahic table follows the style of the international chronostratigraphic chart.
- Parameters:
- Returns:
A stratigraphic table in Plotly Icicle format. dict: A dictionary that contains the hex color for each lithostratigraphic layer.
- Return type:
plotly.graph_objs._figure.Figure
- smart_data_hub.SmartGUI.filter_table_df(filter, property_df)[source]
Filter the properties table based on the filter query. Adopted from the Dash documentation [https://dash.plotly.com/datatable/filtering] accessed on 13/10/2025.
- Parameters:
filter (str) – String that contains the filter query.
property_df (pd.DataFrame) – A pandas DataFrame that contains the properties of a rock layer.
- Returns:
Filtered pandas DataFrame.
- Return type:
pd.DataFrame
- smart_data_hub.SmartGUI.load_vtkdata(site_name, sites_material_props_dict, stratum_colors_dict, clicked_layer_name, initial_call=False)[source]
Load the vtk data for the 3D structural geomodel of the selected site. :param site_name: name of the selected site. :type site_name: str :param sites_material_props_dict: a dictionary that contains the material properties for each site. :type sites_material_props_dict: dict :param stratum_colors_dict: a dictionary that contains the hex color for each lithostratigraphic layer. :type stratum_colors_dict: dict :param clicked_layer_name: name of the clicked lithostratigraphic layer. :type clicked_layer_name: str :param initial_call: Initialize call to avoid display issues on macOS and Linux. Defaults to False. :type initial_call: bool, optional
- Returns:
HTML string of the 3D structural geomodel.
- Return type:
- smart_data_hub.SmartGUI.load_stratum_table(click_data, sites_material_props_dict, site_name, site_name_previous, filter, icicle_clickData_previous, lithologies)[source]
- smart_data_hub.SmartGUI.add_default(datatable_data, add_default_clicks, filter, lithologies)[source]
- smart_data_hub.SmartGUI.export_props_data(btn_export_data, datatable_data, export_file_type, click_data)[source]