Applying Object Oriented methods to switch between two dashboards

I work with simulation data where we do some data analytics work for autonomous driving. We started off to develop our dashboards in jupyter but now modularized our code and working with vs studio. Our modules are something like this:

  1. fetch.py: a module to fetch data from server based on the given id of the data we want to analyze
    we either choose to analyze only one release data (‘df’) and serve it as ‘Single Regression’ dashboard or we merge a list of releases into ‘df_merged’ and serve it as ‘Multi regression’ dashboard to see evolution of performance over releases.
  2. handledata.py: to perform some cleaning and configure our data to develop different plots, panel objects, tables and groupby operations etc.
  3. plots: to make box plots, scatter plot, pn.indicators etc.
  4. main file: where we import all the modules and create panel objects followed by composing a layout/template to create tabs specific to single or multi regression

We would like to use more object oriented methods to create one main file to arrange all the plot methods wrapped in class Dashboard . The idea is to create two different templates as Single and Multi Dashboard differ a lot by the type of plots and tabs arrangement and appending the respective objects to them. Finally we would like to serve the respective dashboard based on the dataframe that we provide. df—> single regression dashboard
df_merged–> multi regression dashboard. I am not sure if this is the best way to approach but I am looking for ideas, thoughts or some examples. Have attached snaps of dashboard skeletons for some reference to show how they differ from each other.



So what exactly is the question here if i may ask? :open_mouth:

I guess if you want a more object-oriented approach (what is your current apprpoach?) you should
start looking at Param? https://param.holoviz.org/