# Atlas — Sales & Business Performance

An interactive business analytics portfolio in ivory, gold, and deep atlas navy. The website uses real Microsoft educational sample data, calculated in JavaScript. Companion SQL, Power Query (M), DAX, and a Power BI theme support rebuilding the same analytics in Power BI Desktop.

## Run locally

Requires Node.js 18+; no npm packages are needed for the app.

```powershell
npm run dev
```

Open http://127.0.0.1:3000. Do not open index.html directly: browsers restrict local JSON fetches.

## Features

- Eight sections: executive overview, sales, profitability, products, customer segments, data explorer, scenario studio, and methodology.
- Global year, country, segment, and product filters; all KPIs and charts respect the selection.
- Area/line/column chart switching, horizontal rankings, donut composition, profit waterfall, bubble scatter, and country/segment heatmap, Pareto concentration, and matched-month YoY comparisons.
- Clickable charts and tables for drill-through detail, keyboard-accessible chart points, responsive navigation, print styling, search, sorting, pagination, and filtered CSV exports.
- Explicit sensitivity assumptions for price, volume, and unit cost, with scenario sales, profit, and margin.
- Downloadable data, DAX, M, SQL, quality report, theme, and Power BI build guide.

## Dataset

Source: [Microsoft Financial Sample](https://learn.microsoft.com/en-us/power-bi/create-reports/sample-financial-download).
Original download: https://download.microsoft.com/download/1/4/E/14EDED28-6C58-4055-A65C-23B4DA81C4DE/Financial%20Sample.xlsx

700 educational sample observations, Sep 2013–Dec 2014, five countries, five segments, six products. Currency: USD. Original workbook is preserved. Microsoft provides it freely for learning; no separate redistribution license is asserted here. Keep source attribution with the portfolio; review Microsoft's applicable terms before other reuse. This sample is not presented as operational business data.

Net sales: $118,726,350.26. Profit: $16,893,702.26. Gross profit margin: approximately 14.23%.

No customer IDs, orders, targets, returns, shipping metrics, or fixed operating expenses exist in the sample. Customer analysis is at market-segment level. Source profit is sales less COGS, so it is gross profit rather than operating profit. Do not claim customer retention, order counts, or a trained forecast.

## Architecture

```text
index.html / styles.css  → responsive presentation
analytics.js            → pure calculation and filtering layer
app.js                  → SVG charts, navigation, interactions
 data/sales.json         → browser analytics source
 data/sales.csv          → Power BI / SQL source
 data/atlas.sqlite       → reproducible analytics database
 powerbi/                → M pipeline, DAX measures/model, theme
 sql/analytics.sql       → executable reporting queries
 docs/                   → model, metrics, implementation, deployment
 scripts/                → preparation, verification, local server
```

Data stays in the visitor's browser. The static site has no credentials, backend, analytics tracker, or paid runtime dependency. Google Fonts are optional; local fallback fonts work when offline. A Vercel-hosted site publicly serves its bundled sample data and docs.

## Reproduce and validate

Python 3.10+, standard library only:

```powershell
python scripts/prepare_data.py
python scripts/build_sqlite.py
npm test
```

prepare_data.py reads the original workbook without Excel or pandas. Financial arithmetic is reconciled to one cent. Monetary inputs retain source precision; browser presentation rounds totals only for readability.

## Power BI implementation

Read POWER_BI_GUIDE.md. These are authored implementation assets; the project does not contain a compiled .pbix or an embedded Power BI report. DAX and M require validation inside Power BI Desktop. The browser runs JavaScript, not DAX.

## Deployment

See DEPLOYMENT.md. This static project has no build step. Vercel Hobby is suitable for a personal non-commercial portfolio within its plan limits. Actual publication requires your authenticated Vercel account.

## Portfolio wording

Current completed deliverable:
“Built an interactive sales and profitability analytics web portfolio using 700 Microsoft sample observations, with SQL reporting views, documented Power Query transformations, and a DAX measure library for a companion Power BI implementation.”

After building and validating the report in Power BI Desktop, add:
“Developed a Power BI star schema and interactive reports with time intelligence, weighted margins, ranking, synced slicers, and drill-through.”

Use the actual completion date. Do not label historical data as May 2026 activity or claim Power BI Desktop execution before doing it.
