Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ff_playerscores.espn position id assignments #441

Merged
merged 3 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: ffscrapr
Title: API Client for Fantasy Football League Platforms
Version: 1.4.8.19
Version: 1.4.8.20
Authors@R:
c(person(given = "Tan",
family = "Ho",
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ row per player-team-season (v1.4.8.13) (thanks @john-b-edwards!)
- [BREAKING] `mfl_players()` and `sleeper_players()` outputs now try to return
more standardized column types (v1.4.8.17)
- `sleeper_userleagues()` output has a new column roster_id which is the same ID as franchise_id in `sleeper_rosters()` (1.4.8.19) (#436)
- `ff_playerscores()` for espn fixes position assignments (#440) (1.4.8.20)

# ffscrapr 1.4.8

Expand Down
2 changes: 1 addition & 1 deletion R/espn_playerscores.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ ff_playerscores.espn_conn <- function(conn, limit = 1000, ...) {
tidyr::hoist("x", "player_id" = "id", "franchise_id" = "onTeamId", "player") %>%
tidyr::hoist("player", "player_name" = "fullName", "pos_id" = "defaultPositionId", "stats") %>%
dplyr::mutate(
pos = .espn_pos_map()[.data$pos_id],
pos = .espn_pos_map()[as.character(.data$pos_id)],
stats = purrr::map(
.data$stats,
~ tibble::tibble(.x) %>%
Expand Down
Loading