{"id":1948,"date":"2021-01-11T16:26:17","date_gmt":"2021-01-11T16:26:17","guid":{"rendered":"http:\/\/optimumsportsperformance.com\/blog\/?p=1948"},"modified":"2021-01-11T16:26:48","modified_gmt":"2021-01-11T16:26:48","slug":"tidyx-44-plotly-maps-nba-travel","status":"publish","type":"post","link":"https:\/\/optimumsportsperformance.com\/blog\/tidyx-44-plotly-maps-nba-travel\/","title":{"rendered":"TidyX 44: plotly, maps, &#038; NBA travel"},"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 discuss building maps in {plotly}.<\/p>\n<p>First, we go through the code of <span style=\"color: #0000ff;\"><strong><a style=\"color: #0000ff;\" href=\"https:\/\/twitter.com\/MartinDevaux\/status\/1346820062766776320\">Martin Devaux<\/a><\/strong><\/span>, who made a cool looking plot showing the evolution of public transit expansion costs around the world (data courtesy of <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>). The plot was really interesting and actually threw us for a loop as we initially thought we were looking at a true map! It wasn&#8217;t until we got into the code that we realized what was going on and that it wasn&#8217;t an actual map at all.<\/p>\n<p>We then move into {plotly} to build a map of NBA travel. The data comes from the <strong><span style=\"color: #0000ff;\">Jose Fernandez<\/span><\/strong>, who created a cool R package called {<strong><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/github.com\/josedv82\/airball\">airball<\/a><\/span><\/strong>}.<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/optimumsportsperformance.com\/blog\/wp-content\/uploads\/2021\/01\/Screen-Shot-2021-01-11-at-8.24.46-AM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-1949\" src=\"https:\/\/optimumsportsperformance.com\/blog\/wp-content\/uploads\/2021\/01\/Screen-Shot-2021-01-11-at-8.24.46-AM-1024x729.png\" alt=\"\" width=\"625\" height=\"445\" srcset=\"https:\/\/optimumsportsperformance.com\/blog\/wp-content\/uploads\/2021\/01\/Screen-Shot-2021-01-11-at-8.24.46-AM-1024x729.png 1024w, https:\/\/optimumsportsperformance.com\/blog\/wp-content\/uploads\/2021\/01\/Screen-Shot-2021-01-11-at-8.24.46-AM-300x213.png 300w, https:\/\/optimumsportsperformance.com\/blog\/wp-content\/uploads\/2021\/01\/Screen-Shot-2021-01-11-at-8.24.46-AM-768x546.png 768w, https:\/\/optimumsportsperformance.com\/blog\/wp-content\/uploads\/2021\/01\/Screen-Shot-2021-01-11-at-8.24.46-AM-624x444.png 624w, https:\/\/optimumsportsperformance.com\/blog\/wp-content\/uploads\/2021\/01\/Screen-Shot-2021-01-11-at-8.24.46-AM.png 1532w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/a><\/p>\n<p>To watch our screen cast, <strong><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/www.youtube.com\/watch?v=yNx0RP4DvtY&amp;feature=youtu.be\">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\/044-Steps_and_Plotly_Maps\">CLICK HERE<\/a><\/span><\/strong>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This week, Ellis Hughes and I discuss building maps in {plotly}. First, we go through the code of Martin Devaux, who made a cool looking plot showing the evolution of public transit expansion costs around the world (data courtesy of TidyTuesday Project). The plot was really interesting and actually threw us for a loop 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-1948","post","type-post","status-publish","format-standard","hentry","category-tidyx-screen-cast"],"_links":{"self":[{"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/posts\/1948","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=1948"}],"version-history":[{"count":2,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/posts\/1948\/revisions"}],"predecessor-version":[{"id":1951,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/posts\/1948\/revisions\/1951"}],"wp:attachment":[{"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/media?parent=1948"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/categories?post=1948"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/tags?post=1948"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}