End-to-end data analysis project exploring Amazon book sales and their relationship with an independent sales channel (JDG).
This project investigates whether operating an independent sales channel impacts Amazon sales performance.
The key analytical challenge is to ensure fair comparison across time, avoiding bias caused by missing data or misaligned timelines.
- Which books generate the highest sales?
- Which marketplaces drive the most sales?
- How do sales evolve over time?
- Are there seasonal patterns in sales (quarterly)?
- Is there any observable relationship between Amazon sales and own-channel activity?
Columns:
DateTitleASINMarketplaceUnits
Columns:
Miesiac(month)JDG(activity status:active/zawieszona)
Loader → Cleaner → Analyzer → Visualizer
- Loads CSV files
- Validates schema
- Handles missing files
Responsible for data preparation and timeline alignment.
Key steps:
- Standardizes column names
- Converts dates and numeric values
- Builds a complete monthly timeline using JDG data
- Fills missing Amazon sales with
0(prevents survivorship bias) - Filters dataset to period where Amazon sales exist
- Merges Amazon and JDG datasets
💡 This ensures:
- no missing months
- fair comparison between active vs suspended periods
- consistent time granularity
Implements business logic and analytical methods.
- Sales by product
- Sales by region
- Monthly sales trend
- Quarterly aggregation
- Uses share of annual sales (not raw units)
- Allows comparison across years independent of growth
- Comparison of average sales:
- JDG active vs suspended
- Rolling trend (3-month smoothing)
- Event-based analysis:
- detects actual transition (active → suspended)
This analysis identifies correlations, not causal relationships.
- Generates a single dashboard (
.png) - Combines all insights into one view
Dashboard saved to: reports/figures/dashboard.png
Includes:
- Key metrics
- Top-selling products
- Regional distribution
- Monthly trend with rolling average
- Seasonality (quarter share of annual sales)
- Amazon vs JDG comparison
- Sales are concentrated in a small number of products
- A single region dominates total volume
- Sales fluctuate over time with visible trends
- No consistent evidence of cannibalization:
- differences between JDG active and suspended periods are not stable
- observed effects may be influenced by trend or seasonality
- JDG data covers a longer period than Amazon
- Analysis is restricted to overlapping months only
- Months with no Amazon sales are included as
0 - Prevents survivorship bias
- Analysis is based on aggregated monthly data
- External factors are not controlled:
- pricing
- marketing
- promotions
- external demand
👉 Therefore:
Results should be interpreted as descriptive, not causal
The dashboard includes three groups of metrics:
- JDG total months – full timeline of own-channel activity
- Amazon observed months – months where Amazon exists
- Overlap (used in analysis) – months included in comparison
- JDG active months (within overlap)
- JDG suspended months (within overlap)
- Relative difference in sales between periods
- Interpreted cautiously (non-causal)
pip install -r requirements.txt
python main.py- Clear separation of concerns (Loader / Cleaner / Analyzer / Visualizer)
- Defensive programming (schema validation, error handling)
- Bias-aware analysis (timeline reconstruction)
- Explicit handling of missing data (zero vs null)
- Reproducible pipeline
- Regression model (control for trend & seasonality)
- Add unit tests (pytest)
- Export results to CSV / JSON
- Replace static plots with interactive dashboard (Plotly / Streamlit)
Project created as part of a data analytics portfolio, focusing on real-world analytical challenges such as:
- data bias
- time-series alignment
- interpretation of observational data
