How to use R language ggplot2 to draw ridges to show the distribution of shooting distance of NBA players
This article introduces how to use R language ggplot2 to draw ridges to show the distribution of shooting distance of NBA players, the content is very detailed, interested friends can refer to, I hope it can be helpful to you.
The main content is to explore the shooting data of Curry Harden and James Westbrook, the top four in the NBA 14 gamble 15 regular season MVP rankings. Repeat the first thing today: use ggplot2 in R language to draw ridges to show the distribution of shooting distance of the above four.
The original dataset is downloaded from kaggle
Https://www.kaggle.com/dansbecker/nba-shot-logs
The code https://github.com/nycdatasci/bootcamp007_project/tree/master/Project1-ExploreVis/Xinyuan_Wu to clean the original dataset
We will not pay attention to this part of the code. I have already run the code that gets the data cleaning of the drawing. If you need the sample data in this article, you can leave a message directly.
First read the cleaned data df