Learn R Programming

fivethirtyeight (version 0.5.0)

spi_matches: Match-by-match SPI ratings and forecasts back to 2016

Description

The raw data behind the stories "Club Soccer Predictions" https://projects.fivethirtyeight.com/soccer-predictions/ and "Global Club Soccer Rankings" https://projects.fivethirtyeight.com/global-club-soccer-rankings/.

Usage

spi_matches

Arguments

Format

Because of R package size restrictions, only a preview of the first 10 rows of this dataset is included; to obtain the entire dataset (30,533 rows) see Examples below. The preview is a data frame with 10 rows representing soccer matches and 13 variables:

date

The date that the match took place.

league_id

A numerical identifier of the league within which the match was played.

league

League name.

team1

One team that participated in the match.

team2

The other team that participated in the match.

spi1

The SPI score of team1.

spi2

The SPI score of team2.

prob1

The probability that team1 would have won the match.

prob2

The probability that team2 would have won the match.

probtie

The probability that the match would have resulted in a tie.

proj_score1

The predicted number of goals that team1 would have scored.

proj_score2

The predicted number of goals that team2 would have scored.

importance1

importance2

score1

The number of goals that team1 scored.

score2

The number of goals that team2 scored.

xg1

xg2

nsxg1

nsxg2

adj_score1

adj_score2

See Also

spi_global_rankings

Examples

Run this code
# NOT RUN {
# To obtain the entire dataset, run the following code:
library(readr)
library(dplyr)
spi_matches <- 
  "https://projects.fivethirtyeight.com/soccer-api/club/spi_matches.csv" %>% 
  read_csv() 
# }

Run the code above in your browser using DataLab