Provides a set of functions to scrape and analyze rugby data.
Supports competitions including the National Rugby League, New South Wales Cup,
Queensland Cup, Super League, and various representative and women's competitions.
Includes functions to fetch player statistics, match results, ladders, venues, and coaching data.
Designed to assist analysts, fans, and researchers in exploring historical and current rugby league data.
See Woods et al. (2017)
A powerful R package to scrape, clean, and analyze publicly available Rugby data
nrlR provides a streamlined toolkit for R users to scrape, clean, and analyze rugby data from public sources specifically rugby league. It covers:
With nrlR, you can easily pull:
โ
Match fixtures and results
โ
Ladder standings
โ
Player statistics (runs, tries, tackles, points)
โ
Team statistics (totals, differentials)
โ
Venues, crowds & more
Use it to build dashboards, run predictive models, or simply explore your favourite teams.
Install the development version directly from GitHub using:
# install.packages("devtools")
devtools::install_github("DanielTomaro13/nrlR")
library(nrlR)
ladder <- fetch_ladder(season = 2025, league = "nrl", source = "nrl")
head(ladder)
#> # A tibble: 6 ร 12
#> position team played wins draws losses points_for points_against
#> <int> <chr> <int> <int> <int> <int> <int> <int>
#> 1 1 Storm 8 7 0 1 168 98
#> 2 2 Panthers 8 6 1 1 152 106
#> 3 3 Roosters 8 6 0 2 144 112
#> 4 4 Sharks 8 5 1 2 138 118
#> 5 5 Cowboys 8 5 0 3 142 124
#> 6 6 Eels 8 5 0 3 126 128
fixtures <- fetch_fixture(season = 2025, round_number = 5)
print(fixtures)
#> # A tibble: 8 ร 10
#> match_id date round home_team away_team venue crowd result
#> <int> <date> <int> <chr> <chr> <chr> <int> <chr>
#> 1 401234 2025-04-03 5 Storm Panthers AAMI Park 18500 19-16
#> 2 401235 2025-04-04 5 Roosters Sharks Allianz 35241 24-10
#> 3 401236 2025-04-05 5 Cowboys Eels QCB 22000 28-12
#> # ... with 5 more rows
# Get the available competitions first
comps <- fetch_cd_competitions()
print(comps)
#> # A tibble: 15 ร 4
#> comp_id competition_name season year
#> <int> <chr> <int> <int>
#> 1 12755 NRL Telstra Premiership 2025 2025
#> 2 12754 NRLW Premiership 2025 2025
#> 3 12753 State of Origin 2025 2025
#> # ... with 12 more rows
# Then fetch team stats, e.g. comp ID 12755
cd_team_stats <- fetch_team_stats_championdata(comp = 12755, round = 4)
head(cd_team_stats)
#> # A tibble: 6 ร 20
#> team round tries line_breaks tackle_breaks metres_gained
#> <chr> <int> <int> <int> <int> <int>
#> 1 Melbourne Storm 4 4 12 18 1450
#> 2 Penrith Panthers 4 3 10 15 1380
#> 3 Sydney Roosters 4 5 14 20 1520
#> # ... with 3 more rows and 15 more variables
# For competition ID 12755 (2025 NRL Telstra Premiership)
cd_player_stats <- fetch_player_stats(
comp = 111,
round = 4,
source = "championdata"
)
head(cd_player_stats)
#> # A tibble: 6 ร 18
#> player_name team position round tries assists line_breaks
#> <chr> <chr> <chr> <int> <int> <int> <int>
#> 1 Nathan Cleary Panthers Halfback 4 0 3 2
#> 2 Jahrome Hughes Storm Halfback 4 1 2 4
#> 3 James Tedesco Roosters Fullback 4 2 1 6
#> # ... with 3 more rows and 11 more variables
nrlR aggregates data from multiple reliable sources:
| Competition | Years Available | Source Options |
|---|---|---|
| NRL | 1998-2025 | nrl, rugbyproject, championdata |
| NRLW | 2018-2025 | nrl, rugbyproject |
| State of Origin | 1998-2025 | nrl, rugbyproject |
| NSW Cup | 2008-2025 | nrl |
| QLD Cup | 2008-2025 | nrl |
| Super League | 2002-2025 | superleague |
| Championship | 2009-2025 | superleague |
| League One | 2009-2025 | superleague |
# Get fixtures for a specific round
fetch_fixture(season = 2025, round_number = 5, league = "nrl")
# Get all results for a season
fetch_results(season = 2024, league = "nrl", source = "nrl")
# Get specific match details
fetch_match_details(match_id = 401234, source = "nrl")
# Current season ladder
fetch_ladder(season = 2025, league = "nrl")
# Historical ladder positions
fetch_historical_ladder(season = 2020, round = 10, league = "nrl")
# Individual player stats
fetch_player_stats(
season = 2024,
league = "nrl",
round = 1:27,
player_name = "Nathan Cleary"
)
# Top try scorers
fetch_player_leaders(
season = 2024,
stat_type = "tries",
league = "nrl"
)
# Team performance metrics
fetch_team_stats(season = 2024, league = "nrl", source = "rugbyproject")
# Head-to-head records
fetch_h2h_record(team1 = "Storm", team2 = "Panthers", years = 2020:2024)
# Champion Data advanced stats
fetch_cd_player_advanced(comp = 12755, round = 4)
# Team efficiency metrics
fetch_team_efficiency(season = 2024, league = "nrl")
# Set request delays to be respectful to data sources
set_nrl_config(delay_seconds = 1, max_retries = 3)
# Enable caching to speed up repeated requests
enable_caching(cache_dir = "~/.nrlR_cache", expire_hours = 24)
# Check data completeness
check_data_completeness(season = 2024, league = "nrl")
# Validate scraped data
validate_nrl_data(data = my_nrl_data)
nrlR includes comprehensive testing to ensure data quality:
# Run package tests
devtools::test()
# Check specific scraper functionality
test_scraper_health("nrl")
test_scraper_health("rugbyproject")
test_scraper_health("championdata")
The package gracefully handles common issues:
We welcome contributions! Here's how you can help:
Found an issue? Please create an issue with:
sessionInfo())Want a new feature? Open an issue describing:
git checkout -b feature/amazing-feature)devtools::check() to ensure qualityAdding a new competition or data source:
Please use nrlR responsibly:
?function_name or help(package = "nrlR")If you use nrlR in academic research, please cite:
Tomaro, D. (2025). nrlR: An R package for rugby league data analysis.
R package version 0.1.1. https://github.com/DanielTomaro13/nrlR
BibTeX:
@Manual{nrlR,
title = {nrlR: An R package for rugby league data analysis},
author = {Daniel Tomaro},
year = {2025},
note = {R package version 0.1.1},
url = {https://github.com/DanielTomaro13/nrlR},
}
MIT ยฉ Daniel Tomaro
This package is not affiliated with the NRL, Rugby League Project, Champion Data, or any official rugby league organization. All data is sourced from publicly available information.
๐ข Build your next footy model, dashboard, or data viz with nrlR.
Happy coding! ๐๐
Last updated: August 2025