Inequality in Practice: E-commerce Portfolio Analysis

Are your top-selling products making or breaking your business?
It's terrifying to think your entire revenue might collapse if one or two products fall out of favor. Yet spreading too thin across hundreds of products often leads to mediocre results and brutal price wars.
Discover how a 6-year Shopify case study uncovered the perfect balance between focus and diversification.
Why bother?
Understanding Concentration in your product portfolio is more than simply an intellectual exercise; it has a direct impact on crucial business choices. From inventory planning to marketing spend, understanding how your revenue is distributed among goods impacts your approach.
This post walks through practical strategies for monitoring concentration, explaining what these measurements actually mean and how to get useful insights from your data.
I'll take you through fundamental metrics and advanced analysis, including interactive visualisations that bring the data to life.
I am also sharing chunks of R code used in this analysis. Use it directly or adapt the logic to your preferred programming language.
The Concentration Question
Looking at market analysis or investment theory, we often focus on concentration – how value is distributed across different elements. In e-commerce, this translates into a fundamental question: How much of your revenue should come from your top products?
Is it better to have several strong sellers or a broad product range? This isn't just a theoretical question …
Having most of your revenue tied to few products means your operations are streamlined and focused. But what happens when market preferences shift? Conversely, spreading revenue across hundreds of products might seem safer, but it often means you lack any real competitive advantage.
So where's the optimal point? Or rather what is the optimal range, and how various ratios describe it.
What makes this analysis particularly valuable is that it is based on real data from a business that kept expanding its product range over time.
Getting the Data Right
On Datasets
This analysis was done for a real US-based e-commerce store – one of our clients who kindly agreed to share their data for this article. The data spans six years of their growth, giving us a rich view of how product concentration evolves as business matures.
While working with actual business data gives us genuine insights, I've also created a synthetic dataset in one of the later sections. This small, artificial dataset helps illustrate the relationships between various ratios in a more controlled setting – showing patterns "counting on fingers".
To be clear: this synthetic data was created entirely from scratch and only loosely mimics general patterns seen in real e-commerce – it has no direct connection to our client's actual data. This is different from my previous article, where I generated synthetic data based on real patterns using Snowflake functionality.
Data Export
The main analysis draws from real data, but that small artificial dataset serves an important purpose – it helps explain relationships between various ratios in a way that's easy to grasp. And trust me, having such a micro dataset with clear visuals comes in really handy when explaining complex dependencies to stakeholders