Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

National distribution (bar chart) #6

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
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
Binary file removed .github/workflows/Capture.PNG
Binary file not shown.
18,208 changes: 0 additions & 18,208 deletions .github/workflows/kl.csv

This file was deleted.

Binary file removed .github/workflows/kl_cleaned_edit_history.pdf
Binary file not shown.
31 changes: 0 additions & 31 deletions .github/workflows/potentialvis.py

This file was deleted.

22 changes: 22 additions & 0 deletions National_Distribution.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import pandas as pd
import matplotlib.pyplot as plt

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

# Count the number of players from each nationality
nationality_counts = df['Nationality'].value_counts()

# Create a bar chart
plt.bar(nationality_counts.index, nationality_counts.values)

# Set the chart title and axis labels
plt.title('Nationality Distribution of FIFA 19 Players')
plt.xlabel('Nationality')
plt.ylabel('Number of Players')

# Rotate the x-axis labels to avoid overlapping
plt.xticks(rotation=90)

# Show the plot
plt.show()
Binary file added National_Distribution_vis.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
244 changes: 243 additions & 1 deletion .github/workflows/kl_cleaned.csv → nd_cleaned.csv

Large diffs are not rendered by default.