File size: 1,969 Bytes
75890c2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
pretty_name: "NBA Play by Play Data for 2023 season"
license: mit
---





# NBA Play-by-Play Data Extraction and Analysissss

## Overview
This project aims to retrieve play-by-play data for NBA matches in the 2023 season using the Sportradar API. The play-by-play data is fetched from the API, saved into JSON files, and then used to extract relevant features for analysis and other applications. The extracted data is saved in Parquet files for easy access and usage by others.

## Features
The project provides the following features:
- Fetching play-by-play data for NBA matches in the 2023 season from the Sportradar API.
- Saving the fetched data into JSON files for archival and offline use.
- Extracting relevant features from the JSON files, such as:
  - Match date and time
  - Home team and away team information
  - Play descriptions
  - Clock time
  - Event types (e.g., two-pointer, three-pointer, block, foul)
  - Home team points and away team points
  - Quarter number
- Saving the extracted data into Parquet files for easy access and analysis.

## Usage
1. **Fetching Play-by-Play Data**: To fetch play-by-play data, use the provided `get_game_pbp()` function, which retrieves data from the Sportradar API and saves it into JSON files.

2. **Extracting Features**: Use the `get_game_pbp()` function to extract relevant features from the JSON files and create a DataFrame containing the extracted data.

3. **Saving Data**: The extracted data can be saved into Parquet files using pandas' `to_parquet()` function for future analysis and usage.

## Potential Applications
- Generating live commentary for NBA matches.
- Performing in-depth analysis of player performance, team strategies, and game dynamics.
- Developing predictive models for match outcomes or player performance.

## Contributors
- [Your Name](https://github.com/yourusername) - Project Lead & Developer

## License
This project is licensed under the [MIT License](LICENSE).