Skip to content

docs/build_explorer.py: dedup label_x post-ETL computation #27

@madsCodeBuddy

Description

@madsCodeBuddy

Context. After PR #24, transform_process_response_sheet now adds label_x (geometric mean of Time_min, Time_max) and label_y (geometric mean of Space_min, Space_max) to the returned DataFrame. CSV-provided values are preserved.

Cleanup. docs/build_explorer.py:86 still has:

df["label_x"] = np.sqrt(df.Time_min.apply(lambda q: q.value) * df.Time_max.apply(lambda q: q.value))

and similarly for label_y nearby. These are now redundant — ETL produces them. The line can be deleted.

Caveat. build_explorer.py is the live-explorer with the user-add-a-process feature; the label_x / label_y columns are also recomputed at runtime in the embedded CustomJS for any new process the user adds (lines ~183, 190, 197, 204, 238, 246). That JS-side recomputation is independent and stays. Only the Python-side post-ETL computation is redundant.

Verification after change. Build docs/explorer.html, confirm the rendered figure is byte-equivalent (modulo Bokeh UUIDs) to the pre-change build.

Small PR — single-file, ~3 line removal + maybe an import drop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions