Welcome to the LaLiga Hypermotion Analytics Project, an advanced analytics tool designed to provide insights into various metrics of LaLiga Hypermotion teams, such as cost per goal and stadium attendance rates. This project combines data visualization with geographic analytics to offer a detailed view of performance and audience engagement across different teams and cities.
- Overview
- Features
- Installation
- Usage
- Project Structure
- Data Sources
- Future Enhancements
- Contributors
This project is a comprehensive analytics dashboard focused on LaLiga Hypermotion, utilizing data such as team budgets, player costs, goals scored, population metrics, and stadium attendance. With visualizations, including bar charts and bubble maps, we provide a better understanding of team efficiencies and the relationship between audience attendance and city population.
- Cost per Goal Visualization: A bar chart ranking teams by their "cost per goal" metric, which indicates the investment efficiency of each team.
- Stadium Attendance Analysis: A map-based bubble chart that compares the average attendance for each team to the population of the city where they play. This gives insights into audience engagement by showing attendance as a percentage of the local population.
- Geolocation Integration: Fetches coordinates for each team's city using the Nominatim API, allowing for a visually compelling geographic display.
- Color-Coded Metrics: Attendance rate percentages are color-coded for quick insights, with larger bubbles representing higher attendance figures.
-
Clone the repository:
git clone <repository_url> cd <repository_name>
-
Install dependencies: Ensure you have Python 3.x installed, then install required packages:
pip install -r requirements.txt
-
Data Preparation:
- Place
table_budgetxplayers.csvandtable_popxmunixequipo.csvfiles in the appropriate directories, or modify the import paths in the code if needed.
- Place
-
Map API Setup: The project uses the Nominatim API to retrieve geographical coordinates for city names. This API has usage limitations, so consider implementing rate limiting if processing large datasets.
Run the main script to generate the dashboards:
python main.pyThis will display two separate dashboards:
- Cost per Goal Dashboard: Ranks each team based on the cost per goal, providing an ordered bar chart of teams.
- Stadium Attendance Dashboard: Displays a bubble map of attendance data by city, with the bubble size representing attendance and color representing the percentage of the city population attending.
fig1: Bar chart of teams ordered by "cost per goal."fig2: Bubble map with attendance information.
This chart ranks teams based on the total cost per goal scored. Teams that achieve more goals with a lower total budget appear higher, representing a more efficient investment.
This map displays the average attendance for each team's home games as a percentage of the local population. Cities with a high percentage of attendees indicate strong local support relative to the population.
- Team Budget and Goals: Stored in
table_budgetxplayers.py, this dataset includes financial data and goals scored by each team. - Population and Attendance: Stored in
table_popxmunixequipo.py, this dataset provides city population and stadium attendance for each team.
- Additional Metrics: Incorporate metrics like cost per player, average salary per goal, and player-specific performance analytics.
- Real-time Data: Add support for real-time or regularly updated data from LaLiga sources.
- Historical Analysis: Extend the dataset to cover multiple seasons for trend analysis.
- Advanced Interactivity: Improve user interaction in the dashboard with filters for specific teams, cities, or metrics.
This project was created with the collaborative efforts of the following people:
- @atxpaul - DevOps and Software Engineer
- @Sofia-A-Fayo-Freites - Data Analyst
- @samtlme - FullStack Engineer
Special thanks to everyone involved in making this project a success!
This project is licensed under the MIT License.
For questions or further information, please reach out to the project maintainer.
Enjoy exploring the insights provided by the LaLiga Hypermotion Analytics Project!