R Tutorials
All my tutorials in one place
How To Extract Data From PDFs
Data is not always stored in a convenient format. Sometimes it’s in pdfs.
How To: Get 2-Man Lineup Data
Today’s tutorial is going to walk you through how I obtained the data and created the following table, which shows the effectiveness of each team’s most commonly used Double Big lineup.
How To Make A Baseball Savant Style Chart
The following tutorial was highly requested. By that I mean like three people asked for it. So I’m going to show you how I made these Baseball Savant style charts using some NBA referee data.
How To Make A Hot Spot Shot Chart
Today’s tutorial is going to show you how to make a simplified version of this hot spot shot chart.
How To Use DuckDB to Analyze NBA Data
Howdy everyone. Today’s premium edition of The F5 begins with a data viz showing which teams are making fans stay in their seats the longest. After that I’ve got a tutorial on how to use DuckDB to work with NBA play-by-play data.
How To Make a Beeswarm Logo Plot
A good litmus test for your favorite team is to look at how good they are when their best five is on the court. We can debate who your team’s best five is or we can just look at who their starting five is. In more cases than not, that’s who the team believes is their best five.
How to get NBA play-by-play data with real time stamps
On Wednesday night, the Golden State Warriors defeated the Oklahoma City Thunder. It was a great game that earned the national TV treatment it received from ESPN. Mike Beuoy’s handy preCap tool had it as the most exciting game of the night.
How To: Get Scoring Runs From NBA Play-by-Play Data
Over the past few days I’ve made some updates to my Best of Yesterday web app. Up until this week I was using Game Score as the default method for sorting player performance. I was never satisfied with it though because Game Score is calculated using a series of somewhat arbitrarily selected weights. What I really wanted was something with more heft be…
How To: ESPN MVP Straw Poll Charts
This week’s tutorial is going to focus on recreating the following two charts:
How To Create An Animated Bar Chart In R
Today’s tutorial is going to focus on recreating the animated chart below, which shows the distance and time between each team’s home arena and practice facility.
How To: Comet Plots V2
In the spirit of the holidays I’m making this post free for everyone. Plus, I’ve written a similar tutorial before. That one was free at the time so it only feels fair to make this one free as well. If you like the tutorial or know someone who might, consider subscribing or sharing.
How To: Coaching Profile Tables
Earlier this week I wrote about the characteristics that can typically be found in a Kenny Atkinson coached team. To summarize, they like to play fast and limit opponent three-point attempts.
How To: Consensus Top 100
Before we begin this week’s tutorial for paid subscribers, I’m going to try something different on Fridays. In addition to sharing the code used to generate the visualizations in this newsletter, I’ll be adding some additional content for fun. Could be a table, a chart, a handful stats on their own, or something entirely unique. It could get weird.
How To: Diamond Plots in R
Enough people have asked for it that I’ve finally decided to write up a tutorial on how to create Diamond Plots in R. Not only do I think Diamond Plots look cool, but I think they are functionally useful once you’re used to looking at them.
How to: Ridgeline Shot Charts
Quick one for y’all today because the newsletter this week was fairly light on charts. We’re going to go over how I created the shot chart in the style of the Unknown Pleasures album cover.
How To: MVP Scatter Plots And Tables
Thanks for signing up for a premium subscription to The F5. I’ve gotta be honest, there’s more of you than I expected!