Skip to content

Commit

Permalink
🚧📈 Add new plot
Browse files Browse the repository at this point in the history
  • Loading branch information
nepito authored Jul 17, 2024
1 parent 8ff4c8a commit 6ba29a8
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,25 @@ def make_tilt_ppda_build_up_disruption(tilt_ppda, xcol_param):
.add_params(xcol_param)
)
return tilt_plot


def select_indices_presion():
dropdown = alt.binding_select(
options=["build_up_disruption", "ppda", "tilt"], name="Índices de presión"
)
return alt.param(value="tilt", bind=dropdown)


def make_quality_and_pressure_indexes(tilt_ppda, xcol_param):
tilt_plot = (
alt.Chart(tilt_ppda)
.mark_point()
.encode(
x=alt.X("x:Q").title(""),
y="xG:Q",
tooltip=["team", "xG", "tilt", "build_up_disruption", "ppda"],
)
.transform_calculate(x=f"datum[{xcol_param.name}]")
.add_params(xcol_param)
)
return tilt_plot

0 comments on commit 6ba29a8

Please sign in to comment.