{"id":1916,"date":"2020-11-22T21:29:42","date_gmt":"2020-11-22T21:29:42","guid":{"rendered":"http:\/\/optimumsportsperformance.com\/blog\/?p=1916"},"modified":"2020-11-23T13:54:46","modified_gmt":"2020-11-23T13:54:46","slug":"tidyx-37-parsing-json-code-review","status":"publish","type":"post","link":"https:\/\/optimumsportsperformance.com\/blog\/tidyx-37-parsing-json-code-review\/","title":{"rendered":"TidyX 37: Parsing JSON &#038; Code Review"},"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 deviate from our typical format and instead work on some code that <span style=\"color: #0000ff;\"><strong><a style=\"color: #0000ff;\" href=\"https:\/\/twitter.com\/benbbaldwin\">Ben Baldwin<\/a><\/strong><\/span> shared with us. Ben is an analyst would does a lot of public facing NFL analysis, writes for <strong><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/theathletic.com\/author\/ben-baldwin\/\">The Athletic<\/a><\/span><\/strong>, and is co-creator of\u00a0<strong><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/github.com\/mrcaseb\/nflfastR\"> nflfastR<\/a><\/span><\/strong>, an R package for NFL play-by-play data.<\/p>\n<p><span style=\"color: #0000ff;\"><strong><a style=\"color: #0000ff;\" href=\"https:\/\/twitter.com\/benbbaldwin\/status\/1327407031024824322\">Ben had some code that he shared on twitter<\/a><\/strong><\/span> where he was parsing an NFL play-by-play data from the data provider <strong><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/www.sportradar.com\/choose_region\/\">Sportradar<\/a><\/span><\/strong>. 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.<\/p>\n<p>We tackle this one totally live, having not looked at or discussed the code prior to hitting &#8220;record&#8221;. 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.<\/p>\n<p>To watch the screen cast, <span style=\"color: #0000ff;\"><strong><a style=\"color: #0000ff;\" href=\"https:\/\/www.youtube.com\/watch?v=FyopRMDDQL4&amp;feature=youtu.be\">CLICK HERE<\/a><\/strong><\/span>.<\/p>\n<p>For our code, <strong><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/github.com\/thebioengineer\/TidyX\/tree\/master\/TidyTuesday_Explained\/037-Code_Review\">CLICK HERE<\/a><\/span><\/strong>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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\u00a0 nflfastR, an R package for NFL play-by-play data. Ben had some [&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-1916","post","type-post","status-publish","format-standard","hentry","category-tidyx-screen-cast"],"_links":{"self":[{"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/posts\/1916","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=1916"}],"version-history":[{"count":3,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/posts\/1916\/revisions"}],"predecessor-version":[{"id":1919,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/posts\/1916\/revisions\/1919"}],"wp:attachment":[{"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/media?parent=1916"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/categories?post=1916"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/tags?post=1916"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}