Harkirat Singh / Analytics

01 / Retail analytics

Omnichannel retail

A public transaction dataset, an explicit simulated extension, and a reproducible route from data preparation to business measures.

PythonPostgreSQLPower BI / DAX

Revenue and retention

Historical data from one UK non-store retailer, December 2010 to December 2011. The final December contains nine days.

Start here Try switching Evidence scope to distinguish observed transactions from the simulated business case.

Loading verified historical aggregates…

Monthly net revenue

Returns retain their negative value. Source lines with non-positive prices or zero quantity are excluded under the documented cleaning rules.

Inspect revenue values

Monthly customer retention

Customers purchasing in both months divided by the previous month's identified purchasing customers. Anonymous sales are excluded.

Inspect retention denominators

Products within the retained comparison set

The chart shows eight products from the scope's full-period top-twenty set, ranked by selected-period revenue. It is not a newly calculated top twenty for every filter.

Inspect the comparison set and other-product total

The simulated
business case

Store, category, cost, campaign and web-session fields were generated with a fixed seed. They demonstrate analytical design; they are not evidence of actual omnichannel operations.

Fixed full-period combined scope: 1 December 2010 through 9 December 2011. The filters above do not change these tables. Margin uses simulated costs; attribution does not establish campaign lift.

Category revenue and margin

Inspect category assumptions and values

RFM customer segmentation

Recency, frequency and monetary segmentation on identified customers in the combined data. A segment's monetary share uses the segment-monetary denominator.

From transactions
to a decision model

The work connects a governed input, deterministic transformations, explicit metric definitions and a Power BI reporting specification.

Question and design

Which differences warrant investigation?

The project examines revenue, repeat purchasing, retention and product performance. Simulated costs and channels support a separate business-case exercise. It does not claim measured savings, causal marketing lift or predictive customer lifetime value.

Preparation

Keep cleaning choices inspectable

The pipeline retains returns, removes exact duplicate source rows under an explicit rule, quarantines invalid-price and zero-quantity lines, and keeps anonymous revenue separate from identified-customer measures. With no original line identifier, exact-duplicate removal can also remove a legitimate repeated item.

Verification

A copied pipeline reproduced the baseline

The October portfolio check ran the copied Python pipeline against the checksum-matched original source. The sales fact, ten selected tables and browser data matched the retained baseline byte for byte. This did not rerun PostgreSQL, native Power BI or a fresh dependency installation.

The original native reporting artifacts retain their historical acceptance. A corrected website does not renew native Power BI acceptance.

Revenue
Signed quantity × unit price × (1 − discount rate) on accepted lines. Discounts are zero for observed public transactions and simulated for the store extension. GBP; historical prices are not inflation-adjusted.
Orders and average value
Distinct non-return order IDs with positive revenue. Net revenue per order divides total signed net revenue, including returns, by this order count.
Customer measures
Identified purchasing customers only. Revenue from anonymous sales remains included in revenue totals.
Reproduction
Locked Python dependencies, source checksum, fixed simulation seed, SQL/DAX definitions and executable validation. Start with README.md in the download.

Recreate the analysis

The source package contains code, definitions, tests and the browser aggregates. Obtain the original UCI workbook using its recorded source and checksum.

Included

Python package and static reports. Full replay needs the original UCI workbook.

Software

Python for replay. A PDF viewer for retained reports; SQL/DAX definitions are included.

Full replay

Original UCI workbook required; small synthetic smoke fixture included.

Reproduction package

Portable Python pipeline, SQL/DAX, locked environment, selected tables and verification instructions. Includes a small synthetic smoke fixture.

Download source ZIPZIP · 112 KB

Read setup guide

Historical dashboard

The retained Power BI report as a PDF. Static report; the browser explorer above is a separate implementation.

Open report PDF

Decision memo

The retained decision memo, with assumptions and proposed actions. Suggested actions are not achieved outcomes.

Open memo PDF