Competition (3rd Place) - Board game insights
  • AI Chat
  • Code
  • Report
  • Beta
    Spinner

    Which board game should you play?

    📖 Background

    After a tiring week, what better way to unwind than a board game night with friends and family? But the question remains: which game should you pick? You have gathered a dataset containing information of over 20,000 board games. It's time to utilize your analytical skills and use data-driven insights to persuade your group to try the game you've chosen!

    💾 The Data

    You've come across a dataset titled bgg_data.csv containing details on over 20,000 ranked board games from the BoardGameGeek (BGG) website. BGG is the premier online hub for board game enthusiasts, hosting data on more than 100,000 games, inclusive of both ranked and unranked varieties. This platform thrives due to its active community, who contribute by posting reviews, ratings, images, videos, session reports, and participating in live discussions.

    This specific dataset, assembled in February 2021, encompasses all ranked games listed on BGG up to that date. Games without a ranking were left out because they didn't garner enough reviews; for a game to earn a rank, it needs a minimum of 30 votes.

    In this dataset, each row denotes a board game and is associated with some information.

    ColumnDescription
    IDThe ID of the board game.
    NameThe name of the board game.
    Year PublishedThe year when the game was published.
    Min PlayersThe minimum number of player recommended for the game.
    Max PlayersThe maximum number of player recommended for the game.
    Play TimeThe average play time suggested by game creators, measured in minutes.
    Min AgeThe recommended minimum age of players.
    Users RatedThe number of users who rated the game.
    Rating AverageThe average rating of the game, on a scale of 1 to 10.
    BGG RankThe rank of the game on the BoardGameGeek (BGG) website.
    Complexity AverageThe average complexity value of the game, on a scale of 1 to 5.
    Owned UsersThe number of BGG registered owners of the game.
    MechanicsThe mechanics used by the game.
    DomainsThe board game domains that the game belongs to.

    Source: Dilini Samarasinghe, July 5, 2021, "BoardGameGeek Dataset on Board Games", IEEE Dataport, doi: https://dx.doi.org/10.21227/9g61-bs59.

    import pandas as pd
    boardgame = pd.read_csv('data/bgg_data.csv')

    💪 Challenge

    Explore and analyze the board game data, and share the intriguing insights with your friends through a report. Here are some steps that might help you get started:

    • Is this dataset ready for analysis? Some variables have inappropriate data types, and there are outliers and missing values. Apply data cleaning techniques to preprocess the dataset.
    • Use data visualization techniques to draw further insights from the dataset.
    • Find out if the number of players impacts the game's average rating.

    🧑‍⚖️ Judging criteria

    This is a community-based competition. The top 5 most upvoted entries will win.

    The winners will receive DataCamp merchandise.

    ✅ Checklist before publishing into the competition

    • Rename your workspace to make it descriptive of your work. N.B. you should leave the notebook name as notebook.ipynb.
    • Remove redundant cells like the judging criteria, so the workbook is focused on your story.
    • Make sure the workbook reads well and explains how you found your insights.
    • Try to include an executive summary of your recommendations at the beginning.
    • Check that all the cells run without error.

    ⌛️ Time is ticking. Good luck!

    ✅ Data Validation

    👀 Missing values

    First, I will check for missing values. This is because you can't do other operations without filling them in first, e.g. changing the data type.

    print(boardgame.isna().sum())
    print('Total:',boardgame.isna().sum().sum())

    I see that the ID column has missing values, but it is an unique identifier column, so I will reset the values to an ascending order from 0 to the number of rows there are.

    boardgame['ID'] = list(range(0, len(boardgame['ID'].values)))
    boardgame.head()

    Now, I will set the one missing value in Year Published to the median of that column, because it might contain useful data.

    # Row that has missing values
    display(boardgame[boardgame['Year Published'].isna()==True])
    
    boardgame['Year Published'] = boardgame['Year Published'].fillna(boardgame['Year Published'].median())