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
- Lab site: http://lia.univ-avignon.fr/ -- https://www.ul.ie/macsi
- GitHub repo: https://github.com/CompNet/RugbyScope
- Data: https://doi.org/10.5281/zenodo.21948213
- Contact: Vincent Labatut vincent.labatut@univ-avignon.fr, David O'Sullivan david.osullivan@ul.ie
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},
}This repository contains the following folders:
data: input and output foldersdbpedia: intermediary files retrieved from DBpediafusion: tables resulting from the merging of all sources
references: various reference files used throughout the processing of raw datastats: plots and CSV files produced during the descriptive analysis of RugbyScopewikidata: intermediary files retrieved from Wikidatawikipedia: intermediary files retrieved from the 5 considered language editions of wikipediaplayers.csv,stints.csv,teams.csv: current version of RugbyScope, CSV formatrugbyscope.sql: current version of RugbyScope, SQL dumprugbyscope.sqlite: current version of RugbyScope, binary SQLite dumplog: log filesqueries: SPARQL queries used to retrieve the raw data from the knowledge basesdbpedia: SPARQL queries used to retrieve the raw data from DBpediawikidata: SPARQL queries used to retrieve the raw data from Wikidata
src: source codecommon: various scripts and functions used by other scriptsdbpedia: extract and normalize data from DBpedia using the SPARQL queriesfusion: merge data retrieved from the 5 Wikipedia language editionssqlite: create the proper relational DB based on the CSV filesstats: perform the descriptive analysis of RugbyScope, procude plots and statswikidata: extract and normalize data from Wikidata using the SPARQL querieswikipedia: 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 analysisinstall_packages.R: install all the requiredRpackages
Install R and the required packages:
- Install the
Rlanguage - Download this project from GitHub and unzip.
- Install the required packages:
- Open the
Rconsole. - Set the current directory as the working directory, using
setwd("<my directory>"). - Run the install script
src/install_packages.R.
- Open the
Install Python and the required packages:
- Install the
Pythonlanguage - Execute
pip install -r requirements.txtto install the required packages.
To apply the extraction, cleaning and merging process described in the data paper [LO'26]:
- Open the
Rconsole. - Set the current directory as the working directory, using
setwd("<my directory>"). 3. Run the main scriptsrc/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).
Tested with R version 4.5.2, with the following packages:
circlize: version 0.4.18corrplot: version xx0.95xxDataExplorer: version 0.9.0DBI: version 1.3.0dplyr: version 1.2.1ggplot2: version 4.0.3httr: version 1.4.8httr2: version 1.3.0igraph: version 2.3.3jsonlite: version 2.0.0magrittr: version 2.0.5pheatmap: version 1.0.13polyglotr: version 1.7.4purrr: version 1.2.2RColorBrewer: version 1.1-3readr: version 2.2.0readtext: version 0.92.1RSQLite: version 3.53.3skimr: version 2.2.2stringi: version 1.8.7stringr: version 1.6.0summarytools: version 1.1.5tidyr: version 1.3.2UpSetR: version 1.4.1viridis: version 0.6.5WikidataR: version 2.3.3
Tested with Python 3.13, with the following packages:
beautifulsoup4: version 4.15.0matplotlib: version 3.10.6numpy: version 2.3.2pandas: version 3.0.3requests: version 2.32.5wptools: version 0.4.17
v1.0.0: original versionv1.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: renamedcountrytonationfor the sake of consistency.
- [LO'26] V. Labatut & D. O'Sullivan. RugbyScope: a Transfer-Oriented Database of Rugby Union Teams and Players, in submission, 2026.