Skip to content

This project uses databases to analyze European football data and determine which team to bet on based on performance. The goal is to provide data-driven justifications for the chosen team.

bl33h/championsLeagueBet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

championsLeagueBet

This project utilizes database technologies to create and load data models, with the aim of using SQL language for research, development, and presenting results for business-related questions to support decision-making processes. The dataset used consists of CSV files containing information about European football matches, players, and their characteristics.

The main objective of the project is to analyze the provided data and answer the following question: Based on the performance of teams and players according to this model, which team would you bet on? The answer should be supported by data-driven justifications.


pic

FilesERDFeaturesThe team I would bet onHow To Use

Entity Relationship Diagram


erd

Files

  • src: the file that implements de solution.
    • database: The .dump file is a backup file of the PostgreSQL database, containing the structure of the database, such as tables, indexes, and constraints, along with the stored data.
    • graphics: This Python script connects to the PostgreSQL database, executes SQL queries, and generates graphics to analyze team performance and average goals in the Champions League.
    • queries & mods: An SQL file that contains a collection of statements designed to create a schema specifically for managing and analyzing football match data.
    • script: This Python file creates a PostgreSQL database and imports data from CSV files into separate tables. It handles column renaming, special characters, empty cells, and excludes rows with ".xml" files.

Features

  • Processing and loading CSV files into a PostgreSQL database.
  • Analyzing and understanding the data model.
  • Defining metrics to justify decision-making.
  • Developing queries to calculate the defined metrics.
  • Executing queries to obtain statistics on games played, best teams, rankings, betting odds, player attributes, and other relevant information.
  • Formulating additional questions to further justify the betting decision.
  • Presenting the project results through SQL queries.

The team I would bet on

According to the results obtained from 63% of the queries (10/16), the team I would bet on is FC Barcelona. If possible, specifying for roster reasons and performance, the club would be selected during the 2008/2009 or 2012/2013 season.


pic

How To Use

To clone and run this application, you'll need Git, Python and psql installed on your computer. From your command line:

# Clone this repository
$ git clone https://github.com/bl33h/temperatureConverter

# Restore the database in the psql cmd 
$ CREATE DATABASE champions

# Back to your normal command line
$ pg_restore -U <username> -d <champions> <path_to_dump_file> # The username is usually postgres and for the dump file path you can right click on it and copy as path

# Run the graphic queries
$ python championsleaguebet_graphics.py

About

This project uses databases to analyze European football data and determine which team to bet on based on performance. The goal is to provide data-driven justifications for the chosen team.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages