<jupyter_start><jupyter_text>Import Libraries<jupyter_code>!pip install plotly
# Dependencies and Setup
import pandas as pd
import plotly.express as px
import plotly.graph_objects as go<jupyter_output><empty_output><jupyter_text>Read/Clean Data<jupyter_code># Read All Star csv
all_players = pd.read_csv('../../datasets/NBA_All_Stars_1996-2018.csv') 
all_players = all_players.rename(columns={'PLAYER':'Player'})
# all_stars = all_players.loc[all_players['Selected?'] == 1]
all_players.head()
# Read Salary csv
player_salary = pd.read_csv('../../datasets/nba_salaries.csv') 
player_salary.head()
all_data = pd.merge(all_players, player_salary, how='inner', on=['Player', 'Year'])
all_data.head()<jupyter_output><empty_output><jupyter_text>Create graphs<jupyter_code>import seaborn as sns
import matplotlib.pyplot as plt

sns.scatterplot(y='Inflation', x='Year', hue = 'Selected?', data=all_data)

fig = go.Figure(data=go.Scatter(x=all_data['Year'],
                                y=all_data['Inflation'],
                                mode='markers',
                                marker_color=all_data['Selected?'],
                                text=all_data['Player'])) 

fig.update_traces(marker=dict(size=8,
                              line=dict(width=.5,
                                        color='DarkSlateGrey')),
                  selector=dict(mode='markers'))

fig.update_layout(title='All Stars vs Salary')
fig.show()

fig.write_html("plotly.html")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1370592149035263, 'fraction_numerical': 0.007318695941450432, 'mean_word_length': 3.3342939481268012, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '128266', 'license': 'Apache-2.0', 'n_tokens_mistral': 521, 'n_tokens_neox': 500, 'n_words': 74, 'path': 'group_files/jane/notebooks/ASG_salary.ipynb', 'repo_name': 'Fabiola-C14/Final_Project-NBA-Analysis', 'size': '1503'}