TidyX 128: Advent of Code Day 1 – Tricks with setting indexes

This week, Ellis Hughes and I go over Advent of Code Day 1. For those that don’t know, Advent of Code is a fun thing to do around the holidays. The producer creates a new computer science type problem to solve each day and you can solve it in whatever computer language you would like.

We decided to tackle the first day of Advent of Code, where you were provided a bunch of data that required you to create summary statistics. The catch is that the data didn’t have any indexes to it. It was simply a text file with spaces that indicated where one group of observations end and another group of observations begin. To handle this, Ellis and I show two different options for how to identify indexes for the groups of unique observations and build a usable data frame for answering the problem statement.

To watch our screen cast, CLICK HERE.

To access our code, CLICK HERE.