{"id":20510457,"url":"https://github.com/flaver12/juventus-scripting-work","last_synced_at":"2026-05-08T08:35:41.813Z","repository":{"id":245269237,"uuid":"817751641","full_name":"flaver12/juventus-scripting-work","owner":"flaver12","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-20T11:17:41.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-05T22:36:47.288Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flaver12.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-20T11:15:30.000Z","updated_at":"2024-06-20T11:17:44.000Z","dependencies_parsed_at":"2024-06-21T02:46:11.242Z","dependency_job_id":"294bdb78-6965-45a5-941a-07d345245eb4","html_url":"https://github.com/flaver12/juventus-scripting-work","commit_stats":null,"previous_names":["flaver12/juventus-scripting-work"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/flaver12/juventus-scripting-work","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flaver12%2Fjuventus-scripting-work","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flaver12%2Fjuventus-scripting-work/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flaver12%2Fjuventus-scripting-work/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flaver12%2Fjuventus-scripting-work/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flaver12","download_url":"https://codeload.github.com/flaver12/juventus-scripting-work/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flaver12%2Fjuventus-scripting-work/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32773336,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T20:29:37.634Z","updated_at":"2026-05-08T08:35:41.789Z","avatar_url":"https://github.com/flaver12.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"#### Overview\nThis project involves setting up a database to store FIFA player data, importing the data into the database, and performing data analysis to generate visualizations and statistics. The project uses Python, Pandas, SQLAlchemy, Matplotlib, and Seaborn to achieve these tasks.\n\n#### Prerequisites\n- Python 3.x\n- MySQL database server\n- Required Python packages: pandas, sqlalchemy, matplotlib, seaborn, pymysql\n\n#### Setup Instructions\n\n1. **Clone the Repository**\n   ```bash\n   git clone https://github.com/your-username/fifa-player-data-analysis.git\n   cd fifa-player-data-analysis\n   ```\n\n2. **Install Required Packages**\n   ```bash\n   pip install pandas sqlalchemy matplotlib seaborn pymysql\n   ```\n\n3. **Download CSV Data**\n   Download the CSV files from the [Kaggle FIFA 23 Complete Player Dataset](https://www.kaggle.com/datasets/stefanoleone992/fifa-23-complete-player-dataset):\n   - `male_players.csv`\n   - `male_teams.csv`\n\n   Place these files in the project directory.\n\n4. **Database Setup**\n   Ensure MySQL is installed and running. Create a database for the project:\n   ```sql\n   CREATE DATABASE fifa;\n   ```\n\n5. **Update Database URI**\n   Update the `DB_URI` in both `data_import.py` and `statistics.py` scripts to match your database credentials:\n   ```python\n   DB_URI = 'mysql+pymysql://fifa:fifa@localhost:3306/fifa'\n   ```\n\n#### Data Import\n\n1. **Run the Data Import Script**\n   ```bash\n   python data_import.py\n   ```\n\n   This script will:\n   - Connect to the MySQL database.\n   - Create the necessary tables (`teams`, `nationalities`, `positions`, `players`).\n   - Import data from `male_players.csv` and `male_teams.csv` into these tables.\n\n#### Data Analysis\n\n1. **Run the Data Analysis Script**\n   ```bash\n   python statistics.py\n   ```\n\n   This script will:\n   - Connect to the MySQL database.\n   - Fetch data from the database.\n   - Clean the data.\n   - Generate and save visualizations:\n     - Distribution of Player Overall Ratings\n     - Average Overall Rating by Player Position\n     - Top 10 Teams by Average Player Rating\n     - Top 20 Nationalities by Player Count\n\nThe generated plots will be saved as PNG files in the project directory.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflaver12%2Fjuventus-scripting-work","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflaver12%2Fjuventus-scripting-work","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflaver12%2Fjuventus-scripting-work/lists"}