README.md

nbaStats

R package to facilitate data scraping in basketball analytics

Ozan Adıgüzel

Introduction

This packages aims to facilitate my data scraping tasks from some publicly available sources and could be useful for other basketball fans as well.

Source Websites

:information_source: Basketball Reference :information_source: Wikipedia

Functions

:basketball: season_ranking: Scrape regular season rankings

# get end of regular season team ranking for 2016-2017 season
season_ranking(2016)

:basketball: season_totals: Scrape regular season stats totals for all players

# get all player stats totals for 2016-2017 season
season_totals(2016)

:basketball: season_pergame: Scrape regular season stats per game for all players

# get all player stats per game for 2016-2017 season
season_pergame(2016)

:basketball: season_players: Get list of players by season

# get a list of players for 2016-2017 season
season_players(2016)

:basketball: player_totals: Scrape regular season stats totals for given player

# get Stephen Curry's stats totals for 2016-2017 season
player_totals("Stephen Curry", 2016)

# you can get the player names using above-mentioned season_players function

:basketball: player_pergame: Scrape regular season stats per game for given player

# get Stephen Curry's stats per game for 2016-2017 season
player_pergame("Stephen Curry", 2016)

# you can get the player names using above-mentioned season_players function

:basketball: player_piclink: Get the link of given player's picture

# get the link to Stephen Curry's image
player_piclink("Stephen Curry")

# you can get the player names using above-mentioned season_players function
# player's image can be rendered or saved using this link

Further Development

This project leaves much room for improvement. There are plenty of player stats available online, which would allow this package to grow exponentially.

As this is my first R package, I would appreciate any feedback that would improve it and my future work.



Ozan147/nbaStats documentation built on May 19, 2019, 1:46 a.m.