{"id":1930,"date":"2020-12-16T14:50:38","date_gmt":"2020-12-16T14:50:38","guid":{"rendered":"http:\/\/optimumsportsperformance.com\/blog\/?p=1930"},"modified":"2020-12-16T14:50:38","modified_gmt":"2020-12-16T14:50:38","slug":"tidyx-40-plotly-apis","status":"publish","type":"post","link":"https:\/\/optimumsportsperformance.com\/blog\/tidyx-40-plotly-apis\/","title":{"rendered":"TidyX 40: plotly &#038; APIs"},"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 delve a bit more into the functionality of {plotly}. We start by discussion a really cool, interactive, sunburst plot that <strong><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/twitter.com\/JackiePsych\/status\/1336892422995886080\">Jackie Torres<\/a><\/span><\/strong> created to display the BBC&#8217;s top 100 women of 2020 (data provided by the <strong><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/github.com\/rfordatascience\/tidytuesday\/blob\/master\/data\/2020\/2020-10-06\/readme.md\">TidyTuesday Project<\/a><\/span><\/strong>).<\/p>\n<p>After going through Jackie&#8217;s code we talk briefly about APIs as we scrape some data from <strong><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/baseballsavant.mlb.com\/\">baseballsavant.mlb.com<\/a><\/span><\/strong>. Ellis then takes that data and creates our own {ploty} graphic where you can select any batter and get a totally interactive figure of all of the pitches he faced and details about the pitch (speed, outcome, etc.).<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/optimumsportsperformance.com\/blog\/wp-content\/uploads\/2020\/12\/Screen-Shot-2020-12-16-at-6.45.57-AM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1931\" src=\"https:\/\/optimumsportsperformance.com\/blog\/wp-content\/uploads\/2020\/12\/Screen-Shot-2020-12-16-at-6.45.57-AM.png\" alt=\"\" width=\"978\" height=\"800\" srcset=\"https:\/\/optimumsportsperformance.com\/blog\/wp-content\/uploads\/2020\/12\/Screen-Shot-2020-12-16-at-6.45.57-AM.png 978w, https:\/\/optimumsportsperformance.com\/blog\/wp-content\/uploads\/2020\/12\/Screen-Shot-2020-12-16-at-6.45.57-AM-300x245.png 300w, https:\/\/optimumsportsperformance.com\/blog\/wp-content\/uploads\/2020\/12\/Screen-Shot-2020-12-16-at-6.45.57-AM-768x628.png 768w, https:\/\/optimumsportsperformance.com\/blog\/wp-content\/uploads\/2020\/12\/Screen-Shot-2020-12-16-at-6.45.57-AM-624x510.png 624w\" sizes=\"auto, (max-width: 978px) 100vw, 978px\" \/><\/a><\/p>\n<p>To watch the screen cast, <strong><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/www.youtube.com\/watch?v=mqBJwdAVLIg\">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\/040-Plotly_and_APIs\">CLICK HERE<\/a><\/span><\/strong>.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This week, Ellis Hughes and I delve a bit more into the functionality of {plotly}. We start by discussion a really cool, interactive, sunburst plot that Jackie Torres created to display the BBC&#8217;s top 100 women of 2020 (data provided by the TidyTuesday Project). After going through Jackie&#8217;s code we talk briefly about APIs as [&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-1930","post","type-post","status-publish","format-standard","hentry","category-tidyx-screen-cast"],"_links":{"self":[{"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/posts\/1930","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=1930"}],"version-history":[{"count":1,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/posts\/1930\/revisions"}],"predecessor-version":[{"id":1932,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/posts\/1930\/revisions\/1932"}],"wp:attachment":[{"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/media?parent=1930"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/categories?post=1930"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/tags?post=1930"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}