HAFIDZ
Back to selected work

CASE STUDY

Data Analytics 2025

FP-Growth-Based Traffic Accident Analysis System

A web analytics application for managing traffic accident records and identifying relationships between incident factors using the FP-Growth algorithm. The system combines data ingestion, association rule mining, analytics dashboards, GIS-based hotspot mapping, analysis history, and reporting within an integrated workflow.

TECHNOLOGY

Python / Flask / SQLAlchemy / SQLite / Pandas / mlxtend / Bootstrap 5 / Leaflet / Waitress

Preview of FP-Growth-Based Traffic Accident Analysis System

THE CHALLENGE

Traffic accident records contain multiple attributes such as time, weather, road conditions, vehicle types, casualty severity, and location. Manual evaluation makes relationships between factors and incident concentrations harder to identify consistently as the dataset grows.

WHAT I BUILT

  1. 01

    CSV/XLSX incident data import and normalization with schema validation and transactional processing.

  2. 02

    FP-Growth analysis with configurable support, confidence, date range, and analysis attributes.

  3. 03

    Frequent itemsets and association rules with support, confidence, and lift metrics plus persisted analysis history.

  4. 04

    GIS mapping with a heat layer, marker clustering, hotspot scoring, and location priority ranking.

  5. 05

    Analytics dashboards, CSV exports, and printable recommendation reports generated from analysis results.

APPROACH

Developed a Flask-based application backend that handles CSV/XLSX imports, data validation and normalization, per-user dataset storage, and an FP-Growth analysis pipeline. Frequent itemsets and association rules are generated using configurable support and confidence thresholds and persisted as analysis history. The results are complemented by GIS hotspot mapping with a heat layer and frequency/severity-based prioritization, visual dashboards, CSV exports, and printable recommendation reports.

FP-Growth-Based Traffic Accident Analysis System Open screen 01 at full size
Screen 01 GIS visualization for mapping incident concentrations and comparing hotspot priorities based on frequency and severity of the analyzed data.
FP-Growth-Based Traffic Accident Analysis System Open screen 02 at full size
Screen 02 The dashboard summarizes the active dataset, coordinate coverage, association patterns, casualty distributions, highest-frequency locations, and recent analysis activity.
FP-Growth-Based Traffic Accident Analysis System Open screen 03 at full size
Screen 03 The FP-Growth workflow allows analysis parameters and attributes to be configured, then presents frequent itemsets and association rules using support, confidence, and lift metrics.
FP-Growth-Based Traffic Accident Analysis System Open screen 04 at full size
Screen 04 Analysis results are consolidated into a structured report combining priority locations, dominant incident periods, association rules, and recommendations for further review.

OUTCOME

Implemented an end-to-end analytics workflow from data ingestion through mapping and reporting. The system generates frequent itemsets and association rules with support, confidence, and lift metrics, persists individual analysis sessions, prioritizes hotspots using incident frequency and severity data, and presents the results through dashboards, interactive GIS, CSV exports, and structured recommendation reports.

Working on a similar system?

Share the workflow or problem you want to solve. I can help clarify the technical requirements and a practical implementation approach.

Discuss a Project