LoslegenKostenlos loslegen

Analyzing basketball stats

A national basketball team has contracted you to help them visualize and understand key player stats for their top 50 players.

They have requested that you create a plot comparing players' "Field Goal Percentage" (FGP) to their "Points Per Game" (PPG). This sounds like a great opportunity to utilize your scatterplot skills!

It is important that this graph is comparable to their other graphs. Therefore, all axes need to start at 0 and the y-axis (FGP) needs to have a range of 0-100, since it is a percentage.

You have a bball_data DataFrame available with columns FGP and PPG.

Diese Übung ist Teil des Kurses

Introduction to Data Visualization with Plotly in Python

Kurs anzeigen

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

# Create and show the plot
fig = px.scatter(
  data_frame=bball_data,
  x="____", 
  y="____",
  title="Field Goal Percentage vs. Points Per Game")
fig.show()
Code bearbeiten und ausführen