class_docstr: Bridge pattern decoupling the application part from SmartExplainer and SmartPlotter.
  Attributes
  ----------
  explainer: object
      SmartExplainer instance to point to.
class_docstr_tok: ["Bridge","pattern","decoupling","the","application","part","from","SmartExplainer","and","SmartPlotter",".","Attributes","--","--","--","--","--","explainer",":","object","SmartExplainer","instance","to","point","to","."]
docstr: Init on class instantiation, everything to be able to run the app on server.
  Parameters
  ----------
  explainer : SmartExplainer
      SmartExplainer object
  settings : dict
      A dict describing the default webapp settings values to be used
      Possible settings (dict keys) are 'rows', 'points', 'violin', 'features'
      Values should be positive ints
docstr_tok: ["Init","on","class","instantiation",",","everything","to","be","able","to","run","the","app","on","server",".","Parameters","--","--","--","--","--","explainer",":","SmartExplainer","SmartExplainer","object","settings",":","dict","A","dict","describing","the","default","webapp","settings","values","to","be","used","Possible","settings","(","dict","keys",")","are","'rows","'",",","'points","'",",","'violin","'",",","'features'","Values","should","be","positive","ints"]
code: def __init__(self, explainer, settings: dict = None):
      """
      Init on class instantiation, everything to be able to run the app on server.
      Parameters
      ----------
      explainer : SmartExplainer
          SmartExplainer object
      settings : dict
          A dict describing the default webapp settings values to be used
          Possible settings (dict keys) are 'rows', 'points', 'violin', 'features'
          Values should be positive ints
      """
      # APP
      self.server = Flask(__name__)
      self.app = dash.Dash(
          server=self.server,
          external_stylesheets=[dbc.themes.BOOTSTRAP],
      )
      self.app.title = "Shapash Monitor"
      if explainer.title_story:
          self.app.title += " - " + explainer.title_story
      self.explainer = explainer
  
      # SETTINGS
      self.logo = self.app.get_asset_url("shapash-fond-fonce.png")
      self.color = explainer.plot._style_dict["webapp_button"]
      self.bkg_color = explainer.plot._style_dict["webapp_bkg"]
      self.title_menu_color = explainer.plot._style_dict["webapp_title"]
      self.settings_ini = {
          "rows": 1000,
          "points": 1000,
          "violin": 10,
          "features": 20,
      }
      if settings is not None:
          for k, v in self.settings_ini.items():
              self.settings_ini[k] = (
                  settings[k]
                  if k in settings
                  and isinstance(settings[k], int)
                  and 0 < settings[k]
                  else v
              )
      self.settings = self.settings_ini.copy()
  
      self.predict_col = ["_predict_"]
      self.special_cols = ["_index_", "_predict_"]
      if self.explainer.y_target is not None:
          self.special_cols.append("_target_")
          if self.explainer._case == "regression":
              self.special_cols.append("_error_")
      self.explainer.features_imp = (
          self.explainer.state.compute_features_import(
              self.explainer.contributions
          )
      )
      if self.explainer._case == "classification":
          self.label = self.explainer.check_label_name(
              len(self.explainer._classes) - 1, "num"
          )[1]
          self.selected_feature = self.explainer.features_imp[
              -1
          ].idxmax()
          self.max_threshold = int(
              max(
                  [
                      x.applymap(lambda x: round_to_k(x, k=1))
                      .max()
                      .max()
                      for x in self.explainer.contributions
                  ]
              )
          )
      else:
          self.label = None
          self.selected_feature = self.explainer.features_imp.idxmax()
          self.max_threshold = int(
              self.explainer.contributions.applymap(
                  lambda x: round_to_k(x, k=1)
              )
              .max()
              .max()
          )
      self.list_index = []
      self.subset = None
      self.last_click_data = None
  
      # DATA
      self.explanations = (
          Explanations()
      )  # To get explanations of "?" buttons
      self.dataframe = pd.DataFrame()
      self.round_dataframe = pd.DataFrame()
      self.features_dict = copy.deepcopy(self.explainer.features_dict)
      self.init_data()
  
      # COMPONENTS
      self.components = {
          "menu": {},
          "table": {},
          "graph": {},
          "filter": {},
          "settings": {},
      }
      self.init_components()
  
      # LAYOUT
      self.skeleton = {"navbar": {}, "body": {}}
      self.make_skeleton()
      self.app.layout = html.Div(
          [self.skeleton["navbar"], self.skeleton["body"]]
      )
  
      # CALLBACK
      self.callback_fullscreen_buttons()
      self.init_callback_settings()
      self.callback_generator()
  
imports: import copy
  import dash
  from dash import dash_table
  import dash_daq
  from dash import no_update
  from dash.exceptions import PreventUpdate
  import dash_bootstrap_components
  from dash import dcc
  from dash import html
  from dash import MATCH, ALL
  from dash.dependencies import Output, Input, State
  from flask import Flask
  import pandas
  import plotly.graph_objs
  import random
  import re
  from math import log10
  from shapash.webapp.utils.utils import check_row, get_index_type, round_to_k
  from shapash.webapp.utils.MyGraph import MyGraph
  from shapash.utils.utils import truncate_str
  from shapash.webapp.utils.explanations import Explanations
  from shapash.webapp.utils.callbacks import select_data_from_prediction_picking, select_data_from_str_filters, select_data_from_bool_filters, select_data_from_numeric_filters, select_data_from_date_filters, get_feature_from_clicked_data, get_feature_from_features_groups, get_group_name, get_indexes_from_datatable, update_click_data_on_subset_changes, get_figure_zoom, get_feature_contributions_sign_to_show, update_features_to_display, get_id_card_features, get_id_card_contrib, create_id_card_data, create_id_card_layout, get_feature_filter_options, create_dropdown_feature_filter, create_filter_modalities_selection
label_desc: Use image node_id 1 to create a new SmartApp object  with example: obj = SmartApp(explainer, settings)