<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/be-a-bigballr-in-rstats-stayeth-or-switcheth/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://feedproxy.google.com/~r/RstatsMikeJackTzen/~3/Jedz3R9m370/"> rstats – MikeJackTzen</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>If you’re a Big Baller, you know when to stayeth in your lane but also when to switcheth lanes.</p>
<p>
<blockquote lang="en" class="twitter-tweet" data-in-reply-to="932312789917491200">
<p>@<a rel="nofollow" href="https://twitter.com/LangstonKerman" target="_blank">LangstonKerman</a> four score and seven years ago our fathers brought forth on this continent, a new lane to stayeth in</p>
<p>— <br>MikeJackTzen (@MKJCKTZN) <a rel="nofollow" data-datetime="2017-11-19T19:02:29+00:00" href="http://twitter.com/#!/MKJCKTZN/status/932323209738829824" target="_blank">November 19, 2017</a></p></blockquote>
<div></div>
<p>The Big Baller Brand brothers just inked a deal to play professional basketball in Europe. They switched into a different lane to achieve their original goal.</p>
<p>
<blockquote lang="en" class="twitter-tweet">
<p>It's not about the money for the Ball Brothers. They have a passion to play Basketball and to experience playing as… <a rel="nofollow" href="https://twitter.com/i/web/status/940386315102593024" target="_blank"> twitter.com/i/web/status/9…</a></p>
<p>— <br>Big Baller Brand (@bigballerbrand) <a rel="nofollow" data-datetime="2017-12-12T01:02:23+00:00" href="http://twitter.com/#!/bigballerbrand/status/940386315102593024" target="_blank">December 12, 2017</a></p></blockquote>
<div></div>
<p>The knee-jerk reaction from the non-globally minded is that this spells doom for any NBA hoop dreams. Not so.</p>
<p>
<blockquote lang="en" class="twitter-tweet">
<p>@<a rel="nofollow" href="https://twitter.com/bigballerbrand" target="_blank">bigballerbrand</a> @<a rel="nofollow" href="https://twitter.com/MELOD1P" target="_blank">MELOD1P</a> @<a rel="nofollow" href="https://twitter.com/LiAngeloBall" target="_blank">LiAngeloBall</a> shoutouts to @<a rel="nofollow" href="https://twitter.com/bigballerbrand" target="_blank">bigballerbrand</a><br>
for pursuing other ways 2 achieve goals.<br>
maybe… <a rel="nofollow" href="https://twitter.com/i/web/status/940392447594524672" target="_blank"> twitter.com/i/web/status/9…</a></p>
<p>— <br>MikeJackTzen (@MKJCKTZN) <a rel="nofollow" data-datetime="2017-12-12T01:26:45+00:00" href="http://twitter.com/#!/MKJCKTZN/status/940392447594524672" target="_blank">December 12, 2017</a></p></blockquote>
<div></div>
<p>Four score and ten years ago, your only shot of making it to the NBA was usually through the NCAA. The NBA has adopted a global perspective. You see professionals from different continental leagues finding a way into the NBA. The 2016 to 2017 diagram is interesting, we’re seeing a darker edge from the NBA to the G-League. The NBA Players Association worked hard on installing ‘2 way contracts’ letting NBA players play in (and get paid in) both the NBA and the G-League, this was a great move, a no-brainer.</p>
<p><em><strong>Options are great, but keep in mind that the NBA is the crème de la crème. You see the lightest edges enter the NBA node while you see many dark edges enter the ‘none’ node.</strong></em></p>
<p>When I started making the above network plot of basketball league to league migrations, I looked into off the shelf R packages. There’s a fragmented handfull of R <a rel="nofollow" href="https://cran.r-project.org/web/packages/ggCompNet/vignettes/examples-from-paper.html" target="_blank">packages </a>to do this. Kicker, none of them do directed edges the way I wanted.</p>
<p>If you’re an #rstats user and want to adopt the BigBallR philosophy, find multiple ways to achieve your goal.</p>
<p>I went back to the basics and hand rolled my own network plot with vanilla <code>ggplot2</code>. At the end of the day, a network plot needs two things, nodes and edges, eg points (stored in <code>dat_nodes</code>) and lines (stored in <code>dat_edges</code>). Once you have your data in that format, you can make the network migration plot above, with the code snippet below</p>
<pre>
ggplot(data=dat_nodes,aes(X1,X2))+
 geom_point(aes(size=10,label=league),show.legend = FALSE) +
 geom_curve(data=dat_edges,
 arrow=arrow(angle=30,length = unit(0.2, &quot;inches&quot;)),
 alpha=0.03,
 aes(x=X1_send,y = X2_send,
 xend = X1_rec,yend = X2_rec)
 )
</pre>
<p>I hand-rolled the network diagram cuz the other packages didn’t have the custom features I needed. In my hand-rolled plot there is still one thing missing. I want to place the ‘arrow head’ along some other part of the curve (say the mid-point), other than the end-point. This is probably hard to do, since arrow() looks like it just needs the receiving coordinate and plops the arrow head there. For what I want, ggplot2 needs to know the desired placement-coordinates output from geom_curve(). So somehow, the internal curve calculations need to be returned in order to pass into arrow().</p>
<p> </p>
<p> <a rel="nofollow" href="https://feeds.wordpress.com/1.0/gocomments/mikejacktzen.wordpress.com/894/" target="_blank"><img border="0" alt="" src="https://feeds.wordpress.com/1.0/comments/mikejacktzen.wordpress.com/894/"></a> <img border="0" alt="" src="https://i1.wp.com/pixel.wp.com/b.gif?resize=1%2C1&ssl=1" data-recalc-dims="1"><img width="1" alt="" src="http://feeds.feedburner.com/~r/RstatsMikeJackTzen/~4/Jedz3R9m370" height="1"></p>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://feedproxy.google.com/~r/RstatsMikeJackTzen/~3/Jedz3R9m370/"> rstats – MikeJackTzen</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img width="1" alt="" src="http://feeds.feedburner.com/~r/RBloggers/~4/CbOyLlyQg-I" height="1"></a></div>