Now you can request additional data and/or customized columns!

Try It Now!

Spanish La Liga (football)

sports-data

Files Size Format Created Updated License Source
12 820kB csv zip 8 months ago 2 days ago Open Data Commons Public Domain Dedication and License www.football-data.co.uk/
This dataset contains data for last 10 seasons of Spanish La Liga including current season. The data is updated on weekly basis via Travis-CI. The dataset is sourced from http://www.football-data.co.uk/ website and contains various statistical data such as final and half time result, corners, read more
Download Developers

Data Files

Download files in this dataset

season-1819  

Signup to Premium Service for additional or customised data - Get Started

This is a preview version. There might be more data in the original version.

Field information

Field Name Order Type (Format) Description
Date 1 date (%Y-%m-%d) Match Date (dd/mm/yy)
HomeTeam 2 string (default) Home Team
AwayTeam 3 string (default) Away Team
FTHG 4 integer (default) Full Time Home Team Goals
FTAG 5 integer (default) Full Time Away Team Goals
FTR 6 string (default) Full Time Result (H=Home Win, D=Draw, A=Away Win)
HTHG 7 integer (default) Half Time Home Team Goals
HTAG 8 integer (default) Half Time Away Team Goals
HTR 9 string (default) Half Time Result (H=Home Win, D=Draw, A=Away Win)
HS 10 integer (default) Home Team Shots
AS 11 integer (default) Away Team Shots
HST 12 integer (default) Home Team Shots on Target
AST 13 integer (default) Away Team Shots on Target
HF 14 integer (default) Home Team Fouls Committed
AF 15 integer (default) Away Team Fouls Committed
HC 16 integer (default) Home Team Corners
AC 17 integer (default) Away Team Corners
HY 18 integer (default) Home Team Yellow Cards
AY 19 integer (default) Away Team Yellow Cards
HR 20 integer (default) Home Team Red Cards
AR 21 integer (default) Away Team Red Cards

season-1718  

Signup to Premium Service for additional or customised data - Get Started

This is a preview version. There might be more data in the original version.

Field information

Field Name Order Type (Format) Description
Date 1 date (%Y-%m-%d) Match Date (dd/mm/yy)
HomeTeam 2 string (default) Home Team
AwayTeam 3 string (default) Away Team
FTHG 4 integer (default) Full Time Home Team Goals
FTAG 5 integer (default) Full Time Away Team Goals
FTR 6 string (default) Full Time Result (H=Home Win, D=Draw, A=Away Win)
HTHG 7 integer (default) Half Time Home Team Goals
HTAG 8 integer (default) Half Time Away Team Goals
HTR 9 string (default) Half Time Result (H=Home Win, D=Draw, A=Away Win)
HS 10 integer (default) Home Team Shots
AS 11 integer (default) Away Team Shots
HST 12 integer (default) Home Team Shots on Target
AST 13 integer (default) Away Team Shots on Target
HF 14 integer (default) Home Team Fouls Committed
AF 15 integer (default) Away Team Fouls Committed
HC 16 integer (default) Home Team Corners
AC 17 integer (default) Away Team Corners
HY 18 integer (default) Home Team Yellow Cards
AY 19 integer (default) Away Team Yellow Cards
HR 20 integer (default) Home Team Red Cards
AR 21 integer (default) Away Team Red Cards

season-1617  

Signup to Premium Service for additional or customised data - Get Started

This is a preview version. There might be more data in the original version.

Field information

Field Name Order Type (Format) Description
Date 1 date (%Y-%m-%d) Match Date (dd/mm/yy)
HomeTeam 2 string (default) Home Team
AwayTeam 3 string (default) Away Team
FTHG 4 integer (default) Full Time Home Team Goals
FTAG 5 integer (default) Full Time Away Team Goals
FTR 6 string (default) Full Time Result (H=Home Win, D=Draw, A=Away Win)
HTHG 7 integer (default) Half Time Home Team Goals
HTAG 8 integer (default) Half Time Away Team Goals
HTR 9 string (default) Half Time Result (H=Home Win, D=Draw, A=Away Win)
HS 10 integer (default) Home Team Shots
AS 11 integer (default) Away Team Shots
HST 12 integer (default) Home Team Shots on Target
AST 13 integer (default) Away Team Shots on Target
HF 14 integer (default) Home Team Fouls Committed
AF 15 integer (default) Away Team Fouls Committed
HC 16 integer (default) Home Team Corners
AC 17 integer (default) Away Team Corners
HY 18 integer (default) Home Team Yellow Cards
AY 19 integer (default) Away Team Yellow Cards
HR 20 integer (default) Home Team Red Cards
AR 21 integer (default) Away Team Red Cards

season-1516  

Signup to Premium Service for additional or customised data - Get Started

This is a preview version. There might be more data in the original version.

Field information

Field Name Order Type (Format) Description
Date 1 date (%Y-%m-%d) Match Date (dd/mm/yy)
HomeTeam 2 string (default) Home Team
AwayTeam 3 string (default) Away Team
FTHG 4 integer (default) Full Time Home Team Goals
FTAG 5 integer (default) Full Time Away Team Goals
FTR 6 string (default) Full Time Result (H=Home Win, D=Draw, A=Away Win)
HTHG 7 integer (default) Half Time Home Team Goals
HTAG 8 integer (default) Half Time Away Team Goals
HTR 9 string (default) Half Time Result (H=Home Win, D=Draw, A=Away Win)
HS 10 integer (default) Home Team Shots
AS 11 integer (default) Away Team Shots
HST 12 integer (default) Home Team Shots on Target
AST 13 integer (default) Away Team Shots on Target
HF 14 integer (default) Home Team Fouls Committed
AF 15 integer (default) Away Team Fouls Committed
HC 16 integer (default) Home Team Corners
AC 17 integer (default) Away Team Corners
HY 18 integer (default) Home Team Yellow Cards
AY 19 integer (default) Away Team Yellow Cards
HR 20 integer (default) Home Team Red Cards
AR 21 integer (default) Away Team Red Cards

season-1415  

Signup to Premium Service for additional or customised data - Get Started

This is a preview version. There might be more data in the original version.

Field information

Field Name Order Type (Format) Description
Date 1 date (%Y-%m-%d) Match Date (dd/mm/yy)
HomeTeam 2 string (default) Home Team
AwayTeam 3 string (default) Away Team
FTHG 4 integer (default) Full Time Home Team Goals
FTAG 5 integer (default) Full Time Away Team Goals
FTR 6 string (default) Full Time Result (H=Home Win, D=Draw, A=Away Win)
HTHG 7 integer (default) Half Time Home Team Goals
HTAG 8 integer (default) Half Time Away Team Goals
HTR 9 string (default) Half Time Result (H=Home Win, D=Draw, A=Away Win)
HS 10 integer (default) Home Team Shots
AS 11 integer (default) Away Team Shots
HST 12 integer (default) Home Team Shots on Target
AST 13 integer (default) Away Team Shots on Target
HF 14 integer (default) Home Team Fouls Committed
AF 15 integer (default) Away Team Fouls Committed
HC 16 integer (default) Home Team Corners
AC 17 integer (default) Away Team Corners
HY 18 integer (default) Home Team Yellow Cards
AY 19 integer (default) Away Team Yellow Cards
HR 20 integer (default) Home Team Red Cards
AR 21 integer (default) Away Team Red Cards

season-1314  

Signup to Premium Service for additional or customised data - Get Started

This is a preview version. There might be more data in the original version.

Field information

Field Name Order Type (Format) Description
Date 1 date (%Y-%m-%d) Match Date (dd/mm/yy)
HomeTeam 2 string (default) Home Team
AwayTeam 3 string (default) Away Team
FTHG 4 integer (default) Full Time Home Team Goals
FTAG 5 integer (default) Full Time Away Team Goals
FTR 6 string (default) Full Time Result (H=Home Win, D=Draw, A=Away Win)
HTHG 7 integer (default) Half Time Home Team Goals
HTAG 8 integer (default) Half Time Away Team Goals
HTR 9 string (default) Half Time Result (H=Home Win, D=Draw, A=Away Win)
HS 10 integer (default) Home Team Shots
AS 11 integer (default) Away Team Shots
HST 12 integer (default) Home Team Shots on Target
AST 13 integer (default) Away Team Shots on Target
HF 14 integer (default) Home Team Fouls Committed
AF 15 integer (default) Away Team Fouls Committed
HC 16 integer (default) Home Team Corners
AC 17 integer (default) Away Team Corners
HY 18 integer (default) Home Team Yellow Cards
AY 19 integer (default) Away Team Yellow Cards
HR 20 integer (default) Home Team Red Cards
AR 21 integer (default) Away Team Red Cards

season-1213  

Signup to Premium Service for additional or customised data - Get Started

This is a preview version. There might be more data in the original version.

Field information

Field Name Order Type (Format) Description
Date 1 date (%Y-%m-%d) Match Date (dd/mm/yy)
HomeTeam 2 string (default) Home Team
AwayTeam 3 string (default) Away Team
FTHG 4 integer (default) Full Time Home Team Goals
FTAG 5 integer (default) Full Time Away Team Goals
FTR 6 string (default) Full Time Result (H=Home Win, D=Draw, A=Away Win)
HTHG 7 integer (default) Half Time Home Team Goals
HTAG 8 integer (default) Half Time Away Team Goals
HTR 9 string (default) Half Time Result (H=Home Win, D=Draw, A=Away Win)
HS 10 integer (default) Home Team Shots
AS 11 integer (default) Away Team Shots
HST 12 integer (default) Home Team Shots on Target
AST 13 integer (default) Away Team Shots on Target
HF 14 integer (default) Home Team Fouls Committed
AF 15 integer (default) Away Team Fouls Committed
HC 16 integer (default) Home Team Corners
AC 17 integer (default) Away Team Corners
HY 18 integer (default) Home Team Yellow Cards
AY 19 integer (default) Away Team Yellow Cards
HR 20 integer (default) Home Team Red Cards
AR 21 integer (default) Away Team Red Cards

season-1112  

Signup to Premium Service for additional or customised data - Get Started

This is a preview version. There might be more data in the original version.

Field information

Field Name Order Type (Format) Description
Date 1 date (%Y-%m-%d) Match Date (dd/mm/yy)
HomeTeam 2 string (default) Home Team
AwayTeam 3 string (default) Away Team
FTHG 4 integer (default) Full Time Home Team Goals
FTAG 5 integer (default) Full Time Away Team Goals
FTR 6 string (default) Full Time Result (H=Home Win, D=Draw, A=Away Win)
HTHG 7 integer (default) Half Time Home Team Goals
HTAG 8 integer (default) Half Time Away Team Goals
HTR 9 string (default) Half Time Result (H=Home Win, D=Draw, A=Away Win)
HS 10 integer (default) Home Team Shots
AS 11 integer (default) Away Team Shots
HST 12 integer (default) Home Team Shots on Target
AST 13 integer (default) Away Team Shots on Target
HF 14 integer (default) Home Team Fouls Committed
AF 15 integer (default) Away Team Fouls Committed
HC 16 integer (default) Home Team Corners
AC 17 integer (default) Away Team Corners
HY 18 integer (default) Home Team Yellow Cards
AY 19 integer (default) Away Team Yellow Cards
HR 20 integer (default) Home Team Red Cards
AR 21 integer (default) Away Team Red Cards

season-1011  

Signup to Premium Service for additional or customised data - Get Started

This is a preview version. There might be more data in the original version.

Field information

Field Name Order Type (Format) Description
Date 1 date (%Y-%m-%d) Match Date (dd/mm/yy)
HomeTeam 2 string (default) Home Team
AwayTeam 3 string (default) Away Team
FTHG 4 integer (default) Full Time Home Team Goals
FTAG 5 integer (default) Full Time Away Team Goals
FTR 6 string (default) Full Time Result (H=Home Win, D=Draw, A=Away Win)
HTHG 7 integer (default) Half Time Home Team Goals
HTAG 8 integer (default) Half Time Away Team Goals
HTR 9 string (default) Half Time Result (H=Home Win, D=Draw, A=Away Win)
HS 10 integer (default) Home Team Shots
AS 11 integer (default) Away Team Shots
HST 12 integer (default) Home Team Shots on Target
AST 13 integer (default) Away Team Shots on Target
HF 14 integer (default) Home Team Fouls Committed
AF 15 integer (default) Away Team Fouls Committed
HC 16 integer (default) Home Team Corners
AC 17 integer (default) Away Team Corners
HY 18 integer (default) Home Team Yellow Cards
AY 19 integer (default) Away Team Yellow Cards
HR 20 integer (default) Home Team Red Cards
AR 21 integer (default) Away Team Red Cards

season-0910  

Signup to Premium Service for additional or customised data - Get Started

This is a preview version. There might be more data in the original version.

Field information

Field Name Order Type (Format) Description
Date 1 date (%Y-%m-%d) Match Date (dd/mm/yy)
HomeTeam 2 string (default) Home Team
AwayTeam 3 string (default) Away Team
FTHG 4 integer (default) Full Time Home Team Goals
FTAG 5 integer (default) Full Time Away Team Goals
FTR 6 string (default) Full Time Result (H=Home Win, D=Draw, A=Away Win)
HTHG 7 integer (default) Half Time Home Team Goals
HTAG 8 integer (default) Half Time Away Team Goals
HTR 9 string (default) Half Time Result (H=Home Win, D=Draw, A=Away Win)
HS 10 integer (default) Home Team Shots
AS 11 integer (default) Away Team Shots
HST 12 integer (default) Home Team Shots on Target
AST 13 integer (default) Away Team Shots on Target
HF 14 integer (default) Home Team Fouls Committed
AF 15 integer (default) Away Team Fouls Committed
HC 16 integer (default) Home Team Corners
AC 17 integer (default) Away Team Corners
HY 18 integer (default) Home Team Yellow Cards
AY 19 integer (default) Away Team Yellow Cards
HR 20 integer (default) Home Team Red Cards
AR 21 integer (default) Away Team Red Cards

season-0809  

Signup to Premium Service for additional or customised data - Get Started

This is a preview version. There might be more data in the original version.

Field information

Field Name Order Type (Format) Description
Date 1 date (%Y-%m-%d) Match Date (dd/mm/yy)
HomeTeam 2 string (default) Home Team
AwayTeam 3 string (default) Away Team
FTHG 4 integer (default) Full Time Home Team Goals
FTAG 5 integer (default) Full Time Away Team Goals
FTR 6 string (default) Full Time Result (H=Home Win, D=Draw, A=Away Win)
HTHG 7 integer (default) Half Time Home Team Goals
HTAG 8 integer (default) Half Time Away Team Goals
HTR 9 string (default) Half Time Result (H=Home Win, D=Draw, A=Away Win)
HS 10 integer (default) Home Team Shots
AS 11 integer (default) Away Team Shots
HST 12 integer (default) Home Team Shots on Target
AST 13 integer (default) Away Team Shots on Target
HF 14 integer (default) Home Team Fouls Committed
AF 15 integer (default) Away Team Fouls Committed
HC 16 integer (default) Home Team Corners
AC 17 integer (default) Away Team Corners
HY 18 integer (default) Home Team Yellow Cards
AY 19 integer (default) Away Team Yellow Cards
HR 20 integer (default) Home Team Red Cards
AR 21 integer (default) Away Team Red Cards

Similar Datasets

English Premier League

German Bundesliga

Italian Serie A

French Ligue 1

Integrate this dataset into your favourite tool

Use our data-cli tool designed for data wranglers:

data get https://datahub.io/sports-data/spanish-la-liga
data info sports-data/spanish-la-liga
tree sports-data/spanish-la-liga
# Get a list of dataset's resources
curl -L -s https://datahub.io/sports-data/spanish-la-liga/datapackage.json | grep path

# Get resources

curl -L https://datahub.io/sports-data/spanish-la-liga/r/0.csv

curl -L https://datahub.io/sports-data/spanish-la-liga/r/1.csv

curl -L https://datahub.io/sports-data/spanish-la-liga/r/2.csv

curl -L https://datahub.io/sports-data/spanish-la-liga/r/3.csv

curl -L https://datahub.io/sports-data/spanish-la-liga/r/4.csv

curl -L https://datahub.io/sports-data/spanish-la-liga/r/5.csv

curl -L https://datahub.io/sports-data/spanish-la-liga/r/6.csv

curl -L https://datahub.io/sports-data/spanish-la-liga/r/7.csv

curl -L https://datahub.io/sports-data/spanish-la-liga/r/8.csv

curl -L https://datahub.io/sports-data/spanish-la-liga/r/9.csv

curl -L https://datahub.io/sports-data/spanish-la-liga/r/10.csv

curl -L https://datahub.io/sports-data/spanish-la-liga/r/11.zip

If you are using R here's how to get the data you want quickly loaded:

install.packages("jsonlite", repos="https://cran.rstudio.com/")
library("jsonlite")

json_file <- 'https://datahub.io/sports-data/spanish-la-liga/datapackage.json'
json_data <- fromJSON(paste(readLines(json_file), collapse=""))

# get list of all resources:
print(json_data$resources$name)

# print all tabular data(if exists any)
for(i in 1:length(json_data$resources$datahub$type)){
  if(json_data$resources$datahub$type[i]=='derived/csv'){
    path_to_file = json_data$resources$path[i]
    data <- read.csv(url(path_to_file))
    print(data)
  }
}

Note: You might need to run the script with root permissions if you are running on Linux machine

Install the Frictionless Data data package library and the pandas itself:

pip install datapackage
pip install pandas

Now you can use the datapackage in the Pandas:

import datapackage
import pandas as pd

data_url = 'https://datahub.io/sports-data/spanish-la-liga/datapackage.json'

# to load Data Package into storage
package = datapackage.Package(data_url)

# to load only tabular data
resources = package.resources
for resource in resources:
    if resource.tabular:
        data = pd.read_csv(resource.descriptor['path'])
        print (data)

For Python, first install the `datapackage` library (all the datasets on DataHub are Data Packages):

pip install datapackage

To get Data Package into your Python environment, run following code:

from datapackage import Package

package = Package('https://datahub.io/sports-data/spanish-la-liga/datapackage.json')

# print list of all resources:
print(package.resource_names)

# print processed tabular data (if exists any)
for resource in package.resources:
    if resource.descriptor['datahub']['type'] == 'derived/csv':
        print(resource.read())

If you are using JavaScript, please, follow instructions below:

Install data.js module using npm:

  $ npm install data.js

Once the package is installed, use the following code snippet:

const {Dataset} = require('data.js')

const path = 'https://datahub.io/sports-data/spanish-la-liga/datapackage.json'

// We're using self-invoking function here as we want to use async-await syntax:
;(async () => {
  const dataset = await Dataset.load(path)
  // get list of all resources:
  for (const id in dataset.resources) {
    console.log(dataset.resources[id]._descriptor.name)
  }
  // get all tabular data(if exists any)
  for (const id in dataset.resources) {
    if (dataset.resources[id]._descriptor.format === "csv") {
      const file = dataset.resources[id]
      // Get a raw stream
      const stream = await file.stream()
      // entire file as a buffer (be careful with large files!)
      const buffer = await file.buffer
      // print data
      stream.pipe(process.stdout)
    }
  }
})()

Read me

This dataset contains data for last 10 seasons of Spanish La Liga including current season. The data is updated on weekly basis via Travis-CI. The dataset is sourced from http://www.football-data.co.uk/ website and contains various statistical data such as final and half time result, corners, yellow and red cards etc.

Datapackage.json

Request Customized Data


Notifications of data updates and schema changes

Warranty / guaranteed updates

Workflow integration (e.g. Python packages, NPM packages)

Customized data (e.g. you need different or additional data)

Or suggest your own feature from the link below