Back to selected projects

Data Engineering · Analytics Engineering · Cloud · BI

Medicare Part D Data Platform

A production-style portfolio project using public CMS data, designed to turn annual prescription datasets into analytics-ready data products for geographic, specialty, prescriber, and drug analysis.

End to end
Independent ownership
8
Implemented dbt models
4
Analytical marts
3
Public Tableau dashboards

The problem

From annual public files to decision-ready analysis.

The project transforms public CMS Medicare Part D provider-and-drug data into analytical products that support analysis of drug spend, provider behavior, specialty patterns, geographic trends, and year-over-year changes—without implying an adopting healthcare organization or realized business outcome.

My role

One accountable path from source to BI.

I designed and implemented the architecture, Python/pandas ingestion, AWS storage and Athena integration, Snowflake load path, dbt transformation layers, analytical models and marts, and Tableau delivery.

I built this project to demonstrate how I would design an end-to-end modern analytics platform around a large public healthcare dataset, combining data engineering, analytics engineering, cloud architecture, and BI delivery.

Architecture

A clear separation of responsibilities.

The main path keeps source ingestion, cloud storage, warehouse loading, transformation, and BI distinct. Athena remains a limited side integration from S3.

The primary load path moves from S3 into Snowflake. Athena is limited to an optional catalog partition-repair request and does not orchestrate or transform the warehouse data.

Data pipeline

Engineering the ingestion and warehouse load.

The implementation makes year scope explicit and keeps the source-aligned RAW load separate from analytical transformation.

01 · Data ingestion

Parameterized, chunked, and year-organized.

  • A required integer --year defines one reporting year per invocation.
  • The local CSV path and extension are validated before cloud work begins.
  • pandas reads 200,000 rows per chunk, adds REPORT_YEAR, and can prepare gzip output.
  • S3 keys follow raw/year=YYYY/ for explicit year organization.
  • Preparation, upload, and Athena repair are configuration flags—not a scheduler.

02 · Snowflake

A source-aligned RAW landing path.

  • A gzip CSV file format and year-specific external stage support the load.
  • COPY INTO maps 23 staged fields into RAW.PARTD_PRESCRIBERS with explicit casts.
  • Requested-year and total row counts provide baseline target validation.
  • The year-scoped replace/reload strategy runs DELETE for the year, then COPY INTO.
Engineering boundary: delete and copy are separate statements, so this is not an atomic replacement workflow.

dbt & data modeling

Eight models from RAW source to analytical marts.

The design uses views for staging and analytics, then tables for consumer-oriented marts.

Staging

View

Standardizes the RAW provider, drug, measure, geography, specialty, and reporting-year fields.

  • stg_partd_prescribers

Analytics

Views

Establishes the analytical fact projection and reusable geography and specialty groupings.

  • fct_partd_prescriptions
  • dim_geography
  • dim_specialty

Marts

Tables

Publishes question-oriented aggregates for BI and analytical exploration.

  • mart_drug_spend_by_state
  • mart_specialty_summary
  • mart_top_prescribers
  • mart_brand_generic_summary
Designed analytical grainPrescriber × Drug × Reporting Year
Modeling boundaryGrain uniqueness is not currently enforced.
Persisted execution evidenceSuccessful run evidence covers 4 named models, not all 8 implemented models.

Analytical marts

Models organized around the questions people ask.

01

Drug Spend by State

mart_drug_spend_by_state

Spend, claims, beneficiaries, provider counts, and unit-cost measures by geography and reporting year.

02

Specialty Summary

mart_specialty_summary

Cost and utilization patterns across prescriber specialties, broader specialty groups, and reporting year.

03

Top Prescribers

mart_top_prescribers

Prescriber-level spend and utilization ranking enriched with geography and specialty attributes.

04

Brand vs. Generic

mart_brand_generic_summary

Brand and generic cost, utilization, prescriber, and per-claim or per-beneficiary comparisons.

Data quality

Baseline checks, stated precisely.

The current dbt YAML declares 14 baseline not_null tests across staging, the fact model, and four marts.

Tableau / analytics delivery

Three published views of the modeled data.

Each dashboard is available on Tableau Public. Static portfolio screenshots remain a presentation enhancement rather than a dependency for verifying the work.

Engineering decisions

Choices made with consequences in view.

The implementation balances a clear portfolio-scale workflow with explicit paths for production hardening.

DecisionWhyTrade-off
Process source data in 200,000-row pandas chunksBounds dataframe processing instead of loading the complete annual CSV at once.The preparation step remains local and single-process; no runtime benchmark is claimed.
Parameterize one reporting year per invocationMakes reload and backfill scope explicit across filenames, S3 paths, and warehouse operations.Supported years and multi-year orchestration are not configured in the CLI.
Organize S3 data under raw/year=YYYYCreates a predictable, year-scoped landing convention for discovery and Snowflake loading.Upload and Athena repair are controlled by hard-coded flags that are off by default.
Separate RAW loading from dbt transformationsPreserves a source-aligned warehouse landing layer before analytical modeling.COPY uses ON_ERROR = CONTINUE without persisted rejected-row reconciliation.
Replace one year with DELETE followed by COPYSupports deliberate reprocessing of a requested reporting year.The sequence is not an atomic replacement workflow.
Use views for staging/analytics and tables for martsKeeps reusable transformation logic current while giving BI consumers stable aggregates.Views repeat downstream query work, while marts require table rebuilds.
Build four question-oriented martsAligns modeled data with geography, specialty, prescriber, and brand/generic analysis.Metric documentation and test coverage remain intentionally baseline.

Production evolution

What I would evolve for production.

These improvements extend the demonstrated architecture without overstating its current operating model.

01

Atomic loading and promotion

Stage, reconcile, and promote a requested year as one recoverable workflow rather than separate delete and copy statements.

02

Stronger reconciliation

Persist source counts, accepted rows, rejected rows, and load outcomes before considering a run complete.

03

Least-privilege storage access

Replace direct AWS credentials in stage DDL with a managed Snowflake storage integration.

04

Richer dbt quality coverage

Add grain, relationship, accepted-value, freshness, and domain checks beyond baseline not-null declarations.

05

Orchestration and observability

Externalize execution flags and add status polling, structured run metadata, alerts, and exception-safe cleanup.

06

Reproducible configuration

Align dbt profile naming and regenerate deliberately selected artifacts after running the complete current project.

Outcomes

Engineering evidence and analytical delivery.

Engineering outcomes

  • Complete source-to-BI architecture across Python, AWS, Snowflake, dbt, SQL, and Tableau.
  • Reusable year-based ingestion and warehouse reload behavior.
  • Eight implemented dbt models across three transformation layers.
  • Four analytical marts aligned to specific questions.

Analytical deliverables

  • Three packaged Tableau workbooks with local extracts.
  • Three published Tableau dashboards.
  • Geography, specialty, prescriber, brand/generic, and year-based analysis.
  • Baseline dbt quality declarations and scoped execution evidence.

Verified technology stack

  • Python
  • pandas
  • SQL
  • AWS S3
  • Amazon Athena
  • Snowflake
  • dbt
  • Tableau
  • Git & GitHub

Explore the project

Review the implementation and analytical deliverables.

Source code and each published dashboard are available as direct evidence of the work.