Category Archives: TidyX Screen Cast

TidyX 40: plotly & APIs

This week, Ellis Hughes and I delve a bit more into the functionality of {plotly}. We start by discussion a really cool, interactive, sunburst plot that Jackie Torres created to display the BBC’s top 100 women of 2020 (data provided by the TidyTuesday Project).

After going through Jackie’s code we talk briefly about APIs as we scrape some data from Ellis then takes that data and creates our own {ploty} graphic where you can select any batter and get a totally interactive figure of all of the pitches he faced and details about the pitch (speed, outcome, etc.).


To watch the screen cast, CLICK HERE.

To access our code, CLICK HERE.


TidyX 39: Missing Values

This week, Ellis Hughes and I jump into the mailbag to answer a question that Eric Fletcher had regarding dealing with missing values. We talk about a few simple ways to impute missing values using an old NFL Combine data set (NOTE: there is a bunch of web scrapping code included in this episode, as well).

As an aside, I did write a shorter blog article about dealing with NA, NaN, and INF in an older R Tips & Tricks” blog post.

To watch the screen cast, CLICK HERE.

To access our code, CLICK HERE.

TidyX 38: Polar Plots & Data Viz for Information Transfer vs Art

This week, Ellis Hughes submitted the Washington State hiking trail data that we used in TidyX 35 to the TidyTuesday Project.  We were excited to see all of the great visualizations that people shared on Twitter, making it really hard to chose whose code to discuss.

The polar plot that Tobias Stalder created was really clean looking and also seemed to be very popular, with over 200 “likes” and some good discussion about it. With that much excitement, we felt like it was the hands down favorite to discuss! We follow our code review with a short philosophical discussion about the difference between data visualization for information transfer versus data visualization as art, as this was a topic of discussion in response to Tobias’ Tweet of his plot.

To watch out screen cast, CLICK HERE.

To access our code, CLICK HERE.

TidyX 37: Parsing JSON & Code Review

This week, Ellis Hughes and I deviate from our typical format and instead work on some code that Ben Baldwin shared with us. Ben is an analyst would does a lot of public facing NFL analysis, writes for The Athletic, and is co-creator of  nflfastR, an R package for NFL play-by-play data.

Ben had some code that he shared on twitter where he was parsing an NFL play-by-play data from the data provider Sportradar. As he shared the code he lamented about it being a bit messy. We all have code that we wrote at one time that looks messy to us! Thus, we asked Ben if we could take the code and attempt to build a function that could process these files for any number of games.

We tackle this one totally live, having not looked at or discussed the code prior to hitting “record”. So, you get to watch us make mistakes and fumble around and learn along with us as we try to understand the data format and work up a solution in about an hour.

To watch the screen cast, CLICK HERE.

For our code, CLICK HERE.