Skip to content

Commit

Permalink
fix ff_playerscores.espn position id assignments (#441)
Browse files Browse the repository at this point in the history
* espn_playerscores - fix pos_id, closes #440

* bumpver

* Update NEWS.md
  • Loading branch information
tanho63 authored Nov 1, 2024
1 parent 72cba2d commit b699018
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
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

0 comments on commit b699018

Please sign in to comment.