library(tidyverse)
library(readxl)
library(here)
library(brickr)
library(rayshader)
library(rgl)
library(circlepackeR)
library(data.tree)
library(treemap)
library(prettydoc)
Welcome to the Wonderful World of Lego!
We can’t be the only people who have spent evenings lying awake in bed wishing that we could render some lego bricks in R. Luckily for us, the wonderful Simon Couch introduced us to a package called brickr
created by Ryan Timpe, where we can do that, and so much more! Brickr
has two main functions- creating 2D mosaics from uploaded images, and rendering legos or sets in 3D. We highly recommend brickr
as a fun and educational method of procrastination. Both the brickr
github repo and Rian Timpe’s personal repo have many fun examples of brickr
in action, including a Baby Yoda model! We spent SO MUCH TIME trying to get the brickr
3D renderings to work correctly, and at one point even considered DMing the creater on twitter to see if he could help us. But we finally figured it out, and rendered the most beautiful red 2 x 4 lego brick we had ever seen. While we made many things with brickr
, we decided to include three 3D renderings: “Hello Kelly” (because we wanted to say hi to Kelly!), “Izzy-Iggy” (the name of our github repo from the project), and a cute little house we designed instead of studying for our other finals! All three of these were made using the bricks_from_excel()
function in brickr, and were designed on a template excel document that was set up to be read by brickr
.
The brickr
github repository can be found here
#a cute little house!
read_xlsx("data/brickr_pattern.xlsx", sheet = "mybrickr") %>%
bricks_from_excel() %>%
build_bricks(rgl_lit = FALSE, outline_bricks = TRUE,
background_color = "#99e7ff")
par3d(userMatrix = rotate3d(par3d("userMatrix"), .1*pi, 0, 0 ,1))
We’ve all been there, you’re sitting with a cup of coffee in hand staring upon your giant lego collection and thinking, “I wonder what the largest lego set is?”. Well, it turns out the largest lego set is the 2017 Millenium Falcon, which has 7541 pieces in it. Since 2000 there have been 21 different versions and redesigns of the millenium falcon set. Other very large lego sets include the Harry Potter Hogwarts Castle with 6020 pieces, the Taj Mahal with 5932 pieces, and the 2007 Millennium Falcon with 5197 pieces.
The data used to create the following graphs comes from the Rebrickable website. here . Rebrickable allows users to input different lego pieces and gives them instructions to create sets out of the pieces they already own. This means that Rebrickable has tons and tons of data on legos, literally twelve different CSV’s of colors, size, part, theme, anything you could possibly want to know about an individual lego or set. Rebrickable has all of their data available for free on their website or through their API. The data was luckily in a tidy format (yay!) and using the handy schema we were able to combine data sets containing the information we desired. To create the radial networks and other graphs we desired the data needed to be formatted into a data tree. Luckily, the data.tree package has just the tools to make that happen! A data tree is a made up of nodes, where each node is a data structure consisting of a value. In a couple of our data trees the ‘root’ node is legos and then from there the ‘children’ nodes are themes, sets, and maybe the number of parts. The data tree is non linear in the sense that none of the ‘child’ nodes can point back to the ‘root’ node. The data.tree package allowed us to easily create these nested data frames using the paste function, the $ operator, and the as.node function.
Here are some cool graphs we made!!
Once our data trees were created we could start graphing (yay!). At the center of the radial network is legos, from there the first set of nodes is the top ten lego themes by number of occurrences, and each the secondary set of nodes is the largest sets, limited to 100 for legability. Perusing through the network we can see that Star Wars is a popular theme with many large sets.
(See the readme document/the radial_network.html file for information on our troubles and the radial network we made)
##Keep this
# Circlepacker package
the_themes <- sets_themes %>%
count(theme_name) %>%
top_n(5)
## Selecting by n
sets_themes$pathString <- paste("legos",
sets_themes$theme_name,
sets_themes$set_name,
sets_themes$num_parts,
sep = "/")
top_5_themes <- left_join(the_themes,sets_themes, by="theme_name") %>%
top_n(100, num_parts)
legos_circle <- as.Node(top_5_themes)
# Make the plot
circle_g <- circlepackeR(legos_circle, size = "num_parts", color_min =
"hsl(56,80%,80%)", color_max = "hsl(341,30%,40%)",
width = 1000, height = 800)
circle_g
legos Basic Set Creative Suitcase 1017 Large Bulk Bucket 950 Large Bucket 950 25th Anniversary Silver Tub 1201 XXL 2000 Canister 2000 Build Your Own House Tub 1201 35th Anniversary Tub 1200 Create and Imagine 1000 Build Your Dreams 1000 Blue Tub 1000 1500 CREATOR Strata Red {Red Tub} 1002 Large Creator Bucket 1305 Blue Strata XXL 1200 Better Building More Fun 2000 Fun with Building Tub 1000 50th Anniversary Tub 1000 Pretend and Create 1000 Build and Play Box 1000 Bricks and Creations Tub (Bottom Tub and its contents only) 1000 Bricks and Creations Tub - (TRU Exclusive) (Bottom Tub and its contents only) 1000 XXL 2000 2000 XXL 1800 1800 Giant Box 1600 LEGO Deluxe Starter Set 1104 Friends Summer Riding Camp 1160 Heartlake Shopping Mall 1169 Heartlake Grand Hotel 1574 Amusement Park Roller Coaster 1124 Heartlake City Resort 1019 Heartlake City Amusement Pier 1267 Rescue Mission Boat 928 Ninjago Fire Temple 1174 Ultra Stealth Raider 1094 Samurai X Cave Chaos 1253 Dragon's Forge 1137 Dieselnaut 1188 Dragon Pit 1669 Monastery of Spinjitzu 1079 Land Bounty 1185 Castle of the Forsaken Emperor 1219 The Ultra Dragon 943 Battle for Ninjago City 1218 City of Stiix 1068 Final Flight of Destiny's Bounty 1260 Temple of Airjitzu 2029 Star Wars AT-AT, black box 1070 AT-AT, blue box 1070 Millennium Falcon (Redesign), Blue box 997 Millennium Falcon (Redesign), Original Trilogy Edition box 980 Imperial Star Destroyer 1389 1358 Republic Gunship 1174 The Ghost 929 AT-AT 1137 MTT 953 Imperial Shuttle Tydirium 937 Kylo Ren's Command Shuttle 1005 Millennium Falcon 1330 1344 1253 Imperial Assault Carrier 1216 Captain Rex’s AT-TE 971 Rebel Combat Frigate 935 BB-8 1106 First Order Heavy Assault Walker 1375 First Order Star Destroyer 1414 Kessel Run Millennium Falcon 1416 Sandcrawler 1239 Betrayal at Cloud City 2809 Slave I - 20th Anniversary Edition 1006 Tantive IV 1772 Darth Vader's Castle 1060 Droid Commander 1184 Yoda 1771 Kylo Ren's Shuttle 1001 Trade Federation MTT 1326 Republic Attack Gunship 1037 Republic Frigate 1031 Venator-Class Republic Attack Cruiser 1170 Clone Turbo Tank 1142 Malevolence 1099 Star Wars M&M Mosaic - Promo Set 5462 Technic 4 x 4 Crawler Exclusive Edition 1584 Service Truck 1276 Container Truck 948 Customized Pick up Truck 1063 Crawler Crane 1400 Heavy Lift Helicopter 1042 Volvo EW 160E 1166 CLAAS XERION 5000 TRAC VC 1976 Ocean Explorer 1327 Air Race Jet 1151 Airport Rescue Vehicle 1106 Extreme Adventure 2382 6x6 All Terrain Tow Truck 1862 Mobile Crane 1292 Supercar 1281 Logging Truck 1308 Technology Resource Set 1154
The largest circle in this figure represents legos i.e the tree root , then the next set of circles is the top five themes within legos. Within each theme are the largest sets and clicking on an individual set’s circle you can see the number of parts within that set. This graph is limited to the hundred largest lego sets within those top five themes. With the circlepackeR and the networkD3 packages we found ourselves wanting to change some of the characteristics of the graphs such as font size and spacing and it was slightly infuriating that these were not adjustable within the packages.
The Millennium Falcon
The 2017 Millennium Falcon lego set is the largest lego set to date, with 7,541 pieces. But what else can we learn about the Millennium Falcon set without paying the hefty $799.99 price tag? The set contains 377 different part types from 39 different part categories, made up of 24 different colors. There are 150 spare parts, and 26 translucent parts. The most common color with 3304 parts is “light bluish grey”, which makes up almost 44% of the set. The most common part is a Black Technic Pin with Friction Ridges Lengthwise and Center Slots (there are 269 of them) with dark tan 1 x 2 plates as the second most common part (with 243 of them). The circle graph that we made about the Millennium Falcon shows a more in-depth distribution of the colors that make up the set. The circles, from biggest to smallest, represent all parts, all parts of a specific color, the categories of parts of each color, the part name, and then the quantity of that specific part in that specific color. With this graph, you can figure out exactly how many Black Technic Pin with Friction Ridges Lengthwise and Center Slots are in the set without having to do a bunch of data wrangling.
#USC Millennium Falcon, 7541 parts, released 2017
#set num = 75192-1
millenium_falcon <- parts_inventory %>%
filter(inventory_id == 19670) %>%
left_join(colors, by="color_id") %>%
left_join(parts, by="part_num") %>%
left_join(parts_categories, by="part_cat_id") %>%
rename("part_cat"="name", "color_name"="name.x", "part_name"="name.y")
## Warning: Column `part_num` joining factors with different levels, coercing to
## character vector
millenium_falcon$pathString <- paste("mf",
millenium_falcon$color_name,
millenium_falcon$part_cat,
millenium_falcon$part_name,
millenium_falcon$quantity,
sep = "/")
MILF <- as.Node(millenium_falcon)
#color, then part category, then part name, then part quantity
m <- circlepackeR(MILF, size = "quantity", width = 1000, height = 800)
m
mf Dark Bluish Gray Technic Connectors Technic Pin Connector Hub with 2 Perpendicular Axles 3 Technic Pin Connector Round 1L [Beam] 2 6 Technic Pin Connector Hub with 1 Axle 2 Technic Axle and Pin Connector Angled #1 7 Technic Axle Connector Smooth [with x Hole + Orientation] 15 Plates Special Plate Special 2 x 2 with 1 Pin Hole [Complete Underside Rib] 5 Plate Special 1 x 2 with Pin Hole on Top 3 Plate Special 1 x 2 with 1 Stud with Groove and Inside Stud Holder (Jumper) 75 Plate Special 1 x 2 with End Towball 2 Plate Special 1 x 2 Side Handle [Free Ends] 14 Plate Special 2 x 4 with Pins 1 Plate Special 3 x 2 with Hole 3 Plate Special 1 x 2 with Door Rail 13 Plate Special 1 x 2 with Handles [Flat Ends Low Attachment] 12 Plate Special 1 x 1 with Clip Light [Thick Ring] 10 Bracket 1 x 2 - 2 x 2 16 Plate Special 1 x 8 with Door Rail 2 Plate Special 1 x 2 [Side Handle Closed Ends] 2 Plate Special 1 x 1 with Clip Vertical [Thick Open O Clip] 2 Plate Special 1 x 1 with Clip Horizontal [Thick Open O Clip] 6 Plate Special 1 x 2 with Clip Horizontal on End 1 Plate Special 2 x 2 with Groove and Center Stud (Jumper) 5 Plate Special 1 x 2 with Arm Up [Horizontal Arm 5mm] 10 Plate Special 1 x 4 with 2 Studs 10 Bracket 1 x 2 - 1 x 2 Inverted 25 Bars, Ladders and Fences Bar Holder with Clip 7 Bar 1 x 8 with Brick 1 x 2 Curved Top End (Axle Holder Inside Small End) 2 Bar 1L with Clip [Cut Edges and One Side Hole] 1 Bar 1 x 3 (Radio Handle, Phone Handset) 20 Bar 6L with Stop Ring 18 Bricks Curved Slope Curved 4 x 1 No Studs [Stud Holder with Symmetric Ridges] 16 Brick Curved 10 x 1 [Symmetric Inside Ridges] 1 Brick Arch 1 x 3 x 2 Inverted [Inside Bow] 6 Brick Curved 2 x 2 with Two Top Studs 2 Brick Curved 2 x 2 x 2 3 Two Studs and Curved Slope End 4 Slope Curved 3 x 1 No Studs 6 Slope Curved 4 x 1 Double with No Studs 2 Plates Plate 3 x 3 14 Plate 2 x 2 Corner 13 Plate 2 x 12 13 Plate 2 x 4 36 Plate 2 x 2 20 Plate 1 x 2 22 Plate 1 x 1 63 6 Plate 6 x 16 1 Plate 4 x 10 5 Plate 4 x 4 2 Plate 4 x 6 2 Plate 6 x 10 3 Plate 2 x 8 4 Plate 4 x 8 2 Plate 6 x 14 2 Plate 1 x 8 8 Plate 1 x 3 10 Plate 1 x 6 21 Plate 1 x 4 72 Plate 2 x 6 8 Plate 2 x 10 3 Plate 6 x 6 15 Plate 2 x 16 8 Plate 1 x 10 20 Technic Pins Technic Axle Pin 3L with Friction Ridges Lengthwise and 1L Axle 1 Tiles Round and Curved Tile Round 2 x 2 with Bottom Stud Holder 1 Panels Panel 1 x 4 x 1 with Rounded Corners [Thin Wall] 3 Panel 1 x 2 x 1 [Rounded Corners] 8 Panel 1 x 4 x 3 [Side Supports Hollow Studs] 3 Flags, Signs, Plastics and Cloth Road Sign Clip-on 2 x 2 Square [Thick Open O Clip] 1 Minifig Accessories Weapon Gun Trigger 1 Weapon Gun Pistol Revolver Large Barrel [Old Style] 1 2 Torch (Space) [No Grooves] 1 Pistol Two Barrel 2 Equipment Binoculars 6 Tool Jackhammer Motor Hammer 1 Equipment Zip Line Handle 5 Tiles Special Tile 2 x 2 Round with Hole 1 Tile Special 1 x 1 with Clip with Rounded Edges 139 Tile Special 1 x 2 Grille with Bottom Groove 69 Tile Special 1 x 2 with Handle 5 Tile Special 2 x 2 with Pin 4 Tile Special 2 x 2 Corner with Cut Corner - Facet 2 Tile Special 4 x 4 with Studs on Edge 5 Transportation - Land Vehicle Mudguard 4 x 2 1 2 x 2 1 3 with Arch Round 2 Minifig Handlebars 4 Plates Angled Wedge Plate 3 x 6 Cut Corners 2 Wedge Plate 4 x 6 Cut Corners 2 Wedge Plate 4 x 2 Right 3 Wedge Plate 4 x 2 Left 4 Wedge Plate 3 x 2 Right 4 Wedge Plate 3 x 2 Left 1 Wedge Plate 8 x 3 Right 8 Wedge Plate 8 x 3 Left 8 Wedge Plate 6 x 3 Right 1 Wedge Plate 6 x 3 Left 1 Tiles Tile 1 x 4 with Groove 22 Tile 2 x 2 with Groove 15 Tile 1 x 2 with Groove 25 Tile 1 x 1 with Groove 1 2 Tile 1 x 8 with Groove 4 Tile 1 x 3 13 Tile 1 x 6 with Groove 2 Tile 2 x 4 with Groove 7 Bricks Special Brick Special 1 x 2 with Grill 5 Brick Special 2 x 2 with 2 Pins and Axle Hole 19 Brick Special 1 x 2 Palisade [aka Log] 4 Brick Special 1 x 2 with Handle 1 Brick Special 1 x 1 with Headlight and No Slot 38 Brick Special 1 x 1 Studs on 4 Sides 2 Brick Special 1 x 1 with Studs on 2 Sides 4 Brick Special 1 x 1 with Clip Vertical [Open O Clip, Hollow Stud] 1 Brick Special 2 x 2 with Pin and Axle Hole 12 Bricks Brick 2 x 4 2 Brick 2 x 3 3 Brick 1 x 1 32 Brick 1 x 6 9 Brick 1 x 3 1 Brick 1 x 10 3 Plates Round and Dishes Plate Round Corner 3 x 3 2 Plate Round 2 x 2 with Axle Hole Type 1 (+ Opening) 24 Plate Round 4 x 4 with Pin Hole 2 Plate Round 1 x 1 with Solid Stud 56 5 Hinges, Arms and Turntables Hinge Brick 1 x 2 Locking with 2 Fingers Vertical End 20 Hinge Plate 1 x 2 Locking with 1 Finger On Top 5 Hinge Cylinder 1 x 2 Locking with 2 Click Fingers and Axle Hole 17 Hinge Brick 1 x 2 Base 10 Hinge Tile 1 x 3 Locking with 1 Finger on Top 2 Hinge Plate 1 x 2 Locking with 1 Finger on Side, with Groove 14 Hinge Plate 1 x 4 Swivel Top Base [Complete Assembly] 2 Plate Special 4 x 6 with Trap Door Hinge [Long Pins] 1 Bricks Sloped Slope 45° 2 x 4 4 Slope 45° 2 x 2 6 Slope 45° 2 x 1 with Bottom Pin 40 Slope 33° 3 x 2 5 Slope Inverted 45° 2 x 1 8 Slope Inverted 33° 3 x 2 [Connections between Studs] 2 Slope 33° 3 x 1 11 Slope Inverted 45° 6 x 1 Double with 1 x 4 Cutout 1 Slope 30° 1 x 1 x 2 3 (Cheese Slope) 2 56 Slope 18° 2 x 1 x 2 3 with 4 Slots 13 Slope 30° 1 x 2 x 2 3 1 3 with Buttons And Red Screens Print 4 Slope 45° 2 x 1 with 2 3 Cutout [Original Version] 5 Minifig Upper Body Torso Mechanical, Battle Droid 2 Arm Mechanical [Battle Droid] 5 3 Bricks Round and Cones Brick Round 1 x 1 Open Stud 19 Cone 1 x 1 [Top Groove] 20 Technic Bricks Technic Brick 1 x 2 [2 Holes] 12 Technic Brick 1 x 2 [1 Hole] 4 Technic Brick 1 x 16 [15 Holes] 50 Technic Brick 1 x 6 [5 Holes] 27 Technic Brick 1 x 1 with Hole 6 Technic Beams Technic Beam 1 x 3 Thick 8 Technic Beam 1 x 7 Thick 2 Technic Beam 1 x 11 Thick 4 Technic Beam 1 x 3 Thin 6 Technic Axles Technic Axle 8 with Stop 1 Technic Axle 5.5 With Stop [Rounded Short End] 1 Technic Special Technic Brick 1 x 2 with Hole and Dual Beam Extensions 4 Light Bluish Gray Plates Special Bracket 1 x 2 - 1 x 4 [Rounded Corners] 12 Bracket 5 x 2 x 1 1 3 3 Plate Special 1 x 2 with Clip Horizontal on Side 4 Plate Special 1 x 2 5.9mm End Cup 2 Plate Special 1 x 2 with 1 Stud with Groove and Inside Stud Holder (Jumper) 22 Plate Special 1 x 2 with Pin Hole 33 Plate Special 2 x 4 Pin Holes on Bottom Dia. 4.85 4 Plate Special 2 x 2 with 2 Pin Holes 2 Plate Special 2 x 8 with Door Rail 10 Plate Special 1 x 2 with Door Rail 33 Technic Plate 2 x 4 [3 Holes] 31 Plate Special 1 x 2 with Handles [Flat Ends Low Attachment] 2 Plate Special 2 x 2 with Grills 6 Bracket 1 x 2 - 2 x 2 5 Plate Special 1 x 8 with Door Rail 6 Plate Special 1 x 4 Offset 1 Plate Special 1 x 2 with Long Stud Receptacle (Space Wing) 1 Plate Special 1 x 2 with Clips Horizontal [Open O Clips] 5 Plate Special 1 x 1 with Clip Vertical [Thick Open O Clip] 16 Plate Special 1 x 1 with Clip Horizontal [Thick Open O Clip] 1 Plate Special 2 x 2 with Groove and Center Stud (Jumper) 12 Plate Special 1 x 2 with Arm Up [Horizontal Arm 5mm] 8 Plate Special 1 x 2 [Top Clip] 18 Plate Special 1 x 4 with 2 Studs 14 Plate Special 2 x 2 x 0.667 with Two Studs On Side and Two Raised 8 Bracket 1 x 2 - 2 x 2 Inverted 13 Bracket 1 x 2 - 1 x 2 2 Bricks Curved Slope Curved 4 x 1 No Studs [Stud Holder with Symmetric Ridges] 12 Slope Curved 2 x 1 No Studs [1 2 Bow] 16 Slope Curved 2 x 2 x 2 3 5 Brick Arch 1 x 8 x 2 Raised 6 Brick Arch 1 x 3 x 2 Inverted [Inside Bow] 26 Slope Curved 2 x 1 Inverted 9 Slope Curved 3 x 2 No Studs 66 Brick Curved 2 x 2 x 2 3 Two Studs and Curved Slope End 2 Slope Curved 3 x 1 No Studs 5 Slope Brick Curved 2 x 4 x 2 3 No Studs, with Bottom Tubes 2 3 No Studs, with Bottom Tubes and Black Lines and 3 Hatches Print 2 Tiles Special Tile Special 2 x 2 Inverted 10 Tile 2 x 2 Round with Hole 2 Tile Special 1 x 1 with Clip with Rounded Edges 15 Tile Special 1 x 2 Grille with Bottom Groove 20 Tile Special 1 x 2 with Handle 2 Tile Special 2 x 2 with Pin 5 Tile Special 2 x 2 Corner with Cut Corner - Facet 13 Tile Special 6 x 12 with Studs on Edges 2 Tile Special 4 x 4 with Studs on Edge 62 Tile Special 4 x 6 with Studs on Edges 30 Tile Special 4 x 3 with 4 Studs in Centre 37 Bricks Special Brick Special 1 x 2 with Studs on 1 Side 16 Brick Special 1 x 2 x 1 2 3 with four studs on one side 18 Brick Special 1 x 2 with Grill 26 Brick Special 1 x 1 with Handle 4 Brick Special 1 x 2 with Groove 8 Brick Special 1 x 2 x 2 3 with Studs on Sides 3 Brick Special 1 x 2 with Studs on 2 Sides 6 Brick Special 1 x 1 with Clip Vertical [Open O Clip, Hollow Stud] 8 Brick Special 1 x 1 with Clip Horizontal 4 Brick Special 1 x 1 with Stud on 1 Side 2 Plates Plate 3 x 3 13 Plate 2 x 2 Corner 8 Plate 2 x 4 63 Plate 2 x 3 105 Plate 2 x 2 17 Plate 1 x 2 73 Plate 1 x 1 3 15 Plate 6 x 16 4 Plate 6 x 12 1 Plate 4 x 12 8 Plate 4 x 10 2 Plate 4 x 4 6 Plate 4 x 6 15 Plate 6 x 10 1 Plate 2 x 8 11 Plate 4 x 8 6 Plate 6 x 8 6 Plate 6 x 14 2 Plate 1 x 8 35 Plate 1 x 3 23 Plate 1 x 6 60 Plate 1 x 4 31 Plate 2 x 6 49 Plate 2 x 10 8 Plate 6 x 6 3 Plate 8 x 8 9 Plate 2 x 16 4 Plate 1 x 10 20 Plate 1 x 12 4 Plates Round and Dishes Plate Round 6 x 6 with Hole 2 Plate Round Corner 4 x 4 32 Dish 4 x 4 Inverted [Radar] 2 Plate Round 2 x 2 with Axle Hole Type 1 (+ Opening) 4 Dish 6 x 6 Inverted [Radar Webbed anti-studs at 90°] 7 Dish 2 x 2 Inverted [Radar] 4 Dish 10 x 10 Inverted (Radar) with Radiating Spokes Print on Concave Side (Millennium Falcon UCS - 2nd edition) 1 Plate Round 4 x 4 with Pin Hole 10 Plate Round 1 x 1 with Open Stud 26 4 Wheels and Tyres Wheel 18 x 8 with Fake Bolts and Deep Spokes with Inner Ring 5 Wheel 31 x 15 Technic 1 Transportation - Land Vehicle Exhaust Pipe with Technic Pin - Flat End 1 Vehicle Steering Wheel Small, 2 x 2 [Reinforced] 3 Minifig Handlebars 4 Minifig Handlebars with Angular Handles 3 Tiles Tile 2 x 2 Corner 15 Tile 1 x 4 with Groove 47 Tile 2 x 2 with Groove 39 Tile 1 x 2 with Groove 69 Tile 1 x 2 with Stylised Computer Console Print 4 Tile 1 x 1 with Groove 10 53 Tile 1 x 8 with Groove 21 Tile 1 x 3 31 Tile 1 x 6 with Groove 27 Tile 2 x 4 with Groove 22 Technic Beams Special Technic Beam 3 x 5 Thick [90° Offset Centre Beam Holes] 4 Tiles Round and Curved Tile Round 2 x 2 with Bottom Stud Holder 2 Tile Round 2 x 2 with Bottom Stud Holder with Fine Mesh Grille Print 3 Tile 1 x 1 Half Circle 2 6 Tile 4 x 4 Macaroni 32 Tile Round 1 x 1 7 30 Panels Panel 1 x 4 x 1 with Rounded Corners [Thin Wall] 15 Panel 1 x 2 x 1 [Rounded Corners] 10 Panel 1 x 6 x 5 3 Panel 1 x 1 x 1 Corner 5 Panel 1 x 2 x 3 [Side Supports Hollow Studs] 4 Panel 1 x 2 x 2 [Side Supports Hollow Studs] 1 Panel 2 x 2 x 1 Corner 1 Technic Special Technic Link Tread with Beveled Edge 1 4 Technic Disk 3 x 3 2 Bricks Sloped Slope 45° 2 x 1 with 2 3 Cutout [New Version] 12 Slope 45° 2 x 4 4 Slope 45° 2 x 3 12 Slope 45° 2 x 1 with Bottom Pin 24 Slope 45° 2 x 2 Double Convex 10 Slope Inverted 45° 2 x 1 4 Slope 33° 3 x 1 15 Slope 45° 2 x 8 6 Slope 75° 2 x 1 x 3 with Hollow Stud 4 Slope 30° 1 x 1 x 2 3 (Cheese Slope) 46 8 Slope 18° 4 x 1 2 Slope 65° 2 x 1 x 2 16 Slope 18° 2 x 1 x 2 3 with 4 Slots 36 Slope 30° 1 x 2 x 2 3 20 Bricks Round and Cones Brick Round 2 x 2 with Pin Holes 2 Brick Round 1.5 x 1.5 Dome Top with Porg Print 2 Cone Half 10 x 5 x 6 [Plain] 1 Brick Round 2 x 2 Dome Top - Hollow Stud with Bottom Axle Holder x Shape + Orientation 8 Brick Round 2 x 2 with Axle Hole 5 Brick Round Corner 4 x 4 Macaroni Wide with 3 Studs 8 Brick Round 2 x 2 [Grill] 34 Technic Connectors Technic Pin Connector Hub with 1 Axle 5 Technic Axle and Pin Connector Angled #6 - 90° 10 Technic Axle Connector with Axle Hole 6 Technic Pin Connector Round [Slotted] 35 Technic Axle and Pin Connector Perpendicular Triple 1 Bars, Ladders and Fences 3.2 SHAFT W 3.2 HOLE 8 Bar 4L (Lightsaber Blade Wand) 6 Antenna 1 x 4 with Flat Top 8 Bar 1 x 3 [Clip Anti-Stud] 13 Bar 7 x 3 with Double Clips (Ladder) 1 Bar 6L with Stop Ring 17 Bar 5L with Handle (Friction Ram) 12 Bar 3L 58 7 Bar 1L with Top Stud and Two Side Studs 1 Bar 1 x 12 with 1 x 2 Plate End with Hollow Studs and 1 x 1 Round Plate End 3 Plates Angled Wedge Plate 3 x 3 Cut Corner 5 Wedge Plate 6 x 12 Left 13 Wedge Plate 6 x 12 Right 10 Wedge Plate 4 x 4 Cut Corner 9 Wedge Plate 4 x 6 Cut Corners 3 Wedge Plate 4 x 2 Right 22 Wedge Plate 4 x 2 Left 16 Wedge Plate 4 x 4 with 2 x 2 Cutout 2 Wedge Plate 3 x 2 Right 31 Wedge Plate 3 x 2 Left 38 Wedge Plate 12 x 3 Left 2 Wedge Plate 12 x 3 Right 2 Wedge Plate 8 x 3 Right 1 Wedge Plate 8 x 3 Left 1 Wedge Plate 2 x 4 4 Wedge Plate 6 x 3 Right 40 Wedge Plate 6 x 3 Left 40 Wedge Plate 6 x 6 Cut Corner 15 Bricks Brick 2 x 6 12 Brick 1 x 16 6 Brick 2 x 4 4 Brick 2 x 2 4 Brick 1 x 1 4 Brick 1 x 6 2 Brick 1 x 4 15 Brick 1 x 3 9 Brick 1 x 10 9 Brick 1 x 12 5 Minifig Accessories Equipment Binoculars 27 Tap 1 x 1 without Hole in Spout 5 29 Equipment Hose Nozzle with Side String Hole Simplified 24 6 Weapon Lightsaber Hilt with Bottom Ring 1 Equipment Telescope 9 Weapon Gun Torch (Space) [No Grooves] 1 Money Gold Bar [Ingot] 70 Hinges, Arms and Turntables Hinge Brick 1 x 2 Locking with 2 Fingers Vertical End 14 Hinge Plate 1 x 2 Locking with 1 Finger On Top 16 Hinge Cylinder 1 x 2 Locking with 2 Click Fingers and Axle Hole 5 Hinge Cylinder 1 x 3 Locking with 1 Finger and 2 Fingers On Ends, with Hole 14 Turntable 2 x 2 Plate - Top 1 Hinge Brick 1 x 2 Top Plate Thin 2 Hinge Plate 1 x 2 Locking with 1 Finger On End, with Groove 8 Hinge Plate 1 x 2 Locking with 2 Fingers on Side 4 Hinge Brick 2 x 2 Top Plate Thin 3 Turntable 4 x 4 Square Base, Locking 1 Hinge Plate 2 x 2 Locking with 1 Finger on Top 18 Hinge Plate 2 x 4 with Pin Hole - Top 4 Minifig Headwear Minifig Helmet Rebel Pilot (Star Wars) 1 Minifig Conical Asian Style Hat 1 Minifig Upper Body Arm Mechanical [Battle Droid] 5 10 Technic Bricks Technic Brick 1 x 2 [2 Holes] 4 Technic Brick 4 x 4 Open Center 4 Technic Brick 1 x 2 [1 Hole] 16 Technic Brick 1 x 4 [3 Holes] 22 Technic Brick 1 x 8 [7 Holes] 18 Technic Brick 1 x 12 [11 Holes] 16 Technic Pins Technic Pin Long with Friction Ridges Lengthwise and Stop Bush 75 Technic Pin without Friction Ridges Lengthwise 1 2 Technic Pin 1 2 30 6 2 with 2L Bar Extension 2 Technic Axles Technic Axle 5 4 Technic Axle 7 7 Technic Axle 3 11 Technic Bushes Technic Bush 1 2 Smooth with Axle Hole Semi-Reduced 5 50 Technic Gears Technic Driving Ring Extension 2 Technic Gear Rack 1 x 4 5 Technic Beams Technic Beam 1 x 5 Thick 4 Technic Beam 3 x 5 L-Shape Thick 12 Technic Beam 1 x 9 Thick 4 Technic Beam 1 x 13 Thick 4 Bricks Wedged Wedge 4 x 2 Triple Left 1 Wedge 4 x 2 Triple Right 1 Wedge 4 x 4 Triple with Stud Notches 2 Pneumatics Pneumatic T-Piece (T Bar) [New Style] 6 2 Transportation - Sea and Air Boat Mast Rigging Long 28 x 4 2 Tubes and Hoses Hose, Rigid 3mm D. 16L 12.8cm 1 Hose, Rigid 3mm D. 20L 16cm 1 8 White Plates Special Plate Special 2 x 2 with 1 Pin Hole [Complete Underside Rib] 22 Technic Plate 2 x 8 [7 Holes] 4 Plate Special 1 x 2 with 1 Stud with Groove (Jumper) 1 Plate Special 1 x 8 with Door Rail 1 Plate Special 1 x 2 with Clips Horizontal [Open O Clips] 8 Bricks Special Brick Special 1 x 2 with Studs on 1 Side 1 Plates Plate 3 x 3 16 Plate 2 x 3 1 Plate 1 x 1 2 1 Plate 2 x 8 2 Plate 4 x 8 1 Plate 1 x 4 4 Bricks Curved Slope Curved 2 x 2 x 2 3 2 Tiles Special Tile Special 1 x 2 with Handle 1 Plates Angled Wedge Plate 3 x 3 Cut Corner 4 Wedge Plate 4 x 4 Cut Corner 2 Bricks Brick 1 x 1 1 Brick 1 x 6 3 Minifig Accessories Minifig Shield Rectangular with 4 Studs 8 Bricks Sloped Slope 45° 2 x 1 with Bottom Pin 1 Hinges, Arms and Turntables Hinge Brick 1 x 2 Locking with 1 Finger Horizontal End 8 Hinge Plate 1 x 2 Locking with 2 Fingers on Side 1 Tiles Tile 1 x 1 with Groove 1 Tile 1 x 8 with Groove 1 Tile 1 x 3 1 Technic Connectors Technic Axle and Pin Connector Angled #1 6 Technic Beams Technic Beam 1 x 7 Bent (4 - 4) Thick 2 Technic Bricks Technic Brick 1 x 2 [1 Hole] 4 Tan Bricks Curved Brick Curved 1 x 4 x 1 1 3 No Studs, Curved Top with Raised Inside Support 3 Bricks Brick 2 x 2 Corner 4 Brick 1 x 6 5 Brick 1 x 4 2 Brick 1 x 3 9 Plates Round and Dishes Plate Round 2 x 2 with Rounded Bottom [Boat Stud] 12 Plate Round 1 x 1 with Solid Stud 1 Bricks Special Brick Special 1 x 2 Palisade [aka Log] 7 Brick Special 1 x 4 with 4 Studs on One Side 9 Brick Special 2 x 2 with Pin and Axle Hole 16 Plates Plate 2 x 3 67 Plate 4 x 4 1 Plate 4 x 6 17 Plate 4 x 8 1 Plate 1 x 8 57 Plate 2 x 6 4 Plate 2 x 16 4 Plate 1 x 10 4 Plate 2 x 14 4 Tiles Tile 2 x 2 with Groove 6 Tile 1 x 2 with Groove 19 Technic Bricks Technic Brick 1 x 2 [2 Holes] 5 Technic Pins Technic Pin 3 4 1 3 Technic Axle Pin without Friction Ridges Lengthwise 6 Bricks Sloped Slope Inverted 45° 2 x 2 [Ovoid Bottom Pin, Bar-sized Stud Holes] 4 Slope 75° 2 x 1 x 3 with Hollow Stud 1 Slope 18° 4 x 1 2 Slope 30° 1 x 2 x 2 3 29 Plates Special Plate Special 1 x 2 [Side Handle Closed Ends] 12 Plate Special 1 x 1 with Tooth 2 Plate Special 2 x 2 x 0.667 with Two Studs On Side and Two Raised 8 Dark Red Bricks Curved Slope Curved 4 x 1 No Studs [Stud Holder with Symmetric Ridges] 4 Slope Curved 2 x 1 No Studs [1 2 Bow] 2 Tiles Special Tile Special 1 x 1 with Clip with Rounded Edges 4 Tile Special 4 x 4 with Studs on Edge 1 Plates Plate 2 x 2 Corner 4 Plate 2 x 4 33 Plate 1 x 2 14 Plate 1 x 3 10 Plate 1 x 6 29 Plate 1 x 4 1 Tiles Tile 1 x 4 with Groove 6 Tile 2 x 2 with Groove 4 Tile 1 x 2 with Groove 7 Tile 1 x 1 with Groove 3 2 Tile 1 x 3 1 Plates Angled Wedge Plate 3 x 3 Cut Corner 1 Wedge Plate 4 x 4 Cut Corner 1 Wedge Plate 4 x 2 Right 2 Wedge Plate 4 x 2 Left 1 Wedge Plate 2 x 4 4 Bricks Brick 1 x 2 4 Technic Bricks Technic Brick 1 x 2 with Axle Hole Type 1 [+ Opening] and Bottom Pin 4 Bricks Sloped Slope Inverted 45° 2 x 1 4 Slope 33° 3 x 1 4 Blue Plates Special Bracket 5 x 2 x 1 1 3 4 Technic Plate 2 x 4 [3 Holes] 2 Plates Plate 2 x 2 Corner 2 Plate 2 x 12 2 Plate 2 x 4 2 Plate 2 x 2 17 Bricks Special Brick Special 2 x 2 with 2 Pins and Axle Hole 8 Brick Special 1 x 1 with Stud on 1 Side 2 Bricks Brick 1 x 1 10 Technic Bricks Technic Brick 1 x 12 [11 Holes] 2 Technic Beams Technic Beam 1 x 2 Thin 8 Technic Pins Technic Pin 1 2 29 3 Technic Axle Pin with Friction Ridges Lengthwise 66 Technic Pin Long with Friction Ridges Lengthwise 139 Black Minifig Accessories Sports Roller Skate 5 3 Equipment Paint Roller Brush Handle Edge On Handle 2 Weapon Crossbow Shooter 1 Tap 1 x 1 without Hole in Spout 2 4 Weapon Gun Blaster Short (Star Wars) 1 Blaster Small (Star Wars) 2 Equipment Hose Nozzle with Side String Hole Simplified 1 Bricks Curved Slope Curved 2 x 1 No Studs [1 2 Bow] 1 Slope Curved 2 x 1 Inverted 17 Technic Connectors Technic Pin Connector 3L with 2 Pins and Center Hole 43 Technic Axle and Pin Connector Angled #2 - 180° 2 Technic Axle Connector with Axle Hole 6 Technic Axle and Pin Connector Toggle Joint Smooth 1 Technic Pin Connector Plate 1 x 2 x 1 2 3 [Two Holes On Top] 2 Technic Axle Connector Double Flexible [Rubber] 1 Tiles Special Tile Special 1 x 1 with Clip with Rounded Edges 16 Tile Special 1 x 2 Grille with Bottom Groove 102 Tile Special 2 x 2 with Only 2 studs 1 Technic Pins Technic Axle Pin 3L with Friction Ridges Lengthwise and 2L Axle 21 Technic Pin with Friction Ridges Lengthwise and Center Slots 269 11 Technic Pin Long with Friction Ridges Lengthwise and Stop Bush 1 Plates Plate 2 x 2 Corner 2 Plate 2 x 12 6 Plate 2 x 2 8 Plate 1 x 1 2 1 Plate 4 x 12 2 Plate 4 x 8 2 Plate 1 x 3 11 Plate 2 x 10 1 Plate 2 x 16 4 Plate 1 x 12 1 Plate 2 x 14 1 Bricks Brick 2 x 6 1 Brick 2 x 4 3 Brick 2 x 2 3 Brick 1 x 2 1 Brick 1 x 4 1 Tiles Round and Curved Tile Round 1 x 1 Quarter 7 2 Plates Special Plate Special 1 x 2 Side Handle [Free Ends] 1 Plate Special 1 x 4 with Wheels Holder 2 Technic Plate 2 x 6 [5 Holes] 14 Plate Special 1 x 2 with Clips Horizontal [Open O Clips] 6 Plate Special 1 x 2 with Clip Horizontal on End 2 Plate Special 1 x 2 [Top Clip] 1 Bracket 1 x 2 - 2 x 2 Inverted 2 Bracket 1 x 2 - 1 x 2 Inverted 6 Plates Round and Dishes Plate Round 2 x 2 with Rounded Bottom [Boat Stud] 5 Dish 4 x 4 Inverted [Radar] with Dejarik Table Print 1 Plate Round 2 x 2 with Axle Hole Type 1 (+ Opening) 5 Hinges, Arms and Turntables Hinge Brick 1 x 2 Locking with 1 Finger Vertical End 12 Turntable 2 x 2 Plate, Base 1 Hinge Brick 1 x 2 Top Plate Thin 2 Hinge Plate 1 x 2 Locking with 2 Fingers On End, with Groove 1 Hinge Brick 2 x 2 Top Plate Thin 6 Bricks Sloped Slope 45° 2 x 4 1 Slope 45° 2 x 2 2 Slope 33° 3 x 1 3 Slope 30° 1 x 1 x 2 3 (Cheese Slope) 2 1 Slope 18° 2 x 1 x 2 3 with 4 Slots 2 Slope 30° 1 x 2 x 2 3 6 Slope 45° 2 x 1 with 2 3 Cutout [Original Version] 7 Minifig Upper Body Arm Mechanical [Battle Droid] 1 4 Bricks Special Brick Special 1 x 4 with 4 Studs on One Side 6 Brick Special 1 x 2 with Studs on 2 Sides 8 Brick Special 1 x 1 with Clip Horizontal 2 Brick Special 1 x 1 with Stud on 1 Side 1 Tiles Tile 1 x 2 with Groove 3 Tile 2 x 4 with Groove 1 Tile 8 x 16 with Bottom Tubes 1 Technic Bricks Technic Brick 1 x 14 [13 Holes] 14 Technic Brick 4 x 6 Open Center 12 Technic Brick 6 x 8 with Open Center 4 x 6 8 Technic Brick 5 x 5 Right Angle (1 x 4 - 1 x 4) 34 Technic Brick 1 x 6 [5 Holes] 4 Technic Special Technic Plate 1 x 5 with Smooth Ends, 4 Studs and Centre Axle Hole 1 Technic Beams Technic Beam 2 x 4 L-Shape Thick 20 Technic Beam 1 x 3 Thick 4 Technic Beam 1 x 2 Thin 2 Technic Axles Technic Axle 4 4 Technic Axle 6 8 Technic Axle 12 7 Technic Gears Technic Gear Rack 1 x 4 1 Panels Panel 1 x 2 x 1 [Rounded Corners] 2 Panel 1 x 4 x 3 [Side Supports Hollow Studs] 2 Bars, Ladders and Fences Bar 1L with Clip [Cut Edges and One Side Hole] 3 1 Bar 3L 1 Bricks Round and Cones Brick Round 4 x 4 [Centre Hole] 1 Containers Bucket 1 x 1 x 1 Handle 1 Red Plates Special Plate Special 1 x 2 with Pin Hole on Top 8 Plate Special 1 x 4 with 2 Studs 8 Bricks Brick 2 x 4 4 Brick 1 x 4 2 Bricks Sloped Slope 45° 2 x 2 2 Technic Connectors Technic Axle Connector with Axle Hole 8 Technic Pin Connector Round [Slotted] 6 Technic Pins Technic Pin Long with Friction Ridges Lengthwise and Stop Bush 20 Technic Axles Technic Axle 2 Notched 11 Technic Beams Technic Beam 1 x 3 Thick 26 Technic Beam 1 x 7 Thick 4 Technic Bricks Technic Brick 1 x 8 [7 Holes] 2 Technic Brick 1 x 6 [5 Holes] 4 Plates Round and Dishes Plate Round 2 x 2 with Axle Hole Type 1 (+ Opening) 2 Bricks Special Brick Special 1 x 2 with Studs on 2 Sides 2 Plates Plate 1 x 12 4 Reddish Brown Plants and Animals Cattle Horn - Long 1 Tiles Special Tile Special 1 x 1 with Clip with Rounded Edges 2 Tile Round 1 x 1 with Pin 1 Plates Plate 2 x 12 1 Plate 2 x 2 23 Plate 1 x 8 8 Plate 2 x 10 10 Technic Bricks Technic Brick 1 x 4 [3 Holes] 23 Bricks Sloped Slope Inverted 33° 3 x 1 (34°) 1 Dark Tan Plants and Animals Bat Wing with Shaft [Chima Bat Wing] 2 Plates Special Plate Special 1 x 2 with 1 Stud with Groove and Inside Stud Holder (Jumper) 32 Plate Special 2 x 2 with Pin on Bottom 22 Plate Special 1 x 2 with Door Rail 1 Plate Special 2 x 2 with Groove and Center Stud (Jumper) 1 Plate Special 1 x 4 with 2 Studs 1 Plates Plate 4 x 4 Corner 10 Plate 2 x 4 14 Plate 2 x 3 26 Plate 1 x 2 243 Plate 1 x 1 14 1 Plate 6 x 16 4 Plate 2 x 8 3 Plate 1 x 4 35 Plate 2 x 6 5 Bricks Brick 1 x 2 10 Tiles Tile 1 x 2 with Groove 1 Tile 1 x 1 with Groove 38 8 Tile 1 x 3 2 Tile 1 x 6 with Groove 10 Plates Angled Wedge Plate 3 x 2 Left 1 Wedge Plate 8 x 3 Right 2 Wedge Plate 8 x 3 Left 3 Wedge Plate 2 x 4 3 Panels Panel 1 x 2 x 1 [Rounded Corners] 10 Technic Axles Technic Axle 3 with Stud 1 Hinges, Arms and Turntables Plate Special 4 x 6 with Trap Door Hinge [Long Pins] 2 Dark Blue Plates Special Bracket 3 x 2 x 1 1 3 5 Tiles Tile 2 x 2 with Groove 2 Trans-Clear Plates Round and Dishes Dish 6 x 6 Inverted - No Studs with Handle with SW Millennium Falcon Cannon Window Print 2 Dish 6 x 6 Inverted (Radar) with Solid Studs and Radial Millennium Falcon Cockpit Print 1 Bricks Round and Cones Cone Half 10 x 5 x 6 with SW Millennium Falcon Cockpit Print 1 Plates Plate 1 x 2 2 Flat Silver Tiles Special Tile Special 1 x 2 Grille with Bottom Groove 32 Plates Round and Dishes Plate Round 1 x 1 with Solid Stud 3 21 Technic Connectors Technic Pin Connector Round [Slotted] 6 Minifig Accessories Weapon Gun Blaster Small (Star Wars) 1 Medium Blue Bricks Brick 2 x 2 1 Medium Dark Flesh Bricks Brick 1 x 1 15 Bricks Sloped Slope 45° 2 x 1 with Bottom Pin 6 Orange Plates Plate 2 x 4 2 Plate 2 x 2 4 Plates Round and Dishes Plate Round 1 x 1 with Solid Stud 2 1 Tools Brick and Axle Separator v2.0 1 Yellow Plates Plate 2 x 2 4 Plate 2 x 8 4 Plate 1 x 4 6 Plates Special Plate Special 1 x 2 with Door Rail 6 Plate Special 1 x 2 with Clip Horizontal on End 9 Technic Bushes Technic Bush 1 2 Smooth with Axle Hole Semi-Reduced 4 1 Technic Beams Technic Beam 1 x 4 Thin 8 Technic Beam 1 x 7 Thick 1 Technic Beam 3 x 3 T-Shape Thick 2 Bricks Sloped Slope Inverted 45° 2 x 2 [Ovoid Bottom Pin, Bar-sized Stud Holes] 1 Plates Round and Dishes Plate Round 2 x 2 with Axle Hole Type 1 (+ Opening) 2 Technic Axles Technic Axle 3 28 Technic Connectors Technic Axle Connector Smooth [with x Hole + Orientation] 4 Hinges, Arms and Turntables Hinge Plate 1 x 4 Swivel Top Base [Complete Assembly] 2 Trans-Green Plates Plate 1 x 1 1 2 Plates Round and Dishes Plate Round 1 x 1 with Solid Stud 2 1 [No Color Any Color] Stickers Sticker Sheet for Set 75192-1 (34499 6195703) 1 Green Plates Plate 2 x 10 8 Medium Azure Technic Beams Technic Beam 1 x 2 Thick with Pin Hole and Axle Hole 6 Trans-Red Plates Round and Dishes Plate Round 1 x 1 with Solid Stud 1 3 Tiles Round and Curved Tile Round 1 x 1 1 2 Olive Green Tiles Tile 1 x 3 4 Trans-Light Blue Tubes and Hoses Hose ribbed 7mm 26L 6 Bionicle, Hero Factory and Constraction Hero Factory Weapon Barrel with 2 Pin Holes and 3 Axle Holes 1
The set can be configured to both old and new Star Wars styles, and can be piloted by either old or young Han Solo, depending on your preference. It contains 8 minifigures, including Princess Leia, Rey, and BB-8. Unfortunately, the set is currently out of stock on lego.com so we’ll need to find a different activity to keep us entertained during quarantine.
millennium_figs <- inventories %>%
filter(inventory_id == 19670) %>%
left_join(minifig_inventory, by="inventory_id") %>%
left_join(minifigs, by="fig_num") %>%
select(4, 6, 7)
## Warning: Column `fig_num` joining factors with different levels, coercing to
## character vector
millennium_figs
## fig_num name num_parts
## 1 fig-001714 Chewbacca with Dark Brown Fur 3
## 2 fig-001810 Finn 4
## 3 fig-002057 Rey in Crossed Robes 4
## 4 fig-002514 C-3PO with Printed Legs 3
## 5 fig-002544 BB-8 2
## 6 fig-002549 Princess Leia in Hoth Outfit 4
## 7 fig-002550 Han Solo with Dark Brown Legs with Gunbelt 4
## 8 fig-002551 Han Solo (Old) 4
knitr::include_graphics("/post/2020-05-25-blego-the-lego-blog_files/milf_minifigs.png")
Colors of the Millennium (the year 2000)
After looking in depth at the Millennium Falcon, we found ourselves wondering about what the most common colors in other lego sets are. And continuing with our “millennium” theme, we looked at lego sets that were released in the year 2000. The treemap package turned out to be frustrating to work with. There isn’t a lot of documentation, and any documentation hasn’t been updated since 2017. Ideally, the treemap would be colored by the color of the part represented, but we couldn’t figure out how to fix that. Either way, the figure shows that black and light grey were the most common colors used in 2000, with 8660 black pieces and 4962 light grey pieces. The treemap also doesn’t display the numbers, so we had to figure those out with some classic dplyr
techniques.
#treemap
treemap(bigcolors,
index="color",
vSize="n_parts",
type="index"
)
#dataframe
bigcolors %>%
head(10)
## # A tibble: 10 x 2
## color n_parts
## <fct> <int>
## 1 Black 8660
## 2 Light Gray 4962
## 3 Red 3259
## 4 White 2928
## 5 Yellow 2876
## 6 Sand Green 2867
## 7 Dark Gray 2465
## 8 Blue 2372
## 9 Green 1877
## 10 Tan 914
Kelly’s Angels
mosaic <- png::readPNG("iggy-izzy.png") %>%
image_to_mosaic(img_size = 80)
mosaic %>% build_mosaic()
mosaic %>% build_pieces()
On a final note, have you ever wanted see what you would look like made out of lego bricks? Luckily you can actualize your dreams using the brickr
package.
Building the mosaic is surprsingly fairly straightforward. First you have to upload a png file to your R-studio and then using the read:PNG
function to save the image and then pipe it through the build_mosaic
function. In addition, the build_pieces
function gives you a nice run through of the suggested lego pieces to recreate your image.
We had a lot fun creating these graphics and hope you enjoyed them to!