Publications by R | JLaw's R Blog

What’s The Best Day to Get Married?

30.09.2020

TL;DR There really isn’t a best day to get married as there isn’t much differentiation between various days. Both as part of this analysis and in life. Do what’s best for you and your relationship. However, if ALL you care about is both being married on a Saturday, maximizing the number of times your anniversary will fall on a Saturday, an...

10571 sym R (4837 sym/8 pcs) 10 img 1 tbl

Looking for Media Bias in Coverage of Trump’s COVID Diagnosis

06.10.2020

Within the United States, especially these last few years, there has been an increased focus on “fake news” or “bias in the media”. Fox News typically is the poster-child for right-wing bias and everything else seems to be the poster child for left-wing bias. While this is just a humble R blog (and NOT a political blog) I thought it could...

13586 sym R (6518 sym/11 pcs) 14 img 1 tbl

Sequence Mining My Browsing History with arulesSequences

31.10.2020

Typically when thinking of pattern mining people tend to think of Market Basket Analysis with the conventional example showing people typically buy both Beer and Diapers in the same trip. When order doesn’t matter this is called Association Rules Mining and is implemented by the arules package in R. In this example, the person is buying both di...

15439 sym R (8162 sym/20 pcs) 8 img 5 tbl

An Attempt at Tweaking the Electoral College

15.11.2020

Motivation With the 2020 Election wrapping up and a renewed discussion about the merits of the Electoral College I’ve been thinking more about the system and why it might be the way it is. While I understand the rationale of why doing a complete popular vote would have unintended consequences, I personally feel like the current system has overl...

15169 sym R (9445 sym/16 pcs) 6 img 5 tbl

What’s the most successful Dancing With the Stars “Profession”? Visualizing with {gt}

23.11.2020

Related To leave a comment for the author, please follow the link and comment on their blog: R | JLaw's R Blog. R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job. Want to share your content on R-bloggers? click here ...

399 sym

Exploring NHL Stanley Cup Champion’s Points Percentage In Four GGPlots

30.11.2020

Motivation While browsing Reddit’s r/DataIsBeautiful sub-reddit I came across a post from Fabio Votta showing a beeswarm plot of US County vote share in the 2020 Election. Having never seen a beeswarm plot before I wanted to come up with an excuse to try it out. As an NHL fan, I decided to look at the Points Percentage of NHL Stanley Cup champi...

9632 sym R (8583 sym/8 pcs) 54 img

7 Tricks I Learned During Advent of Code 2020

27.12.2020

I got into the Advent of Code through some co-workers for the first time this year. For those not familiar, its a series of programming puzzles created by Eric Wastl released once a day for the first 25 days of December. The puzzles are programming language agnostic so some use it to learn new a language and others, like myself, just thought it w...

7827 sym R (2439 sym/12 pcs) 4 tbl

Predicting the Winner of Super Bowl LV

06.01.2021

TL;DR Using Pythagorean expectation we should expect the Baltimore Ravens to be Super Bowl Champions Using a Bradley-Terry model we should expect the Kansas City Chiefs to be Super Bowl champions Seems like it will be a good year for the AFC It’s Playoff Time in the NFL!. While my team has unfortunately missed the playoffs, I wanted to take a...

8385 sym R (4418 sym/9 pcs) 4 img 4 tbl

When Did the US Senate Best Reflect the US Population?

31.01.2021

TL;DR While this is the oldest Senate we’ve ever had, its not the most non-representative Senate when compared to the age distribution of the US Population The most representative Senate was in the 1970s as the average Senator age declined while the average age in the US increased. The least representative Senate was in the 1990s as the averag...

9363 sym R (13653 sym/16 pcs) 6 img 1 tbl

Exploring Wednesday Night Cable Ratings with OCR

28.02.2021

One of my guilty pleasure TV shows is MTV’s The Challenge. Debuting in the late 90s, the show pitted alumni from The Real World and Road Rules against each other in a series of physical events. Now on its 36th season, its found new popularity by importing challengers from other Reality Shows, in the US and Internationally, regularly topping Wed...

9903 sym R (9811 sym/12 pcs) 16 img 1 tbl