An enterprise-ready data analytics and predictive modeling portfolio focused on retail operations, dynamic pricing strategy, and supply chain constraints.
This project leverages Python and the pandas ecosystem to analyze a complex dataset tracking pricing observations, channel-specific volumes, seasonal shifts, and promotion pattern.
Business Questions Addressed Dataset Structure Key Operational Insights Analytical Core Breakdowns
This analytics engine evaluates four critical operational intersections:
- Price Sensitivity: Quantifying exactly how markdown tiers alter daily physical units sold.
- Promotional Efficiency: Identifying which campaign engines (BOGO, Flash Sales, Member Offers) clear inventory fastest vs. their erosion impact on product profit margins.
- Channel Optimization: Evaluating platform demand scores across desktop, mobile web, and native applications to expose systemic inventory stockout risks.
- Demand & Seasonality: Mapping multi-category sales rankings across seasonal shifts to guide proactive procurement strategies.
The core analytics pipeline processes a dataset containing 172,800 rows of uniform observations across the following schema features:
| Column Name | Data Type | Feature Classification | Description |
| date | datetime64 | Dimension | Date of pricing and demand observation. |
| product_id | object / string | Dimension | Unique identifier for specific SKU items. |
| category | object / string | Dimension | Core product category (e.g., Apparel, Shoes, Electronics). |
| region | object / string | Dimension | Geographic market tracking anchor. |
| channel | object / string | Dimension | Transaction pathway (Web, Mobile Web, App). |
| season | object / string | Dimension | Seasonal tracking segment (Spring, Winter). |
| base_price | float64 | Pricing Metric | Original manufacturer price before promotions. |
| current_price | float64 | Pricing Metric | Effective customer checkout value after markdown. |
| discount_pct | float64 | Pricing Metric | Applied discount tier expressed as a percentage. |
| promotion_type | object / string | Pricing Metric | Campaign type category applied to the observation. |
| units_sold | int64 | Performance Metric| Number of physical items sold in the tracking window. |
| revenue | float64 | Performance Metric| Gross revenue generated from transaction volumes. |
| inventory_level| int64 | Logistics Metric | Available warehouse / store stock remaining post-sale. |
| stockout_flag | int64 / bool | Logistics Metric | Binary flag (0/1) indicating critically low stock levels. |
| demand_index | float64 | Market Intent | Normalized consumer appetite score (unfulfilled traffic intent). |
"No Promotion" represents the primary economic anchor of the ecosystem. It secures # 59.2% ($282.02M) of gross company cash flow, selling over 1.25M physical units naturally at our highest unit margin value ($2,816 per sale).
Promotional markdowns should be used as highly surgical clearance levers rather than continuous tools.
Shifting items from full price to a standard discount window (1% - 50% Off) generates a clear 29.4% lift in daily transaction velocity, jumping from an average of 12.6 units to 16.3 units per day.
Clearance and BOGO campaigns empty warehouse racks the fastest, pulling in record daily velocity benchmarks (18.26 and 17.74 units respectively).
However, they exact a severe toll on product profitability, compressing margin collections down to our lowest transaction touchpoints ($2,465 and $2,589).
Smartphone transactions drive a massive 68.2% of our gross revenue landscape.
The native App Channel is the absolute operational winner across every core performance indicator: it generates our highest market demand intent score (125.84), the highest gross revenue ($169.69M), the highest volume clearance (870,563 items), and the largest individual cart profiles (15.13 units per order).
Winter seasonal demand completely doubles our Spring metrics across all categories.
Apparel is the undisputed dominant product line, clinching the #1 revenue ranking in both spring and winter seasons, peaking at $45.09M during the winter window.
To ensure mathematical precision, all scripts obey a strict data processing order of operations: Perform mathematical computations/aggregations first.
This portfolio requires python >= 3.8 alongside core scientific plotting and document parsing suites.
To initialize data type normalization and enforce accurate boolean evaluation of stockouts across your raw data pipelines, integrate this configuration block: '''python import pandas as pd import numpy as np
df = pd.read_csv("retail_pricing_demand_100k.csv")
df['date'] = pd.to_datetime(df['date'])
pd.options.display.float_format = '${:,.2f}'.format
To segment discount tiers without introducing empty category spacing errors on graphical charts, the pipeline utilizes native boundary categorization: '''python
bins = [-0.01, 0.0, 1.01] bucket_order = ['0% (Full Price)', '1% - 50% Off']
df['discount_bucket'] = pd.cut(df['discount_pct'], bins=bins, labels=bucket_order)
discount_impact = df.groupby('discount_bucket', observed=True).agg( total_observations=('units_sold', 'count'), avg_units_sold_per_day=('units_sold', 'mean') ).dropna() '''