Lego Case Study
Tying in from Economic Freedom and Titanic, we’ve covered Pyramid’s data analytical capabilities to
represent information both numerically and visually. We’ve also explored how Discovery runs on
certain criteria (Data types, aggregates, etc) that is accessible and adjustable within Pyramid’s
Modelling tab.
Task Objectives:
1. Apply skills and techniques learnt from Economic Freedom and Titanic
2. Gain more understanding and make more sense of the ETL process using Pyramid’s Data Flow
3. Join tables in order to make more sense of the data
4. Draw useful insights on Lego’s success from a sea of seemingly irrelevant data
Background:
Lego System A/S is a Danish toy production company based in Billund. It is best known for the
manufacture of Lego-brand toys, consisting mostly of interlocking plastic bricks. Believe it or not, Lego
actually hit a major bump on the road in the early 2000s but somehow managed to pull themselves
back out and rise up as the world’s top toy company in 2012, which is the scope of our case study. The
source we will be working with consists of data up to the year 2017.
Context:
The data set available on the drive, when viewed separately, only gives superficial notes regarding the
state of the toy company. To piece the puzzle together, we will make use of Joins between tables to
be able to better see the turning point in the company’s history.
The specific Goal of this case study is to draw insights from the given data to make sense of the articles
below:
- The end of the Lego crisis in 2008 - https://www.liberation.fr/futurs/2011/10/03/lego-casse-
des-briques_76 5189
- Lego's late take-off in the girls market in 2012 - https://fortune.com/2015/12/30/lego-friends-
girls/
Feel free to google around for more information/articles regarding the above two points.
Source files:
For this tutorial, we will be working with sets.csv, Inventories.csv, Inventory_Parts.csv, Color Hues.csv
and Lego Theme Groups, all of which should be on the drive ready for you to download and work.
https://www.liberation.fr/futurs/2011/10/03/lego-casse-des-briques_76%205189
https://www.liberation.fr/futurs/2011/10/03/lego-casse-des-briques_76%205189
https://fortune.com/2015/12/30/lego-friends-girls/
https://fortune.com/2015/12/30/lego-friends-girls/
Walkthrough:
Let’s start by loading in the Sets dataset in Pyramid using Smart Modelling.
Look and explore the data to see if there’s anything you can learn from this data set alone. Do note
that you will need to apply aggregates to make more sense of the data.
With Titanic, the tutorial covered the practice of setting aggregates in the Modelling tab, but you can
also obtain aggregates in Pyramid’s Discovery simply by right clicking on the column you are
interested in, select Create Measure followed by Aggregate and click on whichever aggregate you
require.
You will also want to requalify some of your columns back in the Modelling tab in Pyramid (Hint: What
would the sum of the theme_id column give us?).
With the information we have from this one file, unless you know what you are looking for specifically
and ahead of time, trying to deduce valuable information from this dataset alone is really akin to
looking for a needle in a haystack.
To enrich our data, in this tutorial as well as in real world cases, we bring in additional tables, databases
via joins in order to shed more light on the existing information. Gauthier has prepared two
homemade tables, Lego Theme Groups and Color Hues which will help pull all the other tables into
one cohesive database that is more comprehensive and easier to understand.
Let’s go ahead and join our existing sets table with the Lego Theme Groups table. For starters we will
need to import Lego Theme Groups into our workspace. In the Modelling tab under data flow, we will
perform the same ETL process that we’ve been working with for all the previous exercises.
The Lego Theme Groups is an Excel file format. So, go ahead and drag the Excel bar from the list of
Sources into your workspace.
Click on the Excel bar you just dropped, and upload Lego Themes Group into the workspace. Once you
upload the file, Pyramid does some minor pre-processing before actually importing it into the
workspace.