{"id":2051,"date":"2021-07-05T14:55:05","date_gmt":"2021-07-05T14:55:05","guid":{"rendered":"http:\/\/optimumsportsperformance.com\/blog\/?p=2051"},"modified":"2021-07-05T14:55:05","modified_gmt":"2021-07-05T14:55:05","slug":"tidyx-66-cleaning-ugly-excel-data-part-3","status":"publish","type":"post","link":"https:\/\/optimumsportsperformance.com\/blog\/tidyx-66-cleaning-ugly-excel-data-part-3\/","title":{"rendered":"TidyX 66: Cleaning ugly excel data, Part 3"},"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 finish cleaning our ugly excel data. In parts 1 and 2 we concentrated on:<\/p>\n<ul>\n<li>Bringing the data into R<\/li>\n<li>Reading multiple excel tabs<\/li>\n<li>Cleaning up merged columns<\/li>\n<li>Transforming the data into a long format<\/li>\n<li>Dealing with the structure of an excel sheet were pieces of information are contained in different areas on the sheet<\/li>\n<li>Organizing the data into a logical data frame for analysis<\/li>\n<li>Writing a function to automate all of the above processes across all excel tabs<\/li>\n<\/ul>\n<p>This week, handle the last portion of our ugly excel data &#8212; dealing with dates and the training duration column.<\/p>\n<ul>\n<li>Dates can be tricky and, if you recall from previous episodes, R read them in as excel numeric values. So we discuss how to turn the numeric values into actual date values by understanding the <em>origin <\/em>argument within the <strong>as.Date()<\/strong> function.<\/li>\n<li>The training duration column in our ugly data file had various different values recorded in it (1:05, :30, 45, etc.). So, we have to figure out a way to handle this character string and covert it into a numeric value, representing the minutes of training that the individual performed.<\/li>\n<\/ul>\n<p>To watch our screen cast, <strong><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/www.youtube.com\/watch?v=bTbBsAYusTA\">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\/066-Data_Cleaning_Excel_Files_3\">CLICK HERE<\/a><\/span><\/strong>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This week, Ellis Hughes and I finish cleaning our ugly excel data. In parts 1 and 2 we concentrated on: Bringing the data into R Reading multiple excel tabs Cleaning up merged columns Transforming the data into a long format Dealing with the structure of an excel sheet were pieces of information are contained in [&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-2051","post","type-post","status-publish","format-standard","hentry","category-tidyx-screen-cast"],"_links":{"self":[{"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/posts\/2051","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=2051"}],"version-history":[{"count":1,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/posts\/2051\/revisions"}],"predecessor-version":[{"id":2052,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/posts\/2051\/revisions\/2052"}],"wp:attachment":[{"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/media?parent=2051"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/categories?post=2051"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/tags?post=2051"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}