def grid(
    df: pd.DataFrame,
    media: str,
    show: bool = True,
) -> Path:
  • df: pd.DataFrame
    The dataframe with the data to plot
  • media: str
    The column name of the media to display
  • show: bool = True
    Whether to show the plot or not. If show is set to True, we will start a local server to display the plot in a web browser.
    More specifically, we start a FastAPI server where we mount the webpage as a static file.
    The application itself does not require an internet connection. All data is loaded locally and does not leave your machine/browser.
    If show is set to False, we only save the required data to serve the plot later on and return the path to where the data is stored.
    If you want to serve the plot yourself later on, you can run clusterfun serve {path-to-data}|{uuid} in the command line to start a local server for the plot you are interested in.
import pandas as pd
import clusterfun as clt

df = pd.read_csv("")
clt.grid(df, media="img_path")