Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# First-Data-Analysis-Project
This is going to be my first project where I import, clean, visualize, and make sense of a database on FIFA 19 players I imported from 'Javagar M' on Kaggle. The dataset provides information such ad name,ID,overall,potential,club, and more.

For the 'potentialvis.py' program, the output is the top 50 football clubs that, according to the dataset, had the most amount of potential increase for the players that were signed to thier club.

I will continue to make visualizations through graphs and python programs for this database.

Thank you for witnessing the first of my many projects
Binary file added attributes_heatmap_vis.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions heatmap.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns

# Load the dataset
df = pd.read_csv('/Users/sarge/Downloads/heatmap_cleaned.csv')

# Create a heatmap of player attributes by position
position_groups = df.groupby('Position')[df.columns[61:88]].mean().reset_index()
heatmap_data = position_groups.set_index('Position').T
sns.heatmap(heatmap_data, cmap='RdYlGn', linewidths=0.5,
annot=True, fmt='.2f', cbar=False)
plt.title('Player Attributes by Position in FIFA 19')
plt.xlabel('Position')
plt.ylabel('Attribute')

# Show the plot
plt.show()


Loading