Uncategorized

From Dataset to Decision: A Reproducible Support-Ticket Analysis Project

Quick answer: Turn a support-ticket dataset into a decision by documenting its source, defining exactly what each metric counts, preserving unresolved tickets, checking totals, and separating observations from explanations. Deliver a reproducible analysis, an accessible dashboard and a one-page memo proposing a change to test—not promising an outcome.

1. Start with a decision, not a dashboard

Use this project to answer:

“Which support queue should we investigate first, and what evidence would justify an operational change?”

That question requires more than identifying the queue with the longest average resolution time. You also need ticket counts, unresolved work, data-quality checks and limitations.

Your deliverables should be:

  • A source record and data dictionary.
  • An unchanged input file.
  • A repeatable cleaning and analysis script.
  • A dashboard with clearly defined metrics.
  • A short findings memo connecting evidence to a proposed next step.

The worked example below uses six entirely synthetic tickets. They describe no real customers, employees or company results. The small dataset makes the calculations inspectable; it is not evidence for a staffing decision.

Prerequisites: basic Python familiarity and an environment with pandas installed. The pandas documentation consulted for this workflow identifies version 3.0.6. Record your actual Python and pandas versions with the project rather than assuming another analyst has the same environment. (pandas.pydata.org)

2. Document provenance and minimize the data you use

For an authorized export, write a source record before analyzing it:

Item What to record
Origin System and export method
Authorization Approved analytical purpose and sharing audience
Coverage Included dates, queues and ticket types
Snapshot Exact extraction time and timezone
Grain What one row represents
Definitions Status meanings and timestamp semantics
Restrictions Storage, access, retention and publication rules

Grain means the unit represented by one row. This project requires one row per ticket. An export with one row per message or status change needs a separate transformation before ticket counts are meaningful.

For this exercise, use only:

  • ticket_id: unique synthetic identifier.
  • queue: billing or technical.
  • created_at: creation timestamp.
  • resolved_at: resolution timestamp, blank if unresolved.
  • status: open or resolved at the snapshot.

For real data, begin with an approved field list. Exclude names, email addresses, message text and attachments unless the question genuinely requires them. Keep ticket-level access restricted and review small-group disclosures before sharing summaries.

These are project safeguards, not a claim of legal compliance. NIST’s Privacy Framework treats privacy risk across the data lifecycle, from collection through disposal; your organization’s applicable requirements still need separate review. (nist.gov)

3. Define volumes, resolution times and backlog separately

Use a written metric contract:

Metric Definition for this project
Created volume Tickets created during the reporting period
Resolved cohort count Those created-period tickets resolved by the snapshot
Resolution hours Elapsed calendar hours from creation to resolution
Median resolution hours Middle duration among eligible resolved tickets
Mean resolution hours Sum of eligible durations divided by their count
Unresolved cohort count Created-period tickets still open at the snapshot
Open age Elapsed calendar hours from creation to the snapshot

This is a creation-cohort analysis: a cohort is a group selected using the same rule, here its creation dates.

It is not a measure of all closures during the period. A ticket created earlier and resolved this week belongs in a closure-based throughput metric, but not this week’s creation cohort.

Likewise, unresolved tickets in this cohort are not necessarily the entire backlog. Older open tickets must be included if the question concerns total outstanding work.

Treat unresolved resolution times as unknown—not zero. Do not calculate business-hours durations or service-level agreement compliance unless you have the working calendar, pause rules and contractual definitions.

4. Run a small, reproducible Python analysis

Save this synthetic data as tickets.csv:

ticket_id,queue,created_at,resolved_at,status
T001,billing,2026-01-05T09:00:00Z,2026-01-05T11:00:00Z,resolved
T002,billing,2026-01-05T10:00:00Z,2026-01-05T14:00:00Z,resolved
T003,billing,2026-01-05T11:00:00Z,,open
T004,technical,2026-01-06T09:00:00Z,2026-01-07T09:00:00Z,resolved
T005,technical,2026-01-06T10:00:00Z,2026-01-08T10:00:00Z,resolved
T006,technical,2026-01-06T11:00:00Z,,open

The snapshot is January 10, 2026, at 00:00 UTC. All tickets were created between January 5 and January 7, exclusive of January 7.

For a real export, normalize labels using a documented mapping, identify duplicate ticket IDs, and separate invalid records for investigation. Do not arbitrarily retain the first row when repeated IDs might represent ticket history.

The script below deliberately stops on several inconsistencies instead of silently fixing them:

import platform
import pandas as pd

print("Python:", platform.python_version())
print("pandas:", pd.__version__)

df = pd.read_csv("tickets.csv", dtype="string")

start = pd.Timestamp("2026-01-05T00:00:00Z")
end = pd.Timestamp("2026-01-07T00:00:00Z")
snapshot = pd.Timestamp("2026-01-10T00:00:00Z")

assert df["ticket_id"].notna().all()
assert df["ticket_id"].is_unique
assert df["queue"].notna().all()
assert df["status"].isin(["open", "resolved"]).all()

for col in ["created_at", "resolved_at"]:
    original = df[col].copy()
    df[col] = pd.to_datetime(
        original, format="ISO8601", utc=True, errors="coerce"
    )
    failed = original.notna() & df[col].isna()
    assert not failed.any(), f"Unparseable values in {col}"

assert df["created_at"].notna().all()
assert (df["created_at"] < snapshot).all()

resolved = df["status"].eq("resolved")
assert resolved.equals(df["resolved_at"].notna())
assert (
    df.loc[resolved, "resolved_at"]
    >= df.loc[resolved, "created_at"]
).all()
assert (df.loc[resolved, "resolved_at"] < snapshot).all()

cohort = df.loc[
    (df["created_at"] >= start) & (df["created_at"] < end)
].copy()

cohort["resolution_hours"] = (
    cohort["resolved_at"] - cohort["created_at"]
).dt.total_seconds() / 3600

cohort["is_open"] = cohort["status"].eq("open")
cohort["open_age_hours"] = (
    (snapshot - cohort["created_at"]).dt.total_seconds() / 3600
).where(cohort["is_open"])

summary = cohort.groupby("queue", dropna=False).agg(
    created=("ticket_id", "size"),
    resolved=("resolution_hours", "count"),
    open=("is_open", "sum"),
    median_hours=("resolution_hours", "median"),
    mean_hours=("resolution_hours", "mean"),
)

daily = cohort.groupby(
    cohort["created_at"].dt.floor("D")
).size()

assert len(cohort) == summary["created"].sum()
assert len(cohort) == summary["resolved"].sum() + summary["open"].sum()
assert len(cohort) == daily.sum()

print(summary)
print(daily)

Pandas documents that errors="coerce" converts unparseable dates to NaT, its missing datetime value. Here, that behavior helps detect failures; the assertion prevents them from disappearing unnoticed. utc=True is appropriate because this sample explicitly supplies UTC timestamps. Do not use it to guess the timezone of undocumented local timestamps. (pandas.pydata.org)

total_seconds() converts the full duration to seconds, which the script divides by 3,600. Grouped aggregations then calculate counts and durations for each queue. (pandas.pydata.org)

Expected summary:

Queue Created Resolved Open Median hours Mean hours
billing 3 2 1 3 3
technical 3 2 1 36 36

Expected created volume is three tickets on January 5 and three on January 6. Across the four resolved tickets, durations are 2, 4, 24 and 48 hours: mean 19.5 hours, median 14 hours. The two open tickets are 109 and 85 hours old at the snapshot.

These are calculations from the synthetic example, not measured operational results.

5. Reconcile totals before interpreting patterns

Use a reconciliation sheet alongside the script:

  • Input rows: 6.
  • Unique ticket IDs: 6.
  • In-period tickets: 6.
  • Resolved plus open: 4 + 2 = 6.
  • Queue counts: 3 + 3 = 6.
  • Daily created counts: 3 + 3 = 6.
  • Resolution-time denominator: 4, not 6.

For a larger export, record exact duplicates, invalid IDs, timestamp failures, out-of-period records and eligible rows. Make exclusion categories mutually exclusive, or explain overlaps so the totals remain traceable.

Three common mistakes deserve explicit checks:

Dropping every row with a blank field. That would remove both unresolved tickets here. Use metric-specific eligibility rules instead.

Losing uncategorized tickets. Pandas excludes missing group keys by default; dropna=False retains those groups for review. (pandas.pydata.org)

Multiplying rows through joins. Before adding queue descriptions or other reference data, verify the lookup has one row per key. Compare row counts and unique ticket counts before and after the join.

For real operational data, also reconcile against a source-system report using the same dates, timezone, statuses and filters. Record unresolved differences rather than hiding them.

6. Explore distributions without claiming a cause

Start with three views:

  1. Created tickets by day: show missing calendar dates as zero only when the export covers those dates completely.
  2. Resolution-duration distribution: examine the spread and unusually long durations.
  3. Open-ticket ages: show unfinished work beside resolved-ticket metrics.

NIST describes histograms as a way to inspect a distribution’s center, spread, skewness, outliers and multiple peaks. That makes them useful when an average conceals variation. With only four resolved tickets here, however, listing the individual durations is more informative than choosing elaborate bins. Source: NIST histogram guidance.

The example supports this observation:

Technical tickets have longer observed resolution durations among the tickets resolved by the snapshot.

It does not explain why. The dataset contains no issue complexity, staffing, transfers, priority, waiting states or reopen history.

There is another limitation: open tickets have unfinished durations. Comparing resolved tickets alone omits their eventual outcomes. More recent cohorts also have less time to resolve.

For real data, compare similarly aged cohorts, report unresolved counts alongside duration statistics, and inspect authorized case histories before proposing an explanation.

7. Build a dashboard readers can inspect and navigate

Use one page with:

  • Reporting period, snapshot and timezone.
  • Created volume, resolved count and unresolved cohort count.
  • Resolution median and mean, with the eligible count.
  • Daily ticket volume.
  • Queue comparison table.
  • Open-age summary.
  • A visible definitions and limitations note.

Label the duration clearly: “Calendar hours to resolution—resolved tickets in the creation cohort.”

In Power BI, Microsoft documents support for alternative text, keyboard navigation, accessible data tables, markers, titles and configurable tab order. These features require attention from the report author; their availability does not automatically make a report accessible. (learn.microsoft.com)

Before sharing, check that:

  • Color is not the only way to distinguish categories.
  • Axes name their units.
  • Important explanations are visible, not tooltip-only.
  • Meaningful visuals have alt text.
  • Keyboard focus follows a sensible order.
  • The underlying table is understandable.
  • Filters do not leave static descriptions contradicting the displayed data.

For this synthetic result, an appropriate text summary is: “Each queue has three created tickets and one unresolved ticket. Among two resolved tickets per queue, median resolution time is three hours for billing and 36 hours for technical.”

8. Write a one-page findings memo with a testable proposal

Keep the memo organized around the decision:

Decision requested: Approve further investigation of technical-ticket delays before changing staffing or routing.

Scope: Six synthetic tickets created January 5–6, 2026; snapshot January 10 at 00:00 UTC. This demonstrates the reporting method only.

Findings: Both queues have equal created volume and equal unresolved counts. Technical has longer observed resolved-ticket durations. All six tickets reconcile across queue, date and status totals.

Limitations: Only two resolved tickets per queue; no complexity, staffing, waiting-state or reopening data. Calendar-hour duration is not active handling time.

Proposed investigation: Apply the workflow to an authorized export covering complete weeks. Review technical tickets for handoffs, waiting states and issue complexity.

Possible pilot: If the review supports a routing problem, propose a limited triage change. Before starting, agree on comparable groups or periods, cohort maturity, evaluation timing and acceptable trade-offs.

Evaluation: Track created volume, resolution durations, open-ticket ages and unresolved share. Add repeat-contact or quality measures only if reliable data exists. A before-and-after difference alone should not be treated as proof that the pilot caused an improvement.

Reproduction package: Preserve the approved input, source record, metric definitions, script, environment versions, validation log, dashboard and memo.

The final recommendation should make the next decision clearer while leaving its uncertainties visible.