How ashishallu/pharma-sales-market-access-dashboard works
This repository is a Medicare Part D analytics product with two user-facing paths: an interactive Streamlit dashboard and a multi-sheet Excel workbook for Power BI. The documented batch path downloads CMS data, cleans and aggregates it, then exports workbook tables; the app also supports demo data and inline CSV uploads. The dashboard covers KPIs, specialty, geographic, and prescriber analysis, while Power BI adds category, drug, and time-oriented views. Some modules were only partially excerpted, so edges for those flows rely on README statements rather than unsampled implementation details.
Main entry points: app.py Year and state filters · download_data.py CMS downloader · preprocess.py Clean and enrich · export_powerbi.py Workbook exporter
Components 17
Data acquisition
- CMS downloader
download_data.py - Raw annual CSVs
Data preparation
- Clean and enrich
preprocess.py - Analytical tables
preprocess.py
Streamlit analytics
- CSV upload pipeline
app.py - Demo baseline
app.py - Year and state filters
app.py - KPI summary
app.py - Specialty profiles
app.py - Geographic analysis
app.py - Prescriber analysis
app.py
Power BI reporting
- Workbook exporter
export_powerbi.py - Power BI workbook
PartD_PowerBI.xlsx - Power BI report views
export_powerbi.py
Other components
- Analyst
- CMS data
- Power BI analyst
Connections 16
- CMS data → CMS downloader: provides data
download_data.py - CMS downloader → Raw annual CSVs: saves CSVs
download_data.py - Raw annual CSVs → Clean and enrich: loads yearly data
preprocess.py - Clean and enrich → Analytical tables: writes summaries
preprocess.py - Analyst → CSV upload pipeline: uploads CSV
README.md - CSV upload pipeline → Year and state filters: prepares app data
app.py - Demo baseline → Year and state filters: supplies baseline
app.py - Analyst → Year and state filters: selects scope
app.py - Year and state filters → KPI summary: summarizes
app.py - Year and state filters → Specialty profiles: groups specialty spend
app.py - Year and state filters → Geographic analysis: groups state spend
app.py - Year and state filters → Prescriber analysis: compares providers
app.py - Analytical tables → Workbook exporter: reads processed tables
README.md - Workbook exporter → Power BI workbook: writes sheets
export_powerbi.py - Power BI workbook → Power BI analyst: imports workbook
README.md - Power BI analyst → Power BI report views: explores report
README.md