1. Introduction

#1.-Introduction

Everyone loves Lego (unless you ever stepped on one). Did you know by the way that "Lego" was derived from the Danish phrase leg godt, which means "play well"? Unless you speak Danish, probably not.

In this project, we will analyze a fascinating dataset on every single lego block that has ever been built!

lego

2. Reading Data

#2.-Reading-Data

A comprehensive database of lego blocks is provided by Rebrickable. The data is available as csv files and the schema is shown below.

schema

Let us start by reading in the colors data to get a sense of the diversity of lego sets!

Loading output library...

3. Exploring Colors

#3.-Exploring-Colors

Now that we have read the colors data, we can start exploring it! Let us start by understanding the number of colors available.

4. Transparent Colors in Lego Sets

#4.-Transparent-Colors-in-Lego-Sets

The colors data has a column named is_trans that indicates whether a color is transparent or not. It would be interesting to explore the distribution of transparent vs. non-transparent colors.

Loading output library...

5. Explore Lego Sets

#5.-Explore-Lego-Sets

Another interesting dataset available in this database is the sets data. It contains a comprehensive list of sets over the years and the number of parts that each of these sets contained.

sets_data

Let us use this data to explore how the average number of parts in Lego sets has varied over the years.

Loading output library...
Loading output library...

6. Lego Themes Over Years

#6.-Lego-Themes-Over-Years

Lego blocks ship under multiple themes. Let us try to get a sense of how the number of themes shipped has varied over the years.

Loading output library...

7. Wrapping It All Up!

#7.-Wrapping-It-All-Up!

Lego blocks offer an unlimited amount of fun across ages. We explored some interesting trends around colors, parts, and themes.