smart_data_hub.SmartGUI

Attributes

operators

hex_colors

site_path

site_file_paths

yaml_site_paths

geometry_path

geometry_folder_list

folder_file_path

site_dropdown_list

app

site_dropdown

site_geomodel

export_geomodel_button

export_geomodel_dropdown

export_geomodel(btn_export_geomodel, ...)

default_merge_butttons

export_data_button_dropdown

lithostratigraphy_button

lithostratigraphy

Functions

split_filter_part(filter_part)

Parse the filter part of the filter string. Adopted from the Dash documentation [https://dash.plotly.com/datatable/filtering] accessed on 13/10/2025.

list2str(property_df)

Convert list in pandas DataFrame to string for better display in Dash DataTable.

str2list(property_df)

Convert strings in pandas DataFrame to list.

RGBtxt_to_dict(file_path, color_type)

_summary_

get_geological_time(row)

Combine geological time scale to a list.

create_stratigraphic_table(site_strata, ...)

Create a stratigrahic table follows the style of the international chronostratigraphic chart.

filter_table_df(filter, property_df)

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_vtkdata(site_name, sites_material_props_dict, ...)

Load the vtk data for the 3D structural geomodel of the selected site.

display_stratigraphic_table(site_name, ...)

load_stratum_table(click_data, ...)

filter_table(datatable_data, filter)

confirm_add_default(add_default_clicks, datatable_data)

add_default(datatable_data, add_default_clicks, ...)

confirm_merge_add(merge_data_clicks, datatable_data)

merge_data(datatable_data, merge_data_clicks, filter)

display_properties_table(datatable_data)

lithology_table_buttons(properties_table_style)

export_props_data(btn_export_data, datatable_data, ...)

display_geomodel(site_name, sites_material_props_dict, ...)

export_geomodel(btn_export_geomodel, ...)

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.

Parameters:

filter_part (str or None) – A part of the filter string.

Returns:

column name str: operator str: value

Return type:

str

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:
  • file_path (str) – Path to the rgb text file for the Geological Time Scale.

  • color_type (str) – ‘to_hex’ or ‘to_rgb’.

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:

dict

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:

list

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:
  • site_strata (list) – A list of string that contains the name for each lithostratigraphic layer.

  • strata_props_descriptions (list) – A list of string that contains the description for each lithostratigraphic layer.

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:

str

smart_data_hub.SmartGUI.hex_colors[source]
smart_data_hub.SmartGUI.site_path[source]
smart_data_hub.SmartGUI.site_file_paths = [][source]
smart_data_hub.SmartGUI.yaml_site_paths[source]
smart_data_hub.SmartGUI.geometry_path[source]
smart_data_hub.SmartGUI.geometry_folder_list = [][source]
smart_data_hub.SmartGUI.folder_file_path[source]
smart_data_hub.SmartGUI.site_dropdown_list[source]
smart_data_hub.SmartGUI.app[source]
smart_data_hub.SmartGUI.site_dropdown[source]
smart_data_hub.SmartGUI.site_geomodel[source]
smart_data_hub.SmartGUI.export_geomodel_button[source]
smart_data_hub.SmartGUI.export_geomodel_dropdown[source]
smart_data_hub.SmartGUI.export_geomodel[source]
smart_data_hub.SmartGUI.default_merge_butttons[source]
smart_data_hub.SmartGUI.export_data_button_dropdown[source]
smart_data_hub.SmartGUI.lithostratigraphy_button[source]
smart_data_hub.SmartGUI.lithostratigraphy[source]
smart_data_hub.SmartGUI.display_stratigraphic_table(site_name, sites_material_props_dict)[source]
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.filter_table(datatable_data, filter)[source]
smart_data_hub.SmartGUI.confirm_add_default(add_default_clicks, datatable_data)[source]
smart_data_hub.SmartGUI.add_default(datatable_data, add_default_clicks, filter, lithologies)[source]
smart_data_hub.SmartGUI.confirm_merge_add(merge_data_clicks, datatable_data)[source]
smart_data_hub.SmartGUI.merge_data(datatable_data, merge_data_clicks, filter)[source]
smart_data_hub.SmartGUI.display_properties_table(datatable_data)[source]
smart_data_hub.SmartGUI.lithology_table_buttons(properties_table_style)[source]
smart_data_hub.SmartGUI.export_props_data(btn_export_data, datatable_data, export_file_type, click_data)[source]
smart_data_hub.SmartGUI.display_geomodel(site_name, sites_material_props_dict, click_data, site_name_previous)[source]
smart_data_hub.SmartGUI.export_geomodel(btn_export_geomodel, export_model_type, site_name)[source]