{"id":2739,"date":"2022-12-19T01:02:17","date_gmt":"2022-12-19T01:02:17","guid":{"rendered":"http:\/\/optimumsportsperformance.com\/blog\/?p=2739"},"modified":"2022-12-19T15:05:52","modified_gmt":"2022-12-19T15:05:52","slug":"tidyx-128-advent-of-code-day-1-tricks-with-setting-indexes","status":"publish","type":"post","link":"https:\/\/optimumsportsperformance.com\/blog\/tidyx-128-advent-of-code-day-1-tricks-with-setting-indexes\/","title":{"rendered":"TidyX 128: Advent of Code Day 1 &#8211; Tricks with setting indexes"},"content":{"rendered":"<p>This week, <strong><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/twitter.com\/ellis_hughes\">Ellis Hughes<\/a><\/span><\/strong> and I go over Advent of Code Day 1. For those that don&#8217;t know, <strong><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/adventofcode.com\/\">Advent of Code <\/a><\/span><\/strong>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.<\/p>\n<p>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&#8217;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.<\/p>\n<p>To watch our screen cast, <strong><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/www.youtube.com\/watch?v=_fANrxbe8rk\">CLICK HERE<\/a><\/span><\/strong>.<\/p>\n<p>To access our code, <strong><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/github.com\/thebioengineer\/TidyX\/tree\/master\/TidyTuesday_Explained\/128-AOC_Day1\">CLICK HERE<\/a><\/span><\/strong>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This week, Ellis Hughes and I go over Advent of Code Day 1. For those that don&#8217;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. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[44],"tags":[],"class_list":["post-2739","post","type-post","status-publish","format-standard","hentry","category-tidyx-screen-cast"],"_links":{"self":[{"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/posts\/2739","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/comments?post=2739"}],"version-history":[{"count":3,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/posts\/2739\/revisions"}],"predecessor-version":[{"id":2742,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/posts\/2739\/revisions\/2742"}],"wp:attachment":[{"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/media?parent=2739"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/categories?post=2739"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/tags?post=2739"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}