Learn practical skills, build real-world projects, and advance your career

The World of Football

and it's history

This project involves data currated by Mart Jürisoo on match data on international football matches played between 1872 and 2020. It contains the home and away teams, their scores for each game, the tournament each game was played in, as well as which country and venue as well as whether or not the venue was neautral.

The aim of this project is to take a look at the activity that football has brought to the world in the given time frame, and how the game and goal output of football matches was affected by the world wars. We also take a look at the countries who have hosted the most matches, and we tackle the phenomena of "home advantage". A long standing theory that the home team is likely to win since they have the support of the home fans whom outnumber the away fans in a stadium/venue.

How to run the code

This is an executable Jupyter notebook hosted on Jovian.ml, a platform for sharing data science projects. You can run and experiment with the code in a couple of ways: using free online resources (recommended) or on your own computer.

Option 1: Running using free online resources (1-click, recommended)

The easiest way to start executing this notebook is to click the "Run" button at the top of this page, and select "Run on Binder". This will run the notebook on mybinder.org, a free online service for running Jupyter notebooks. You can also select "Run on Colab" or "Run on Kaggle".

Option 2: Running on your computer locally
  1. Install Conda by following these instructions. Add Conda binaries to your system PATH, so you can use the conda command on your terminal.

  2. Create a Conda environment and install the required libraries by running these commands on the terminal:

conda create -n zerotopandas -y python=3.8 
conda activate zerotopandas
pip install jovian jupyter numpy pandas matplotlib seaborn opendatasets --upgrade
  1. Press the "Clone" button above to copy the command for downloading the notebook, and run it on the terminal. This will create a new directory and download the notebook. The command will look something like this:
jovian clone notebook-owner/notebook-id
  1. Enter the newly created directory using cd directory-name and start the Jupyter notebook.
jupyter notebook

You can now access Jupyter's web interface by clicking the link that shows up on the terminal or by visiting http://localhost:8888 on your browser. Click on the notebook file (it has a .ipynb extension) to open it.

Downloading the Dataset

This data set was currated from Kaggle, an online community of data scientists and machine learning practitioners who post data sets and explore and build models from them. Jovian.ml has provided a module to easily download and integrate the data set for the user of this notebook, but if that does not work then download the source data set from the given source and point the data set to the directory where you downloaded the file.

This project used the following packages:

  • jovian - upload and access this notebook
  • numpy - for creating bins for histograms
  • pandas - for manipulating data set
  • matplotlib - for ploting dataset and series of data from dataset
  • seaborn - for formating and styling plotted data
!pip install jovian opendatasets --upgrade --quiet

Let's begin by downloading the data, and listing the files within the dataset.