{ "cells": [ { "cell_type": "markdown", "id": "worldwide-blood", "metadata": {}, "source": [ "# Introduction" ] }, { "cell_type": "markdown", "id": "understanding-numbers", "metadata": {}, "source": [ "I will research 3 different questions I had while looking at the NBA data. I will first find who the better player is between LeBron James and Kevin Durant and then find who the best players are on offense and defense. All of the data I will be using will come from the 2014-2022 NBA seasons." ] }, { "cell_type": "markdown", "id": "greater-circular", "metadata": {}, "source": [ "## Overarching Question: Who are some of the best players in the NBA from 2014-2022?" ] }, { "cell_type": "markdown", "id": "appreciated-testimony", "metadata": {}, "source": [ "I want to look at this because I have played basketball most of my life and enjoy watching the NBA. I enjoy looking at NBA players' stats in my free time so this was very interesting to me. I want to see who some of the best players are on offense and defense." ] }, { "cell_type": "markdown", "id": "permanent-pollution", "metadata": {}, "source": [ "# Data" ] }, { "cell_type": "code", "execution_count": 1, "id": "technical-evans", "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import matplotlib.pyplot as plt\n", "import seaborn as sns" ] }, { "cell_type": "code", "execution_count": 2, "id": "overhead-sigma", "metadata": { "scrolled": true }, "outputs": [], "source": [ "file_name = \"modern_RAPTOR_by_player.csv\"\n", "dataset_path = \"data/\" + file_name\n", "df = pd.read_csv(dataset_path)" ] }, { "cell_type": "code", "execution_count": 3, "id": "heated-blade", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
| \n", " | player_name | \n", "player_id | \n", "season | \n", "poss | \n", "mp | \n", "raptor_box_offense | \n", "raptor_box_defense | \n", "raptor_box_total | \n", "raptor_onoff_offense | \n", "raptor_onoff_defense | \n", "... | \n", "raptor_offense | \n", "raptor_defense | \n", "raptor_total | \n", "war_total | \n", "war_reg_season | \n", "war_playoffs | \n", "predator_offense | \n", "predator_defense | \n", "predator_total | \n", "pace_impact | \n", "
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | \n", "Alex Abrines | \n", "abrinal01 | \n", "2017 | \n", "2387 | \n", "1135 | \n", "0.745505 | \n", "-0.372938 | \n", "0.372567 | \n", "-0.418553 | \n", "-3.857011 | \n", "... | \n", "0.543421 | \n", "-1.144832 | \n", "-0.601411 | \n", "1.249008 | \n", "1.447708 | \n", "-0.198700 | \n", "0.077102 | \n", "-1.038677 | \n", "-0.961575 | \n", "0.326413 | \n", "
| 1 | \n", "Alex Abrines | \n", "abrinal01 | \n", "2018 | \n", "2546 | \n", "1244 | \n", "0.317549 | \n", "-1.725325 | \n", "-1.407776 | \n", "-1.291727 | \n", "-0.049694 | \n", "... | \n", "-0.020826 | \n", "-1.502642 | \n", "-1.523468 | \n", "0.777304 | \n", "0.465912 | \n", "0.311392 | \n", "-0.174621 | \n", "-1.112625 | \n", "-1.287247 | \n", "-0.456141 | \n", "
| 2 | \n", "Alex Abrines | \n", "abrinal01 | \n", "2019 | \n", "1279 | \n", "588 | \n", "-3.215683 | \n", "1.078399 | \n", "-2.137285 | \n", "-6.158856 | \n", "4.901168 | \n", "... | \n", "-4.040157 | \n", "1.885618 | \n", "-2.154538 | \n", "0.178167 | \n", "0.178167 | \n", "0.000000 | \n", "-4.577678 | \n", "1.543282 | \n", "-3.034396 | \n", "-0.268013 | \n", "
| 3 | \n", "Precious Achiuwa | \n", "achiupr01 | \n", "2021 | \n", "1581 | \n", "749 | \n", "-4.122966 | \n", "1.359278 | \n", "-2.763688 | \n", "-4.050779 | \n", "-0.919712 | \n", "... | \n", "-4.347596 | \n", "0.954821 | \n", "-3.392775 | \n", "-0.246055 | \n", "-0.246776 | \n", "0.000721 | \n", "-3.817713 | \n", "0.474828 | \n", "-3.342885 | \n", "0.329157 | \n", "
| 4 | \n", "Precious Achiuwa | \n", "achiupr01 | \n", "2022 | \n", "3802 | \n", "1892 | \n", "-2.521510 | \n", "1.763502 | \n", "-0.758008 | \n", "-1.687893 | \n", "3.103441 | \n", "... | \n", "-2.517372 | \n", "2.144151 | \n", "-0.373221 | \n", "2.262658 | \n", "2.309611 | \n", "-0.046953 | \n", "-2.483956 | \n", "2.024360 | \n", "-0.459596 | \n", "-0.728609 | \n", "
5 rows × 21 columns
\n", "