Support ticket deflection — pilot results¶

Four weeks of the new help-center widget, versus the four weeks before it shipped. Synthetic data for the ship.page Jupyter guide — /use-cases/jupyter-notebook.

In [1]:
import pandas as pd
import matplotlib.pyplot as plt

weeks = [f"W{i}" for i in range(33, 41)]
tickets = [412, 388, 401, 375, 301, 276, 264, 249]
widget = [0, 0, 0, 0, 118, 132, 141, 150]

df = pd.DataFrame({"week": weeks, "tickets": tickets, "widget_sessions": widget})
df["tickets_7d_avg"] = df["tickets"].rolling(2).mean().round(0)
df
Out[1]:
week tickets widget_sessions tickets_7d_avg
0 W33 412 0 NaN
1 W34 388 0 400.0
2 W35 401 0 394.0
3 W36 375 0 388.0
4 W37 301 118 338.0
5 W38 276 132 288.0
6 W39 264 141 270.0
7 W40 249 150 256.0
In [2]:
df.style.format({"tickets_7d_avg": lambda v: "—" if pd.isna(v) else f"{v:.0f}"})
Out[2]:
  week tickets widget_sessions tickets_7d_avg
0 W33 412 0 —
1 W34 388 0 400
2 W35 401 0 394
3 W36 375 0 388
4 W37 301 118 338
5 W38 276 132 288
6 W39 264 141 270
7 W40 249 150 256

The picture¶

Tickets trend down from the week the widget shipped; widget sessions climb in step. Causation is a claim for the review meeting, not for this notebook.

In [3]:
fig, ax = plt.subplots(figsize=(7, 3.2))
ax.plot(df["week"], df["tickets"], marker="o", label="Tickets")
ax.plot(df["week"], df["widget_sessions"], marker="s", label="Widget sessions")
ax.axvline(3.5, color="grey", linestyle="--", linewidth=1)
ax.text(3.6, 400, "widget ships", fontsize=9, color="grey")
ax.set_ylabel("per week")
ax.legend()
ax.spines[["top", "right"]].set_visible(False)
plt.tight_layout()
plt.show()
No description has been provided for this image