Type: | Package |
Title: | Access and Analyze Rugby League Data from Rugby League Project |
Version: | 0.1.0 |
Maintainer: | Daniel Tomaro <danieltomaro@icloud.com> |
Description: | 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. |
License: | MIT + file LICENSE |
Encoding: | UTF-8 |
RoxygenNote: | 7.3.2 |
Depends: | R (≥ 4.1.0) |
Imports: | dplyr, purrr, httr, jsonlite, rvest, xml2, stringr, tibble, glue, cli, lubridate |
Suggests: | testthat, rmarkdown |
Config/testthat/edition: | 3 |
NeedsCompilation: | no |
Packaged: | 2025-07-04 22:09:32 UTC; danieltomaro |
Author: | Daniel Tomaro [aut, cre] |
Repository: | CRAN |
Date/Publication: | 2025-07-09 10:20:02 UTC |
Fetch Champion Data Competitions List
Description
Retrieves the list of competitions from Champion Data MC API.
Usage
fetch_cd_comps()
Value
A tibble containing competition details.
Fetch Rugby League Coaches (main wrapper)
Description
Fetch Rugby League Coaches (main wrapper)
Usage
fetch_coaches(
season,
league = c("nrl", "super_league", "championship", "league_one", "womens_super_league",
"qld_cup", "nsw_cup", "state_of_origin", "challenge_cup", "1895_cup"),
source = c("rugbyleagueproject")
)
Arguments
season |
Integer. Season year (from 1998). |
league |
Character. One of: "nrl", "super_league", "championship", "league_one", "womens_super_league", "qld_cup", "nsw_cup", "state_of_origin", "challenge_cup", "1895_cup". |
source |
Character. Only "rugbyleagueproject" is currently supported. |
Value
A tibble of coach details.
Examples
fetch_coaches(2024, league = "nrl")
Return the fixture for a particular round of matches
Description
fetch_fixture returns the Fixture for a given NRL Round. Internally, it calls a fetch_fixture_* function depending on the source.
By default it uses "NRL", but can be extended later to other sources.
Usage
fetch_fixture(
season = NULL,
round_number = NULL,
comp = 111,
source = "NRL",
...
)
fetch_fixture_nrl(season = NULL, round_number = NULL, comp = 111)
Arguments
season |
Numeric. Season year (e.g. 2025). |
round_number |
Numeric. Round number (e.g. 4). |
comp |
Competition id, default 111 for Telstra NRL Premiership. |
source |
Source of the data ("NRL"). |
... |
Additional arguments passed to source-specific functions. |
Value
A tibble with the fixture.
Examples
## Not run:
fetch_fixture(2025, 4)
fetch_fixture(2025, 18, source = "NRL")
## End(Not run)
Fetch Rugby League Ladder (main wrapper)
Description
Fetches ladder standings for a given season and league from a specified source.
Usage
fetch_ladder(
season,
league = c("nrl", "super_league", "championship", "league_one", "womens_super_league",
"qld_cup", "nsw_cup", "state_of_origin", "challenge_cup", "1895_cup"),
source = c("rugbyleagueproject", "nrl")
)
Arguments
season |
Integer. Season year (1998 or later). |
league |
Character. One of: "nrl", "super_league", "championship", "league_one", "womens_super_league", "qld_cup", "nsw_cup", "state_of_origin", "challenge_cup", "1895_cup". |
source |
Character. Either "rugbyleagueproject" or "nrl". |
Value
A tibble with ladder standings and statistics.
Examples
fetch_ladder(2025, league = "nrl", source = "nrl")
fetch_ladder(2024, league = "super_league")
Fetch NRL Ladder for a Given Season and Round
Description
Retrieves the NRL ladder (standings) for a specified season and optionally round.
Usage
fetch_ladder_nrl(season, round_number = NULL, comp = 111)
Arguments
season |
Integer scalar. Season year (e.g. 2025). |
round_number |
Integer scalar or NULL. Round number (e.g. 4). If NULL, fetches current ladder. |
comp |
Integer scalar. Competition ID (default 111 for Telstra Premiership). |
Value
A tibble with ladder positions and stats.
Fetch NRL Team Lineups
Description
Fetches NRL team lineups from nrl.com for a given round using a direct URL. Prints a simple CLI message about the URL being fetched.
Usage
fetch_lineups(url, source = "nrl.com", type = "team_list")
Arguments
url |
Character. The full URL to the team list page on nrl.com. |
source |
Character. Currently only "nrl.com" is supported. |
type |
Character. Currently only "team_list". |
Value
A tibble with game, first_name, last_name, team, role.
Examples
fetch_lineups(url = "https://www.nrl.com/news/2024/05/07/nrl-team-lists-round-10/")
Fetch Player Stats from Multiple Rugby League Sources
Description
Unified wrapper to fetch player stats from either Champion Data MC API (NRL/NRLW/State of Origin) or Rugby League Project web scraping.
Usage
fetch_player_stats(
season = NULL,
league = c("nrl", "super_league", "championship", "league_one", "womens_super_league",
"qld_cup", "nsw_cup"),
round = NULL,
comp = NULL,
source = c("championdata", "rugbyproject")
)
Arguments
season |
Integer scalar. Season year (rugbyproject only). |
league |
Character scalar. League name (rugbyproject only). |
round |
Integer scalar or NULL. Round number filter (both sources). |
comp |
Integer. Competition ID (championdata only). |
source |
Character scalar. One of "championdata" or "rugbyproject". Default is "championdata". |
Details
For 'source = "championdata"', provide 'comp' (competition ID). 'round' is optional. For 'source = "rugbyproject"', provide 'season', 'league', and optionally 'round'.
Value
A tibble of player stats joined with fixture info.
Fetch Champion Data Player Stats for Competition
Description
Fetches player stats for the given Champion Data competition ID. Use fetch_cd_competitions for all ids. If round is provided, filters fixtures to that round. Otherwise fetches all completed matches available.
Usage
fetch_player_stats_championdata(comp, round = NULL)
Arguments
comp |
Integer. Competition ID (required). |
round |
Integer or NULL. Round filter (optional). |
Value
Tibble of player stats joined with fixture info.
Fetch Rugby League Match Results
Description
Main wrapper to fetch match results for one or more seasons.
Usage
fetch_results(
seasons,
league = c("nrl", "super_league", "championship", "league_one", "womens_super_league",
"qld_cup", "nsw_cup", "state_of_origin", "challenge_cup", "1895_cup"),
source = c("rugbyleagueproject")
)
Arguments
seasons |
Integer vector. One or more seasons to fetch (1998 or later). |
league |
Character. League name. See options. |
source |
Character. Data source; only "rugbyleagueproject" currently supported. |
Value
A tibble of match results with parsed date and round.
Fetch Rugby League Match Results from Rugby League Project
Description
Fetch Rugby League Match Results from Rugby League Project
Usage
fetch_results_rugbyproject(seasons, league)
Arguments
seasons |
Integer vector. One or more seasons to fetch (1998 or later). |
league |
Character. League name. See options. |
Value
A tibble of match results with parsed date, aligned to weekday, and round.
Fetch Champion Data Team Stats for Competition
Description
Fetches team stats for the given Champion Data competition ID. If round is provided, filters fixtures to that round.
Usage
fetch_team_stats_championdata(comp, round = NULL)
Arguments
comp |
Integer. Competition ID (required). |
round |
Integer or NULL. Round filter (optional). |
Value
Tibble of team stats joined with fixture info.
Fetch Rugby League Venues (main wrapper)
Description
Fetch Rugby League Venues (main wrapper)
Usage
fetch_venues(
season,
league = c("nrl", "super_league", "championship", "league_one", "womens_super_league",
"qld_cup", "nsw_cup", "state_of_origin", "challenge_cup", "1895_cup"),
source = c("rugbyleagueproject")
)
Arguments
season |
Integer. Season year (from 1998). |
league |
Character. One of: "nrl", "super_league", "championship", "league_one", "womens_super_league", "qld_cup", "nsw_cup", "state_of_origin", "challenge_cup", "1895_cup". |
source |
Character. Only "rugbyleagueproject" is currently supported. |
Value
A tibble of venue details.
Examples
fetch_venues(2024, league = "nrl")