Skip to content

Commit debc61f

Browse files
author
howardbaik
committed
Add PheWAS post and name correction
1 parent 0e8ac87 commit debc61f

File tree

19 files changed

+142
-54
lines changed

19 files changed

+142
-54
lines changed

posts/analyzing-twitter-accounts/index.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Analyzing Twitter Accounts"
33
description: "I grouped Twitter accounts by popularity measure, a quick and easy way to quantify the popularity of a Twitter account"
4-
author: "Howard Baek"
4+
author: "Howard Baik"
55
date: "2019-01-04"
66
categories: [Data Analysis]
77
image: "thumbnail.jpg"

posts/animating-epv-in-the-nba-extended/index.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Animating Expected Possession Value in the NBA Extended"
33
description: "I extend a MIT SSAC Research Paper by Cervone, DAmour, Bornn, and Goldsberry on Expected Possession Value or EPV."
4-
author: "Howard Baek"
4+
author: "Howard Baik"
55
date: "2019-06-15"
66
categories: [Data Visualization]
77
image: "thumbnail.png"
Lines changed: 25 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,93 @@
11
---
22
title: "Animating Expected Possession Value in the NBA"
33
description: "I extend a MIT SSAC Research Paper by Cervone, DAmour, Bornn, and Goldsberry on Expected Possession Value or EPV."
4-
author: "Howard Baek"
4+
author: "Howard Baik"
55
date: "2019-04-12"
66
categories: [Data Visualization]
77
image: "thumbnail.jpg"
88
---
99

1010
## Introduction
1111

12-
In a MIT Sloan Sports Analytics Conference Research Paper, Cervone, D'Amour, Bornn, and Kirk Goldsberry create a metric called Expected Possession Value, EPV. They use optical player tracking data to calculate the number of points the offense is expected to score by the end of the possession _in real time_, given everything we know now. In other words, EPV of a possession is the weighted average of the outcomes of all future paths that the possession could take (Cervone et al.)
12+
In a MIT Sloan Sports Analytics Conference Research Paper, Cervone, D'Amour, Bornn, and Kirk Goldsberry create a metric called Expected Possession Value, EPV. They use optical player tracking data to calculate the number of points the offense is expected to score by the end of the possession *in real time*, given everything we know now. In other words, EPV of a possession is the weighted average of the outcomes of all future paths that the possession could take (Cervone et al.)
1313

14-
The model breaks down a possession into discrete (macrotransitions) and continuous actions (microtransitions). Macrotransitions include passes, shots, and turnovers whereas microtransitions are defined as every other movement that players make with the ball.
14+
The model breaks down a possession into discrete (macrotransitions) and continuous actions (microtransitions). Macrotransitions include passes, shots, and turnovers whereas microtransitions are defined as every other movement that players make with the ball.
1515

1616
Mathematically,
1717

18-
![](img/epv-equation.png){width=650px height=70px}
18+
![](img/epv-equation.png){width="650px" height="70px"}
1919

20+
A snapshot of a single possession in a game between the Spurs and Thunder illustrates the practicality of EPV:
2021

21-
A snapshot of a single possession in a game between the Spurs and Thunder illustrates the practicality of EPV:
22+
![](img/paper-figure1.png){width="650px" height="500px"}
2223

23-
![](img/paper-figure1.png){width=650px height=500px}
24+
Since EPV is calculated in *real time*, the authors of the paper interpret EPV as a stock ticker. This lends itself to an augmented graph where we have the spatial configuration of players on top and the stock ticker representation of EPV on the bottom:
2425

25-
26-
Since EPV is calculated in _real time_, the authors of the paper interpret EPV as a stock ticker. This lends itself to an augmented graph where we have the spatial configuration of players on top and the stock ticker representation of EPV on the bottom:
27-
28-
29-
![](img/paper-figure2.png){width=650px height=320px}
26+
![](img/paper-figure2.png){width="650px" height="320px"}
3027

3128
The above graph is best explained by the authors:
3229

33-
> Consider the following possession from the Spurs/Cavaliers game on February 13, 2013. Down by 2 with less than 10 seconds left, the Spurs inbounded to Tony Parker, who drove to the basket, drawing defenders into the paint and leaving Kawhi Leonard wide open in the corner. Instead of attempting the tightly contested layup that would tie the game, Parker dished to a wide-open Leonard, who promptly sank the game-winning 3-pointer, almost unchallenged by the defense. While Leonard’s 3-pointer was this possession’s (and game’s) “checkmate”, we see from Figure 2 how valuable Parker was in setting it up. Parker actually dramatically increased the value of the possession twice - first by driving towards the basket, and then by passing to Leonard.
34-
<br>
30+
> Consider the following possession from the Spurs/Cavaliers game on February 13, 2013. Down by 2 with less than 10 seconds left, the Spurs inbounded to Tony Parker, who drove to the basket, drawing defenders into the paint and leaving Kawhi Leonard wide open in the corner. Instead of attempting the tightly contested layup that would tie the game, Parker dished to a wide-open Leonard, who promptly sank the game-winning 3-pointer, almost unchallenged by the defense. While Leonard’s 3-pointer was this possession’s (and game’s) “checkmate”, we see from Figure 2 how valuable Parker was in setting it up. Parker actually dramatically increased the value of the possession twice - first by driving towards the basket, and then by passing to Leonard. <br>
3531
3632
**I would like to extend this work by animating the above graph using [`gganimate`](https://gganimate.com/) and interpreting each movement during final minute of a NBA game on November 10th, 2013, between the [Miami Heat vs Brooklyn Nets](https://www.youtube.com/watch?v=K6twYcwd45U) within the context of Expected Possession Value. Unlike a static graph, an animated graph conveys a strong, clear narrative that help teams understand their tracking data.**
3733

38-
Briefly, this game is played at Brooklyn in the early stages of the 2013-2014 NBA season, with Brooklyn expected to challenge Miami for a championship in the Spring. The home fans are expecting a victory as their team is up 8 points with one minute left.
34+
Briefly, this game is played at Brooklyn in the early stages of the 2013-2014 NBA season, with Brooklyn expected to challenge Miami for a championship in the Spring. The home fans are expecting a victory as their team is up 8 points with one minute left.
3935

40-
A couple of notes: EPV is calculated as soon as the ball crosses the mid court line and the jersey numbers on each player are scraped from [Swish Analytics.](https://www.swishanalytics.com/nba/players/player?id=214152) This site reflects recent jersey numbers, which means Lebron James is #23 in the animations even though he wore #6 for the Miami Heat.
36+
A couple of notes: EPV is calculated as soon as the ball crosses the mid court line and the jersey numbers on each player are scraped from [Swish Analytics.](https://www.swishanalytics.com/nba/players/player?id=214152) This site reflects recent jersey numbers, which means Lebron James is #23 in the animations even though he wore #6 for the Miami Heat.
4137

42-
This work was enabled by Dan Cervone's [data and code](https://github.com/dcervone/EPVDemo).
38+
This work was enabled by Dan Cervone's [data and code](https://github.com/dcervone/EPVDemo).
4339

4440
The code used in this post is stored [here](https://github.com/howardbaek/nba-animation/blob/master/final-result.Rmd)
4541

46-
4742
## Paul Pierce Isolation
4843

4944
![](img/gamefilm-228.gif)
5045

5146
![](img/anim-228.GIF)
5247

53-
5448
At 1:13, the Nets move the ball up the court and as soon as the ball crosses the mid court line, EPV is calculated. The offense starts in an isolation formation with Paul Pierce being defended by Mario Chalmers. As Pierce dribbles toward the 3 point line, EPV steadily increases to approximately 1.00. However, as he drives the basket, EPV take a steep dive, demonstrating a negative contribution to the offense. From the moment the ball crosses the half circle, EPV has decreased from just over 1.00 all the way to 0.90. When Pierce pulls up for a 17-foot jumper near the free throw line, EPV sharply jumps to 0.93, then takes another plunge once the ball hits the back of the rim. Expected Possession Value tells us that Pierce drastically decreased the value of the possession by driving towards the basket.
5549

56-
5750
## Wide Open 3-point Shot from Dwayne Wade
5851

5952
![](img/gamefilm-229.gif)
6053

6154
![](img/anim-229.GIF)
6255

63-
At 1:03, Lebron James grabs the rebound and drives all the way to the basket. During this time, EPV drops from around 1.00 to 0.80. This resembles the previous change in EPV during Pierce's drive towards the basket. Back to this play, instead of shooting a contested 2-point jumper or a layup, James incrementally increases the value of the possession by dishing to an open Chris Bosh at the 3- point line. Bosh wisely passes to Chalmers, a much better 3-point shooter. However, EPV decreases since Bosh was wide open wheras Chalmers faces defensive pressure from Joe Johnson. Once Chalmers dishes to Ray Allen, a prolific 3 point shooter, EPV goes down as Derron Willliams frantically runs to defend Allen. Allen makes the optimal decision and passes to Dwayne Wade in the corner. Wade is left wide open after Williams gambles on Allen shooting the three and Pierce's unwillingness to defend. At this moment, EPV jumps by 0.1 and after Wade releases a wide open 3-pointer, shoots up to almost 1.60.
64-
56+
At 1:03, Lebron James grabs the rebound and drives all the way to the basket. During this time, EPV drops from around 1.00 to 0.80. This resembles the previous change in EPV during Pierce's drive towards the basket. Back to this play, instead of shooting a contested 2-point jumper or a layup, James incrementally increases the value of the possession by dishing to an open Chris Bosh at the 3- point line. Bosh wisely passes to Chalmers, a much better 3-point shooter. However, EPV decreases since Bosh was wide open wheras Chalmers faces defensive pressure from Joe Johnson. Once Chalmers dishes to Ray Allen, a prolific 3 point shooter, EPV goes down as Derron Willliams frantically runs to defend Allen. Allen makes the optimal decision and passes to Dwayne Wade in the corner. Wade is left wide open after Williams gambles on Allen shooting the three and Pierce's unwillingness to defend. At this moment, EPV jumps by 0.1 and after Wade releases a wide open 3-pointer, shoots up to almost 1.60.
6557

6658
## Kevin Garnett Shot from the Paint
6759

6860
![](img/gamefilm-230.gif)
6961

7062
![](img/anim-230.GIF)
7163

72-
7364
At 50.4 seconds, Williams slowly dribbles toward the basket before Garnett sets a pick. As Williams moves to the center of the 3-point perimeter defended by Bosh, EPV slightly increases. When Williams passes off to Garnett, who is parked just inside the free throw line, EPV greatly decreases, signifying a very negative impact on the offense. Then, Garnett double clutches and shoots a 2-point jumper in the paint, at which EPV hovers around 0.8. Ultimately, he misses the shot and the ball is eventually rebounded by James. I would have liked Garnett to return the ball to Williams, which would have entailed higher value. The reason is that Bosh realizes that Wade is outmatched by the much taller Garnett and leaves Williams to help out Wade. As a result, Williams was wide open for a 3-pointer and would have had a better chance of knocking down the 3-pointer than Garnett, who was draped by Wade and Bosh.
7465

75-
76-
## Frantic Action leading to Chalmers 3-Pointer
66+
## Frantic Action leading to Chalmers 3-Pointer
7767

7868
![](img/gamefilm-231.gif)
7969

8070
![](img/anim-231.GIF)
8171

82-
8372
At 33.0 seconds, James dribbles up the court and attempts a pass, which bounces off Anderson's head to the sidelines. While the ball is in no-man's land, EPV plateuas around 1.035, then takes quite a significant plunge when Allen runs over to the sidelines to retrieve the ball! As Allen passes up top to Chalmers who sets up the offense, EPV climbs back up, showing the recovery of offense's value. Interestingly, as Chalmers dribbles on the periphery of the 3-point line, EPV spikes up to around 1.075 from 1.025. As Chalmers passes off to Bosh who then passes to James, EPV plateuas each time. As James gets ready to drive the basket, EPV increases, until he dishes off to Chalmers. This offensive possession shows hectic action starting with the ball bouncing off Anderson's head to the sidelines. As Allen recovers possession and passes off to Chalmers, both sides are in a tumultous state as they try to reset formation. One example of this is shown in the beginning of the game film, when Ray Allen is tustling with Kevin Garnett to regain formation. Fortunately for the Heat, they are rewarded with a Chalmers 3-point shot.
8473

85-
8674
![](img/chalmers-celebration.gif)
8775

88-
8976
## Conclusion
9077

91-
The final minute of this game revealed several insights about Expected Possession Value.
78+
The final minute of this game revealed several insights about Expected Possession Value.
9279

93-
1. Driving towards the basket with a defender entails a guaranteed decrease in EPV.
80+
1. Driving towards the basket with a defender entails a guaranteed decrease in EPV.
9481

95-
2. Pulling up for a shot leads to an ephemeral spike in EPV.
82+
2. Pulling up for a shot leads to an ephemeral spike in EPV.
9683

97-
3. EPV drastically increases once a player passes to a wide open teammate but decreases once a defender closes down on him.
84+
3. EPV drastically increases once a player passes to a wide open teammate but decreases once a defender closes down on him.
9885

99-
4. EPV plateaus when player holds onto ball without dribbling.
86+
4. EPV plateaus when player holds onto ball without dribbling.
10087

101-
5. EPV shows great fluctuations in loose ball situations when players deviate from offensive/defensive structure.
88+
5. EPV shows great fluctuations in loose ball situations when players deviate from offensive/defensive structure.
10289

103-
_If you enjoyed this post, you will enjoy [Animating Expected Possession Value in the NBA: Part 2](http://insidethetv.rbind.io/post/epv-the-epilogue/) _
90+
*If you enjoyed this post, you will enjoy [Animating Expected Possession Value in the NBA: Part 2](http://insidethetv.rbind.io/post/epv-the-epilogue/)*
10491

10592
<br>
10693

@@ -110,21 +97,16 @@ This section contains static EPV curves with labels from the dataset, such as "P
11097

11198
### Paul Pierce Isolation
11299

113-
![](img/static-228-v5.png){width=550px height=340px}
114-
100+
![](img/static-228-v5.png){width="550px" height="340px"}
115101

116102
### Wide Open 3-point Shot from Dwayne Wade
117103

118-
![](img/static-229.png){width=550px height=340px}
119-
104+
![](img/static-229.png){width="550px" height="340px"}
120105

121106
### Kevin Garnett Shot from the Paint
122107

123-
![](img/static-230.png){width=550px height=340px}
124-
108+
![](img/static-230.png){width="550px" height="340px"}
125109

126110
### Frantic Action leading to Chalmers 3-Pointer
127111

128-
![](img/static-231.png){width=550px height=340px}
129-
130-
112+
![](img/static-231.png){width="550px" height="340px"}

posts/are-teams-getting-lucky-on-rushes/index.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Are Teams getting Lucky on Rushes?"
33
description: 'When you watch an offensive rush in hockey, do you ever wonder about the numbers behind it?'
4-
author: "Howard Baek"
4+
author: "Howard Baik"
55
date: "2018-06-28"
66
categories: [Data Analysis]
77
image: "thumbnail.jpg"

posts/automatic-detection-upwelling/index.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Automatic Detection Method"
33
description: "We introduce a highly effective algorithm for detecting upwelling, the automatic detection method using NOAA satellite image data."
4-
author: [Howard Baek, Elizabeth Eli Holmes]
4+
author: [Howard Baik, Elizabeth Eli Holmes]
55
categories: [Data Analysis]
66
date: "2021-10-26"
77
bibliography: "upwelling.bib"

posts/building-nhl-play-by-play-app/index.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Building the NHL PBP App in Shiny"
3-
author: "Howard Baek"
3+
author: "Howard Baik"
44
date: "2019-02-04"
55
description: "I will walk through a month-long process building the National Hockey League Play-by-Play App from scratch, giving a behind-the-scenes look."
66
categories: [Data Visualization]

posts/demo-nhl-play-by-play-app/index.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Demo of NHL Play-by-Play App"
3-
author: "Howard Baek"
3+
author: "Howard Baik"
44
date: "2019-08-20"
55
description: "I will be showing *insights from looking at a regular season game between the Montreal Canadiens and the Toronto Maple Leafs* on October 3rd, 2018"
66
categories: [Data Visualization]

posts/difference-regular-season-playoffs-extended/index.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Quantifying Differences between the Regular Season and Playoffs Extended"
3-
author: "Howard Baek"
3+
author: "Howard Baik"
44
date: "2019-01-28"
55
description: "A brief analysis to answer a question by Tom Tango on my article, Quantifying Differences between the Regular Season and the Playoffs"
66
categories: [Data Analysis]

posts/difference-regular-season-playoffs/index.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Quantifying Differences between the Regular Season and Playoffs using Survival Analysis"
3-
author: "Howard Baek"
3+
author: "Howard Baik"
44
date: "2019-01-07"
55
description: "From a casual fan perspective, the intensity traditionally ramps up in the playoffs because teams are closer to the grand prize, the Stanley Cup."
66
categories: [Data Analysis]

posts/learn-phewas/.DS_Store

6 KB
Binary file not shown.

posts/learn-phewas/btq126f2.jpg

150 KB
Loading

posts/learn-phewas/figure-1.jpg

468 KB
Loading

posts/learn-phewas/four-snps.jpg

150 KB
Loading

0 commit comments

Comments
 (0)