Data Engineering

Freight Carrier Performance & Cost Analytics Platform

A production-style analytics platform for inbound logistics. Shipment data flows through a Postgres warehouse and a dbt medallion architecture (bronze to silver to gold), is orchestrated on a daily Airflow DAG, and surfaces in a Streamlit dashboard with carrier scorecards, on-time delivery rankings, and lane cost comparisons. CI runs the full pipeline on every push via GitHub Actions.

Screenshots

Carrier scorecard showing on-time rate and cost per shipment by carrier
Carrier scorecard showing on-time rate and cost per shipment by carrier
Lane-level cost comparison across North America and EMEA with cost-savings estimator
Lane-level cost comparison across North America and EMEA with cost-savings estimator

Problem Statement

Inbound logistics teams need to answer three questions constantly: which carriers are underperforming, which lanes are overpriced, and what a carrier switch would actually save. Answering them usually means stitching together spreadsheets from separate systems, which makes the analysis slow, manual, and stale by the time it reaches a decision. This platform was built to answer all three from a single orchestrated pipeline.

Tech Stack

PythonPostgreSQLdbtApache AirflowStreamlitPlotlySQLAlchemyGitHub Actions

Key Contributions

  • Generated synthetic multi-carrier shipment data with Faker and SQLAlchemy across North America and EMEA lanes, with deliberate performance variance baked in, and loaded it into PostgreSQL
  • Modeled the warehouse in dbt using a medallion architecture: bronze for raw landing, silver for cleaned and typed shipment records with delay flags, and gold for business-facing marts covering carrier KPIs, lane cost aggregates, and exception rollups
  • Orchestrated a daily Airflow DAG chaining data generation, dbt run, dbt test, and a carrier exception check that flags carriers breaching the on-time threshold
  • Built a Streamlit dashboard on the gold layer with a carrier scorecard, an on-time delivery ranking with a configurable alert threshold, a lane-by-lane cost comparison, and an interactive cost-savings estimator
  • Set up GitHub Actions CI that provisions a Postgres service, applies the schema, generates data, and runs the full dbt build on every push

Results

  • Carrier on-time performance and cost per shipment ranked and comparable from a single gold-layer mart
  • Lane-level cost comparison across North America and EMEA surfaces overpriced lanes without manual reconciliation
  • Interactive cost-savings estimator models the dollar impact of shifting shipment volume between carriers
  • Data quality tests run at every layer, so a bad upstream load fails the DAG instead of reaching the dashboard

Engineering Decisions

Challenges Faced

View GitHub Repository