jthomasmock / espnscrapeR

Scrapes Or Collects NFL Data From ESPN
https://jthomasmock.github.io/espnscrapeR/
Other
51 stars 11 forks source link

get_nfl_boxscore_players(game_id = "401220131") #10

Open Grayhawk34 opened 3 years ago

Grayhawk34 commented 3 years ago

Hi,

I'm trying to use the function get_nfl_boxscore_players with game_id = "401220131" but it's not working. This is the 9/13/2020 MIA vs. NE game. Other functions recognize this game_id (e.g. get_nfl_pbp(game_id="401220131") works.

Here's the error that I am getting: player_game = get_nfl_boxscore_players(game_id = "401220131"); Error: Problem with mutate() input ..1. x 'list' object cannot be coerced to type 'double' i Input ..1 is across(c(pass_yds:punt_long), ~suppressWarnings(as.double(.x))). Run rlang::last_error() to see where the error occurred.

jthomasmock commented 3 years ago

Hi @Grayhawk34 I believe this is working in latest release (0.5) as I've redone the function. Can you please confirm?

remotes::install_github("jthomasmock/espnscrapeR")
get_nfl_boxscore_players(game_id = "401220131")
# A tibble: 79 x 84
   game_id  game_uid season season_type date   week home_away winner team_id team_uid
   <chr>    <chr>     <int>       <int> <chr> <int> <chr>      <int> <chr>   <chr>   
 1 4012201… s:20~l:…   2020           2 2020…     1 away           0 15      s:20~l:…
 2 4012201… s:20~l:…   2020           2 2020…     1 away           0 15      s:20~l:…
 3 4012201… s:20~l:…   2020           2 2020…     1 away           0 15      s:20~l:…
 4 4012201… s:20~l:…   2020           2 2020…     1 away           0 15      s:20~l:…
 5 4012201… s:20~l:…   2020           2 2020…     1 away           0 15      s:20~l:…
 6 4012201… s:20~l:…   2020           2 2020…     1 away           0 15      s:20~l:…
 7 4012201… s:20~l:…   2020           2 2020…     1 away           0 15      s:20~l:…
 8 4012201… s:20~l:…   2020           2 2020…     1 away           0 15      s:20~l:…
 9 4012201… s:20~l:…   2020           2 2020…     1 away           0 15      s:20~l:…
10 4012201… s:20~l:…   2020           2 2020…     1 away           0 15      s:20~l:…
# … with 69 more rows, and 74 more variables: team_city <chr>, team_name <chr>,
#   team_abb <chr>, team_full <chr>, team_color <chr>, team_color_alt <chr>,
#   team_logo <chr>, team_order <int>, team_score <int>, team_record <chr>,
#   text <chr>, player_id <chr>, player_uid <chr>, player_guid <chr>,
#   first_name <chr>, last_name <chr>, full_name <chr>, pass_att <int>,
#   pass_cmp <int>, pass_yds <dbl>, pass_avg <dbl>, pass_td <dbl>, pass_int <dbl>,
#   pass_sacks <dbl>, pass_sack_yds <dbl>, pass_qbr <dbl>, pass_rtg <dbl>,
#   rush_att <dbl>, rush_yds <dbl>, rush_avg <dbl>, rush_td <dbl>, rush_long <dbl>,
#   rec_total <dbl>, rec_yds <dbl>, rec_avg <dbl>, rec_td <dbl>, rec_long <dbl>,
#   rec_tgts <dbl>, fum_total <dbl>, fum_lost <dbl>, fum_rec <dbl>, def_tkl <dbl>,
#   def_solo_tkl <dbl>, def_sacks <dbl>, def_tfl <dbl>, def_pd <dbl>,
#   def_qb_hts <dbl>, def_td <dbl>, int_total <dbl>, int_yds <dbl>, int_td <dbl>,
#   kick_ret_no <dbl>, kick_ret_yds <dbl>, kick_ret_avg <dbl>, kick_ret_long <dbl>,
#   kick_ret_td <dbl>, punt_ret_no <dbl>, punt_ret_yds <dbl>, punt_ret_avg <dbl>,
#   punt_ret_long <dbl>, punt_ret_td <dbl>, kick_fg_att <dbl>, kick_fg_made <dbl>,
#   kick_pct <dbl>, kick_long <dbl>, kick_xp_att <dbl>, kick_xp_made <dbl>,
#   kick_pts <dbl>, punt_no <dbl>, punt_yds <dbl>, punt_avg <dbl>, punt_tb <dbl>,
#   punt_in_20 <dbl>, punt_long <dbl>
Grayhawk34 commented 3 years ago

I'm getting the following error:

Error in open.connection(con, "rb") : HTTP error 403.

Never had this before.

jthomasmock commented 3 years ago

Hi @Grayhawk34 - that means a forbidden pathway.

Can you confirm that you have:

Grayhawk34 commented 3 years ago

Hi,

I have installed the latest version and can navigate to the url. I can also use other functions within the espnscrapeR package.

Not sure why for this function it is giving me the error.

From: Thomas Mock @.> Sent: Friday, July 16, 2021 3:18 PM To: jthomasmock/espnscrapeR @.> Cc: Grayhawk34 @.>; Mention @.> Subject: Re: [jthomasmock/espnscrapeR] get_nfl_boxscore_players(game_id = "401220131") (#10)

Hi @Grayhawk34 https://github.com/Grayhawk34 - that means a forbidden pathway.

Can you confirm that you have:

https://home.mcafee.com/utm_medium=email&utm_source=link&utm_campaign=sig-e mail&utm_content=emailclient?utm_medium=email&utm_source=link&utm_campaign=s ig-email&utm_content=emailclient

Scanned by McAfee https://home.mcafee.com/utm_medium=email&utm_source=link&utm_campaign=sig-e mail&utm_content=emailclient?utm_medium=email&utm_source=link&utm_campaign=s ig-email&utm_content=emailclient and confirmed virus-free.