using CSV, DataFrames, StatsPlots
ign_filepath = "data//archive//ign_scores.csv"
"data//archive//ign_scores.csv"
ign_data = CSV.read(ign_filepath, DataFrame)
PlatformActionAction, AdventureAdventureFightingPlatformerPuzzleRPGRacingShooterSimulationSportsStrategy
1"Dreamcast"6.882867.511116.281828.28.348.088897.77.04257.616677.628577.272226.43333
2"Game Boy Advance"6.373087.507696.057146.226326.970596.532147.542866.657146.444446.928576.694447.175
3"Game Boy Color"6.272738.166675.307694.56.352946.583337.285715.897444.55.95.79077.4
4"GameCube"6.532587.608336.753857.422226.665716.133337.890916.852636.981828.028577.481327.11667
5"Nintendo 3DS"6.670837.481827.414296.614297.503458.07.719236.97.033337.76.388897.9
6"Nintendo 64"6.649068.257.05.681256.889667.461546.056.939628.042865.6756.967866.9
7"Nintendo DS"5.903617.246.25986.326.846.604627.222626.038646.965225.874365.936676.64474
8"Nintendo DSi"6.827038.56.090917.57.256.810537.166676.563646.55.195655.644446.56667
9"PC"6.805797.334757.13687.166677.410946.924717.759937.032427.084887.104896.902427.31021
10"PlayStation"6.016417.933336.313736.553736.579076.757897.916.773396.4246.918186.751226.49688
...
21"iPhone"6.865457.764297.745836.08757.471937.810787.185197.315796.995597.328577.152177.53492
size(ign_data)
(21, 13)
# What is the highest average score received by PC games, for any genre?
high_score = 7.759930
7.75993
# On the Playstation Vita platform, which genre has the 
# lowest average score? Please provide the name of the column, and put your answer 
# in single quotes (e.g., 'Action', 'Adventure', 'Fighting', etc.)
worst_genre = "Simulation"
"Simulation"
@df ign_data plot(:Racing, group=:Platform, 
    st=:bar, title="Average Score for Racing Games, by Platform",
    #label=false,
    yticks=1:8,
    xticks=(1:20, ign_data.Platform), ylabel="Platform",
    permute=(:x,:y))
plot(ign_data.Racing, group=ign_data.Platform, st=:bar, yticks=1:8, xticks=(1:21, ign_data.Platform), permute=(:x,:y), #label=false,
)
bar(ign_data.Racing, group=ign_data.Platform, permute=(:x,:y), xticks=(1:20, ign_data.Platform))
@df ign_data plot(2:13, 1:21, cols(2:13), st=:heatmap,
    title="Average Game Score, by Platform and Genre",
    xticks=(2:13,names(ign_data)[2:13]), xrotation=90, xlabel="Genre",
    yticks=(1:21, ign_data.Platform), ylabel="Platform"
)

Which combination of genre and platform receives the highest average ratings? Which combination receives the lowest average rankings?

sol = light colored cells i.e Simulation games for Playstation 4. dark colored cells i.e Fighting and Shooting games for Game Boy Color

Built with Julia 1.9.1 and

CSV 0.10.11
DataFrames 1.5.0
StatsPlots 0.15.5

To run this tutorial locally, download [this file](/tutorials/barchartsandHeatmaps03x03.jl) and open it with Pluto.jl.