Git Product home page Git Product logo

nba_data_scraping_and_analysis's Introduction

NBA_scraping_analysis

You can find the full data sets that I scraped, my analysis and others on Kaggle Profile

  1. Player of the week
  2. Head Coaches
  3. Basketball Players Statistics per Season

1. Player of the week

Kaggle Dataset

  • Scraping award data at seasons 1979-80 to 2019-20.
  • Analysis award behavior

Info

Parameter Description
Age
Conference
Date
Draft Year
Height Feet / CM
Player
Position
Season
Season Short
Weight Pounds / KG
Real Value If two awards given [east & west] on the same week the player gets 0.5 point else gets 1 point

2. Head Coaches

Kaggle Dataset

A.Historical NBA Head Coaches

Scraping info about head coaches, starting from 1947

Info

Parameter Description
Birth date dd-mmm-yyyy
End season for example 2017-2018
Name
Nationality
Start season for example 2017-2018
Teams
Start season short for example 2017
End season short for example 2017
Num of teams

B.NBA Coach of the Year Recipients

Scraping info about NBA coach of the year, starting from 1963

Parameters

Parameter Description
Year starting year of Season
Coach Head Coach Name
Team
W-L W-L in Season
Playoffs W-L Playoffs W-L in Season
Career W-L Career W-L in Season
Exp (Years) Experience Years till season
W wins in Season
L losses in Season
Playoffs W Playoffs wins in Season
Playoffs L Playoffs losses in Season
Career W Careers wins till Season
Career L Careers losses till Season
Born Birthdate MMM DD, YYYY
Birthplace
College
Overall Record Career Overall Record

3. Basketball Players Statistics per Season

Kaggle Dataset

  • Scraping player statistics & details per season of 49 League and ~11K players (2010 - 2020)

output files

  1. players_stats_by_season.csv - player statistics per season
  2. players_stats_by_season_full_details.csv - players statistics per season + details

Info

Parameter Description players_stats_by_season players_stats_by_season_full_details
Season yyyy - yyyy v v
Stage International, NBA: Playoffs, Regular_Season v v
Player Player Full Name v v
Team Team Name v v
GP # Games Played v v
MIN # Minutes Played v v
FGM # Field Goals Made v v
FGA # Field Goals Attempts v v
3PM # Three Points Made v v
3PA # Three Points Attempts v v
FTM # Free Throws Made v v
FTA # Free Throws Attempts v v
TOV # Turnovers v v
PF # Personal Fouls v v
ORB # Offensive Rebounds v v
DRB # Defensive Rebounds v v
REB # Rebounds v v
AST # Assists v v
STL # Steals v v
BLK # Blocks v v
PTS # Points v v
birth_year Birth Year v
birth_month Birth Month v
birth_date Birth Date v
height Height [Feet] v
height_cm Height [CM] v
weight Weight [Pounds] v
weight_kg Weight [KG] v
nationality Nationality v
high_school High School v
draft_round Draft Round v
draft_pick Draft Pick v
draft_team Draft Team v

Acknowledgements

Player of the week - scraped from basketball real GM

Historical NBA Head Coaches- scraped from basketball real GM

NBA Coach of the Year Recipients - scraped from espn

Basketball Players Statistics per Season - scraped from basketball real GM

nba_data_scraping_and_analysis's People

Contributors

jacob-baruch-iknowlogy avatar jacobbaruch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

nba_data_scraping_and_analysis's Issues

Player URL

Hey, was using your script which is working to fine until it reaches the point to add PLayer URL. I checked if code and RealGm URL are same.
I'm new into Python for a year and was mainly into Pandas and looking forward to play with some Basketball data. I would appreciate your help.

Code fine until this point:

`## runs over all player details store each of them into one file
write_player_details_files(df_player_season_data['Player_URL'])

go over all player details files and store them into dictionary

player_details_dictionary = read_player_details(df_player_season_data['Player_URL'].unique())

add all player details columns into the dataframe

set_player_details_dataframe(player_details_dictionary)`

I did dnot change anything before; the csv on my hard drive is ok and contains the col with Player URL. I get the error message:

`---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
in
1 ## runs over all player details store each of them into one file
----> 2 write_player_details_files(df_player_season_data['Player_URL'])
3
4 ## go over all player details files and store them into dictionary
5 player_details_dictionary = read_player_details(df_player_season_data['Player_URL'].unique())

in write_player_details_files(player_url_series)
7 player_details_dictionary = {}
8 player_details_dictionary[player_url] = get_player_details(player_url)
----> 9 write_file_player_details(player_details_dictionary)

in write_file_player_details(i_player_details)
4 player_file_name = 'player_details/'+ player_file_name
5
----> 6 f = open(player_file_name,"w")
7 f.write( str(i_player_details) )
8 f.close()

FileNotFoundError: [Errno 2] No such file or directory: 'player_details/_player_James-Harden_Summary_1598.txt'`

thx

Philipp

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.