Introduction

My Dataset contains data on 71,716 Steam Games from 19997 through 2025, with the largest subset from 20210 to 2023. It contains fields on Game Genres, Prices, reviews, release details, features, tags and more. I decided to focus on some key characteristics like price and Genre to get a sense of how Gaming preferences have evolved over time. Steam is the leading distribution platforms for games, so examining its catalog of released games will allow us to see the trends over time

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
import seaborn as sns
from matplotlib.ticker import FuncFormatter

path = r"\\apporto.com\dfs\LOYOLA\Users\btkramer_loyola\Desktop" + "\\"
filename = path + "games.csv"

df = pd.read_csv(filename)
#df.head()
#df.columns
#df.info(0
#df.isna().sum()
#df.isunique()
#df.describe

#Basic Data Steps
df['Release date'] = pd.to_datetime(df['Release date'], errors='coerce')
df['Year'] = df['Release date'].dt.year
df['Month'] = df['Release date'].dt.month

genres = df[['AppID', 'Genres']].dropna().copy()
genres['Genres'] = genres['Genres'].str.split(',')
genres = genres.explode('Genres')
genres['Genres'] = genres['Genres'].str.strip()

x1 = genres.groupby('Genres')['AppID'].count().reset_index(name='Count')
x1 = x1.sort_values('Count', ascending=False)
x1.reset_index(inplace=True, drop=True)
        

Scatter Plot

My first visualization shows the quantity of games released over time from 2010 to 2022. The years before and after where either incomplete or too sparsely populated to observe meaningful trends. I had a theory that there were more games released during certain months than others, leading me to create. A scatterplot that examined the number of games released by year and by month. This scatterplot showed that in recent years there has been a substantial increase in the quantity of game over time, and that certain months like October (10) and March (3) have tended to have higher numbers especially in recent years. This graph measures the quantity regardless of the popularity of those games, and while there is a clear pattern this growth is not strictly linear.

#Scatter Plot
x = df.loc[(df['Year'] >= 2010) & (df['Year'] <= 2022)]
x = x.groupby(['Year', 'Month'])['AppID'].count().reset_index(name='count')
x['count_scaled'] = x['count'] / 1.5 + 15

plt.figure(figsize=(18,10))

plt.scatter(x['Month'], x['Year'], marker='8', cmap='viridis',
            c=x['count'], s=x['count_scaled'], edgecolors='black')

plt.title('Steam Game Releases by Month and Year', fontsize=18)
plt.xlabel('Months of the Year', fontsize=14)
plt.ylabel('Release Year', fontsize=14)

cbar = plt.colorbar()
cbar.set_label('Number of Games Released', rotation=270, fontsize=14, color='black', labelpad=30)

my_x_ticks = [*range(1, 13, 1)]
plt.xticks(my_x_ticks, fontsize=14, color='black')
my_y_ticks = [*range(x['Year'].min(), x['Year'].max()+1, 1)]
plt.yticks(my_y_ticks, fontsize=14, color='black')
plt.show()

Bar Charts

I decided next to examine the top genres and publishers so I could examine what was most popular. Indie was the most common genre with 48,827 games, followed by Action and Casual with ~28,000 apiece. Games can have multiple genres, as well as multiple publishers. Big Fish Games was the most popular publisher with 460, almost double 8floor. Yet that represents only 0.64% of the total games cataloged. Overall, the leading publishers only represent a small fraction of the available games showing there is massive diversity in game publishers.

# Bar Charts
x2 = df.groupby('Publishers')['AppID'].count().reset_index(name='Count')
x2 = x2.sort_values('Count', ascending=False)
x2.reset_index(inplace=True, drop=True)

#Color picking
def pick_colors_according_to_mean_count(this_data):
    colors=[]
    avg = this_data.Count.mean()
    for each in this_data.Count:
        if each > avg*1.05:
            colors.append('teal')
        elif each < avg*0.95:
            colors.append('orange')
        else:
            colors.append('navy')
    return colors

bottom1 = 0
top1 = 10
d1 = x1.iloc[bottom1:top1]
my_colors1 = pick_colors_according_to_mean_count(d1)

bottom2 = 0
top2 = 20
d2 = x2.iloc[bottom2:top2]
my_colors2 = pick_colors_according_to_mean_count(d2)

Above = mpatches.Patch(color='teal', label='Above Average')
At = mpatches.Patch(color='navy', label='Within 5% of the Average')
Below = mpatches.Patch(color='orange', label='Below Average')

fig = plt.figure(figsize=(13, 12))
fig.suptitle('Steam Marketplace Composition:\n Top 10 Genres and Top 20 Publishers',
             fontsize=18, fontweight='bold')

ax1 = fig.add_subplot(2, 1, 1)
ax1.bar(d1.Genres, d1.Count, label='Count', color=my_colors1)
ax1.legend(handles=[Above, At, Below], fontsize=14)
ax1.axhline(d1.Count.mean(), color='black', linestyle='dashed')
ax1.spines['right'].set_visible(False)
ax1.spines['top'].set_visible(False)
ax1.set_title('Top 10 Genres by Game Count', size=20)
ax1.set_ylabel('Number of Games', fontsize=16)
ax1.tick_params(axis='x', labelrotation=30, labelsize=12)
ax1.tick_params(axis='y', labelsize=14)
ax1.text(7, d1.Count.mean()+1000, 'Mean = ' + str(round(d1.Count.mean(),1)), fontsize=14)

ax2 = fig.add_subplot(2, 1, 2)
ax2.bar(d2.Publishers, d2.Count, label='Count', color=my_colors2)
ax2.legend(handles=[Above, At, Below], fontsize=14)
ax2.axhline(d2.Count.mean(), color='black', linestyle='dashed')
ax2.spines['right'].set_visible(False)
ax2.spines['top'].set_visible(False)
ax2.set_title('Top 20 Publishers by Game Count', size=20)
ax2.set_ylabel('Number of Games', fontsize=16)
ax2.tick_params(axis='x', labelrotation=65, labelsize=11)
ax2.tick_params(axis='y', labelsize=14)
ax2.text(16, d2.Count.mean()+10, 'Mean = ' + str(round(d2.Count.mean(),1)), fontsize=14)

fig.subplots_adjust(hspace=0.65)

plt.show()

Heat Map

My 3rd visualization the heatmap examined the relationship between games Genre, Price, and reviews. The graph shows that there is positive relationship between a games price, and its positive reviews. While different genres change how much of a impact this has, the lowest results consistently came with free or cheaper games and the higher average review percentages came from higher priced games. Some outliers exist like in Sports with the highest average being $10-$19.99. Some genres tended to have lower average ratings, like when comparing the genre of Simulation games with Casual Games. For this visualization I did exclude games with less than 25 reviews in order to prevent skew from rarely rated games.

#Heat Map
hm_df = df[['AppID', 'Price', 'Positive', 'Negative']].copy()

# **Only want >25
hm_df['TotalReviews'] = hm_df['Positive'] + hm_df['Negative']
hm_df = hm_df[hm_df['TotalReviews'] >= 25]
hm_df['PositivePct'] = hm_df['Positive'] / hm_df['TotalReviews'] * 100
hm_df = genres.merge(hm_df, on='AppID')

#top genres
top_genres = x1.head(10)['Genres']
hm_df = hm_df[hm_df['Genres'].isin(top_genres)]
hm_df = hm_df[hm_df['Genres'] != 'Free to Play']


price_bins = [-0.01, 0, 4.99, 9.99, 19.99, 29.99, float('inf')]

price_labels = ['Free', 'Under $5', '$5-$9.99',
                '$10-$19.99', '$20-$29.99', '$30+']



hm_df['PriceRange'] = pd.cut(hm_df['Price'], bins=price_bins,
                             labels=price_labels)
hm_data = pd.pivot_table(hm_df, index='Genres', columns='PriceRange',
                         values='PositivePct', aggfunc='mean')
hm_counts = pd.pivot_table(hm_df, index='Genres', columns='PriceRange',
                           values='AppID', aggfunc='nunique', fill_value=0)

#Heatmap
fig = plt.figure(figsize=(11, 9))
ax = fig.add_subplot(1, 1, 1)
percent_fmt = FuncFormatter(lambda x, p: '{:.0f}%'.format(x))
ax = sns.heatmap(hm_data, linewidth=0.2, annot=True, cmap='coolwarm', fmt='.1f',
                 square=True, annot_kws={'size':11},
                 cbar_kws={'format':percent_fmt, 'orientation':'vertical'},
                 vmin=60, vmax=95)
plt.title('Average Positive Review Percentage by Genre and Price Range',
          fontsize=18, pad=15)
plt.xlabel('Game Price Range', fontsize=18, labelpad=15)
plt.ylabel('Game Genre', fontsize=18, labelpad=10)
plt.yticks(rotation=0, size=14)
plt.xticks(rotation=35, size=12, ha='right')
cbar = ax.collections[0].colorbar
my_colorbar_ticks = [*range(60, 96, 5)]
cbar.set_ticks(my_colorbar_ticks)
my_colorbar_tick_labels = ['{}%'.format(each) for each in my_colorbar_ticks]
cbar.set_ticklabels(my_colorbar_tick_labels)
cbar.set_label('Average Positive Reviews (%)', rotation=270,
               fontsize=14, color='black', labelpad=20)
plt.tight_layout()
plt.show()

Line Chart

My 4th visualization examined competitive vs cooperative games. As someone who has played both, I was curious to see if their proportion has declined over time by looking at the number of games released. . From this I was able to see that there was a sharp increase in PvP Games from 2014 to 2017, going from 3.7% to 16.2%, before falling in recent years. Cooperative games also increased with time but has been steadier in its proportion compared to pvp. These percentages represent proportion of games released each year that carried that tag, so while it is possible for a game to carry both this visualization is useful for compared the two popular types of playstyles.

#Lines Chart

cat_df = df[['AppID', 'Year', 'Categories']].dropna().copy()
cat_df['Categories'] = cat_df['Categories'].str.split(',')
cat_df = cat_df.explode('Categories')
cat_df['Categories'] = cat_df['Categories'].str.strip()

top_categories = ['PvP', 'Online PvP', 'Shared/Split Screen PvP',
                  'Co-op', 'Online Co-op', 'Shared/Split Screen Co-op']

cat_df = cat_df[cat_df['Categories'].isin(top_categories)]

# relivant for this graph
cat_df = cat_df[(cat_df['Year'] >= 2014) & (cat_df['Year'] <= 2022)]

cat_counts = cat_df.groupby(['Year', 'Categories'])['AppID'].nunique().reset_index(name='Count')

year_totals = df.groupby('Year')['AppID'].count().reset_index(name='TotalGames')

#comb
cat_counts = cat_counts.merge(year_totals, on='Year')
cat_counts['Percentage'] = cat_counts['Count'] / cat_counts['TotalGames'] * 100
cat_table = cat_counts.pivot(index='Year', columns='Categories', values='Percentage')

cat_table = cat_table.reindex(columns=top_categories)

#Chart 
fig = plt.figure(figsize=(12, 8))
ax = fig.add_subplot(1, 1, 1)

# Comp
ax.plot(cat_table.index, cat_table['PvP'],
        marker='o', linewidth=3, color='darkred', label='PvP')
ax.plot(cat_table.index, cat_table['Online PvP'],
        marker='o', linestyle='--', linewidth=2.5,
        color='darkorange', label='Online PvP')
ax.plot(cat_table.index, cat_table['Shared/Split Screen PvP'],
        marker='o', linestyle='--', linewidth=2.5,
        color='salmon', label='Shared/Split Screen PvP')
# Co-op
ax.plot(cat_table.index, cat_table['Co-op'],
        marker='o', linewidth=3, color='darkblue', label='Co-op')
ax.plot(cat_table.index, cat_table['Online Co-op'],
        marker='o', linestyle='--', linewidth=2.5,
        color='royalblue', label='Online Co-op')
ax.plot(cat_table.index, cat_table['Shared/Split Screen Co-op'],
        marker='o', linestyle='--', linewidth=2.5,
        color='seagreen', label='Shared/Split Screen Co-op')

#Formatting at end
plt.title('Competitive vs. Cooperative Steam Game Features (2014–2022)',
          fontsize=18, pad=15)
plt.xlabel('Release Year', fontsize=15, labelpad=10)
plt.ylabel('Percentage of Games (%)', fontsize=15, labelpad=10)
plt.xticks(range(2014, 2023), fontsize=12)
plt.yticks(fontsize=12)
ax.grid(axis='y', linestyle='--', alpha=0.4)
plt.legend(title='Game Feature', fontsize=11,
           title_fontsize=12, loc='center left',
           bbox_to_anchor=(1.02, 0.5))

plt.tight_layout()
plt.show()

Nested Pie Chart

Lasty, I wanted to examine how Free vs Paid Games were supported across platforms. The results showed that Windows only was the most popular across both paid and Free games. There were also significantly more paid games (82.7% vs 17.3%). Mac and Linux support is less common, and when more than 1 is supported, it tends to be Mac.

#Nested Pie

#Splitting
df['PaidType'] = np.where(df['Price'] == 0, 'Free', 'Paid')

df['PlatformGroup'] = 'All Three / Other'

df.loc[(df['Windows'] == True) & (df['Mac'] == False) &
       (df['Linux'] == False), 'PlatformGroup'] = 'Windows Only'
df.loc[(df['Windows'] == True) & (df['Mac'] == True) &
       (df['Linux'] == False), 'PlatformGroup'] = 'Windows + Mac'
df.loc[(df['Windows'] == True) & (df['Mac'] == False) &
       (df['Linux'] == True), 'PlatformGroup'] = 'Windows + Linux'
       
pie_df = df.groupby(['PaidType', 'PlatformGroup'])['AppID'].count().reset_index(name='GameCount')
paid_order = ['Free', 'Paid']
platform_order = ['Windows Only', 'Windows + Mac',
                  'Windows + Linux', 'All Three / Other']

pie_df['PaidType'] = pd.Categorical(
    pie_df['PaidType'], categories=paid_order, ordered=True)
pie_df['PlatformGroup'] = pd.Categorical(
    pie_df['PlatformGroup'], categories=platform_order, ordered=True)
pie_df.sort_values(by=['PaidType', 'PlatformGroup'], inplace=True)
pie_df.reset_index(inplace=True, drop=True)


#Colors
outer_colors = ['mediumseagreen', 'mediumpurple']
inner_colors = ['seagreen', 'mediumseagreen', 'lightgreen', 'palegreen',
                'rebeccapurple', 'mediumpurple', 'plum', 'thistle']
#Nested Pie Chart
fig = plt.figure(figsize=(11, 10))
ax = fig.add_subplot(1, 1, 1)
all_games = pie_df.GameCount.sum()

#Outer
pie_df.groupby(['PaidType'], observed=True)['GameCount'].sum().plot(
    kind='pie', ax=ax, radius=1,
    colors=outer_colors, pctdistance=0.85, labeldistance=1.08,
    wedgeprops=dict(edgecolor='white'), textprops={'fontsize':15},
    autopct=lambda p: '{:.1f}%\n({:,.0f})'.format(p, (p/100)*all_games),
    startangle=90)

#Inner
pie_df.GameCount.plot(
    kind='pie', ax=ax, radius=0.7,
    colors=inner_colors, pctdistance=0.7, labeldistance=0.8,
    wedgeprops=dict(edgecolor='white'), textprops={'fontsize':11},
    labels=None,
    autopct=lambda p: '{:.1f}%'.format(p) if p >= 2 else '',
    startangle=90)

#Create center hole
hole = plt.Circle((0, 0), 0.3, fc='white')
fig1 = plt.gcf()
fig1.gca().add_artist(hole)

ax.yaxis.set_visible(False)
plt.title('Steam Games by Free vs. Paid and Platform Support',
          fontsize=18, pad=20)
ax.text(0, 0, 'Total Games\n' + '{:,}'.format(all_games),
        size=15, ha='center', va='center')

# Legend add
legend_labels = []
for i in range(len(pie_df)):
    pct = pie_df.GameCount.iloc[i] / all_games * 100
    legend_labels.append(
        str(pie_df.PaidType.iloc[i]) + ' - ' +
        str(pie_df.PlatformGroup.iloc[i]) +
        ' ({:.1f}%)'.format(pct))
legend_handles = []
for i in range(len(pie_df)):
    legend_handles.append(
        mpatches.Patch(color=inner_colors[i], label=legend_labels[i])
    )
ax.legend(handles=legend_handles,
          title='Platform Support',
          loc='center left',
          bbox_to_anchor=(1.05, 0.5),
          fontsize=11)
ax.axis('equal')
plt.tight_layout()
plt.show()

Source:

I found this data on kaggle, link: https://www.kaggle.com/datasets/mexwell/steamgames