{"id":21129763,"url":"https://github.com/hevalhazalkurt/exploring_the_data_of_lego_history","last_synced_at":"2025-04-13T08:43:03.727Z","repository":{"id":110383714,"uuid":"229036764","full_name":"hevalhazalkurt/exploring_the_data_of_LEGO_history","owner":"hevalhazalkurt","description":"A data exploration project on LEGO history in Python with pandas, matplotlib etc. (WIP)","archived":false,"fork":false,"pushed_at":"2019-12-23T19:52:54.000Z","size":5490,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T00:22:15.147Z","etag":null,"topics":["data","data-analysis","data-science","data-visualization","datascience","datasets","lego","lego-history","matplotlib","pandas","python","python3"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hevalhazalkurt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-19T11:05:03.000Z","updated_at":"2024-11-28T10:32:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"717616c6-f269-4356-adcc-4378cb3a207b","html_url":"https://github.com/hevalhazalkurt/exploring_the_data_of_LEGO_history","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hevalhazalkurt%2Fexploring_the_data_of_LEGO_history","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hevalhazalkurt%2Fexploring_the_data_of_LEGO_history/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hevalhazalkurt%2Fexploring_the_data_of_LEGO_history/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hevalhazalkurt%2Fexploring_the_data_of_LEGO_history/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hevalhazalkurt","download_url":"https://codeload.github.com/hevalhazalkurt/exploring_the_data_of_LEGO_history/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248687624,"owners_count":21145743,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data","data-analysis","data-science","data-visualization","datascience","datasets","lego","lego-history","matplotlib","pandas","python","python3"],"created_at":"2024-11-20T05:28:53.016Z","updated_at":"2025-04-13T08:43:03.706Z","avatar_url":"https://github.com/hevalhazalkurt.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Exploring The Data of LEGO History\nA data exploration project on LEGO history in Python with pandas, matplotlib etc. (WIP)\n\n\u003cbr\u003e\n\n***Data source : [Rebrickable](https://rebrickable.com/downloads/)***\n\u003cbr\u003e\n\n---\n\n## Dataset Informations\n\n\n| Dataset | Description | Columns |\n|--|--|--|\n| `colors.csv` | This file contains information on LEGO colors, including a unique ID for each color, its name, and approximate RGB value, and whether it's transparent | `id` Unique ID for this color. \u003cbr\u003e\u003cbr\u003e`name` The human-readable name of the color. \u003cbr\u003e\u003cbr\u003e `rgb` The approximate RGB color. \u003cbr\u003e\u003cbr\u003e `is_trans` Whether or not the given color is transparent/translucent.|\n| `inventories.csv` | This table contains information on inventories, including a unique ID, it's version and the set number. | `id` Unique ID for this inventory entry. \u003cbr\u003e\u003cbr\u003e `version` Version number. \u003cbr\u003e\u003cbr\u003e `set_num` Set number (form `sets.csv`). |\n| `inventory_parts.csv` | This table contains information part inventories, including a unique ID number, the part number, the color of the part, how many are included and whether it's a spare. | `inventory_id` Unique ID for the inventory this part is appearing in. This is the same as the id value in `inventories.csv`. \u003cbr\u003e\u003cbr\u003e `part_num` Unique ID for the part. \u003cbr\u003e\u003cbr\u003e `color_id` Unique ID for the color, as per `colors.csv`. \u003cbr\u003e\u003cbr\u003e `quantity` The number of copies of this part included in the set! \u003cbr\u003e\u003cbr\u003e `is_spare` Whether or not this is a spare part. Spare parts are additional parts not needed to finish the set. |\n| `inventory_sets.csv` | This file contains information on what inventory is included in which sets, including the inventory ID, the set number and the quantity of that inventory that are included. | `inventory_id` Unique inventory ID from `inventories.csv`. \u003cbr\u003e\u003cbr\u003e `set_num` Unique set ID from `sets.csv`. \u003cbr\u003e\u003cbr\u003e `quantity` The quantity of the inventory included. |\n| `part_categories.csv` | This dataset includes information on the part category (what type of part it is) and a unique ID for that part category. | `id` Unique ID for the part category. \u003cbr\u003e\u003cbr\u003e `name` The category of stuff the part is in. |\n| `part_relationships.csv` | This dataset includes information on the different relationships of parts. | `rel_type` Relationship type of the part. \u003cbr\u003e\u003cbr\u003e `child_part_num` Child part category ID. \u003cbr\u003e\u003cbr\u003e `parent_part_num` Parent category unique ID  |\n| `parts.csv` | This dataset includes information on lego parts, including a unique ID number, the name of the part, and what part category it's from. | `part_num` Unique ID for the part. \u003cbr\u003e\u003cbr\u003e `name` Name of the part. \u003cbr\u003e\u003cbr\u003e `part_cat_id` Part category unique ID (from `part_categories.csv`). |\n| `sets.csv` | This file contains information on LEGO sets, including a unique ID number, the name of the set, the year it was released, its theme and how many parts it includes. | `set_num` Unique set ID. \u003cbr\u003e\u003cbr\u003e `name` The name of the set. \u003cbr\u003e\u003cbr\u003e `year` Year the set was published. \u003cbr\u003e\u003cbr\u003e `theme_id` Unique ID for the theme used for the set (from `themes.csv`). \u003cbr\u003e\u003cbr\u003e `num_parts` The number of parts included in the set. |\n| `themes.csv` | This file includes information on lego themes. Each theme is given a unique ID number, a name, and (if it's part of a bigger theme) which theme it's part of. | `id` Theme unique ID. \u003cbr\u003e\u003cbr\u003e `name` Name of the theme. \u003cbr\u003e\u003cbr\u003e `parent_id` Unique ID for the larger theme, if there is one. |\n\n---\n\n## Basic Understanding of Datasets\n\nThe schema of database :\n\n![](visuals/database_schema_v2.png)\n\n\n---\n\n## Exploring Colors\n\nYou can find source code of this section on `lego_colors.py` file.\n\n\u003cbr\u003e\n\n**First rows of `colors.csv`**\n\n```\n   id            name     rgb is_trans\n0  -1       [Unknown]  0033B2        f\n1   0           Black  05131D        f\n2   1            Blue  0055BF        f\n3   2           Green  237841        f\n4   3  Dark Turquoise  008F9B        f\n```\n\n\n\u003cbr\u003e\n\n\n| Data | Result | Detail |\n|--|--|--|\n| Colors | 179 | The number of colors available |\n| Non-transparent | 151 | Number of non-transparent colors. |\n| Transparent | 28 | Number of transparent colors. |\n\n\u003cbr\u003e\n\n![](visuals/is_trans.png)\n\n![](visuals/main_colors.png)\n\n![](visuals/lego_colors.png)\n\n\u003cbr\u003e\n\n---\n\n## Exploring Sets\n\nYou can find source code of this section on `lego_sets.py` file.\n\n\u003cbr\u003e\n\n**First rows of `sets.csv`**\n\n```\n  set_num                        name  year  theme_id  num_parts\n0   001-1                       Gears  1965         1         43\n1  0011-2           Town Mini-Figures  1978        84         12\n2  0011-3  Castle 2 for 1 Bonus Offer  1987       199          2\n3  0012-1          Space Mini-Figures  1979       143         12\n4  0013-1          Space Mini-Figures  1979       143         12\n```\n\n\n![](visuals/sets_by_year.png)\n\n\n![](visuals/parts_by_year.png)\n\n\n---\n\n## Exploring Themes\n\nYou can find source code of this section on `lego_themes.py` file.\n\n\u003cbr\u003e\n\n**First rows of `sets.csv`**\n\n```\n  set_num                        name  year  theme_id  num_parts\n0   001-1                       Gears  1965         1         43\n1  0011-2           Town Mini-Figures  1978        84         12\n2  0011-3  Castle 2 for 1 Bonus Offer  1987       199          2\n3  0012-1          Space Mini-Figures  1979       143         12\n4  0013-1          Space Mini-Figures  1979       143         12\n```\n\n\u003cbr\u003e\n\n**First rows of `themes.csv`**\n\n```\n   id            name  parent_id\n0   1         Technic        NaN\n1   2  Arctic Technic        1.0\n2   3     Competition        1.0\n3   4  Expert Builder        1.0\n4   5           Model        1.0\n```\n\n![](visuals/toptenthemes.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhevalhazalkurt%2Fexploring_the_data_of_lego_history","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhevalhazalkurt%2Fexploring_the_data_of_lego_history","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhevalhazalkurt%2Fexploring_the_data_of_lego_history/lists"}