stattleship / stattleship-r

Stattleship R Wrapper
https://api.stattleship.com/
MIT License
48 stars 14 forks source link

NBA Player Data Veracity/Accuracy Issue #16

Closed torontosj closed 8 years ago

torontosj commented 8 years ago

I loaded the NBA player data set and noticed a lot of values set at 0. eg. 369 for 0 years experience, 243 player entries with 0 weight and height, and 323 players with a salary of 0. Please note that these are values of 0 and not missing values.

league = "nba" sport = "basketball" ep = "players" q_body = list() players = ss_get_result(sport=sport, league=league, ep=ep, query=q_body, version=1, walk=TRUE) players_df = do.call("rbind", lapply(players, function(x) x$players))

table(players_df$years_of_experience) table(players_df$height) table(players_df$weight)

dthyresson commented 8 years ago

@torontosj first - thanks for trying out both the API and R wrapper.

We're defaulting the player salary, height, weight, years of experience to 0 when our data provider doesn't have or send that data in the roster feeds.

But, as you noticed, we should instead set those to nil or missing.

We'll also do some data checking to see what players are missing profile data and see if we can't get our provider to populate them in their rosters then next time the update.

Will likely be able to get an update for the 0/nil issue for that player data by tomorrow morning.

torontosj commented 8 years ago

Hey thanks for the response. I haven't had much time to tinker with the wrapper but it is a very cool project and I look forward to using it more in the future. Good luck! :)

dthyresson commented 8 years ago

FYI - We've corrected this in release promoted early this morning. When the player's height, weight, salary, or years of experience is unknown, the value is NULL/nil and no longer 0.

torontosj commented 8 years ago

Nice. I tried loading the NHL and NBA player data sets and I can confirm that I got missing values.