Skip to content

Latest commit

 

History

439 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RugbyScope v1.2.0

Extraction and analysis of Rugby Union transfer networks

  • Copyright 2024-2026 Vincent Labatut & David O'Sullivan

RugbyScope is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. For source availability and license information see licence.txt


Description

This collection of Python and R scripts create the RugbyScope database from seven online data sources: Wikidata, DBpedia, and 5 language editions of Wikipedia (English, French, Italian, Japanese, and Spanish). RugbyScope is structured around three main rugby union-related entities: players, teams, and stints, with a focus on male players (due to the sparsity of available female player information). It covers all the data present in the sources at the time of retrieval. The scripts include the extraction of raw data from these sources, and their merging in a single database, solving a certain number of conflicts between them.

This version of the database contains two variants of the rugby player stints:

  • full: all the stints retrieved from the sources.
  • major: only the stints played while above 18 year old.

Note that the retrieval part of this source code is provided mainly for documentation purposes: it was originally tailored to work with a certain configuration of our sources, taken at a certain point in time. These sources are live material, and it is very unlikely that scripts will still work in the future, due to their unpredictable evolution. The RugbyScope data is also available on Zenodo.

If you use this source code or the associated data, please cite [LO'26]:

@TechReport{Labatut2026,
  author      = {Labatut, Vincent and O'Sullivan, David J. P.},
  title       = {{R}ugby{S}cope: a Transfer-Oriented Database of Rugby Union Teams and Players},
  institution = {Avignon Universit\'e and University of Limerick},
  year        = {2026},
  type        = {Technical Report},
}

Organization

This repository contains the following folders:

  • data: input and output folders
    • dbpedia: intermediary files retrieved from DBpedia
    • fusion: tables resulting from the merging of all sources
  • references: various reference files used throughout the processing of raw data
  • stats: plots and CSV files produced during the descriptive analysis of RugbyScope
  • wikidata: intermediary files retrieved from Wikidata
  • wikipedia: intermediary files retrieved from the 5 considered language editions of wikipedia
  • players.csv, stints.csv, teams.csv: current version of RugbyScope, CSV format
  • rugbyscope.sql: current version of RugbyScope, SQL dump
  • rugbyscope.sqlite: current version of RugbyScope, binary SQLite dump
  • log: log files
  • queries: SPARQL queries used to retrieve the raw data from the knowledge bases
    • dbpedia: SPARQL queries used to retrieve the raw data from DBpedia
    • wikidata: SPARQL queries used to retrieve the raw data from Wikidata
  • src: source code
    • common: various scripts and functions used by other scripts
    • dbpedia: extract and normalize data from DBpedia using the SPARQL queries
    • fusion: merge data retrieved from the 5 Wikipedia language editions
    • sqlite: create the proper relational DB based on the CSV files
    • stats: perform the descriptive analysis of RugbyScope, procude plots and stats
    • wikidata: extract and normalize data from Wikidata using the SPARQL queries
    • wikipedia: extract and normalize data from the 5 language editions of Wikipedia
  • build_database.R: main script, that extract the data from each source, merge them, and conduct their descriptive analysis
  • install_packages.R: install all the required R packages

Installation

R Environment

Install R and the required packages:

  1. Install the R language
  2. Download this project from GitHub and unzip.
  3. Install the required packages:
    1. Open the R console.
    2. Set the current directory as the working directory, using setwd("<my directory>").
    3. Run the install script src/install_packages.R.

Python Environment

Install Python and the required packages:

  1. Install the Python language
  2. Execute pip install -r requirements.txt to install the required packages.

Usage

To apply the extraction, cleaning and merging process described in the data paper [LO'26]:

  1. Open the R console.
  2. Set the current directory as the working directory, using setwd("<my directory>"). 3. Run the main script src/build_database.R.

The produced database goes in folder data, whereas the plots and stats resulting from its descriptive analysis go in folder data/stats (cf. Section Organization). In addition to this GitHub repository, the RugbyScope data is also available on Zenodo.

Note that it is very unlikely that these scripts will work in the future, due to the unpredictable evolution of the online sources from which our database is extracted (cf. Section Description).

Dependencies

R Environment

Tested with R version 4.5.2, with the following packages:

Python Environment

Tested with Python 3.13, with the following packages:

Changelog

  • v1.0.0: original version
  • v1.0.1: improved the order of stints so that they match Wikipedia's, and also a few manual corrections.
  • v1.1.0: a number of manual corrections, and two distinct variants of the DB: full (all data retrieved from the sources) vs. major (does not contain under-18 stints, and some stint years are inferred).
  • v1.1.1: fixed missing years in Barbarian stints, and other manual corrections.
  • v1.2.0: renamed country to nation for the sake of consistency.

References

  • [LO'26] V. Labatut & D. O'Sullivan. RugbyScope: a Transfer-Oriented Database of Rugby Union Teams and Players, in submission, 2026.

About

Extraction and analysis of Rugby Union transfer networks

Topics

Resources

Stars

1 star

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages