<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="http://www.r-bloggers.com/an-analysis-of-pokemon-go-types-created-with-r/"></div></div><div><a data-url="http://www.r-bloggers.com/an-analysis-of-pokemon-go-types-created-with-r/" data-counturl="http://www.r-bloggers.com/an-analysis-of-pokemon-go-types-created-with-r/" data-count="horizontal" data-text="An analysis of Pokémon Go types, created with R" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://blog.revolutionanalytics.com/2016/07/an-analysis-of-pok%C3%A9mon-go-types-created-with-r.html"> Revolutions</a></strong>, and kindly contributed to <a rel="nofollow" href="http://www.r-bloggers.com/">R-bloggers)</a> </div>
<div>
<p>As anyone who has tried Pokémon Go recently is probably aware, Pokémon come in different types. A Pokémon's type affects where and when it appears, and the types of attacks it is vulnerable to. Some types, like Normal, Water and Grass are common; others, like Fairy and Dragon are rare. Many Pokémon have two or more types.</p>
<p>To get a sense of the distribution of Pokémon types, <a target="_blank" href="http://jkunst.com/r/pokemon-visualize-em-all/">Joshua Kunst used R</a> to download data from the <a target="_blank" href="https://pokeapi.co/">Pokémon API</a> and created a treemap of all the Pokémon types (and for those with more than 1 type, the secondary type). Johnathon's original used the 800+ Pokémon from the modern universe, but I used his <a target="_blank" href="https://github.com/jbkunst/jbkunst.github.io/blob/master/_rposts/2016-03-08-pokemon-visualize-em-all.R">R code</a> to recreate the map for the 151 original Pokémon used in Pokémon Go.</p>
<p><a target="_blank" href="http://revolution-computing.typepad.com/.a/6a010534b1db25970b01b8d20782ba970c-pi"><img title="Pokemon-151" alt="Pokemon-151" src="http://revolution-computing.typepad.com/.a/6a010534b1db25970b01b8d20782ba970c-800wi" border="0"></a></p>
<p>Pokémon have many other attributes as well, including: weight, height, attack and defense ratings, hit points, and speed. It's hard to visualize so many variables in a 2-dimensional cart, so Joshua used a technique called <a target="_blank" href="https://lvdmaaten.github.io/tsne/">t-Distributed Stochastic Neighbor Embedding</a> (implemented in the <a target="_blank" href="https://mran.microsoft.com/package/tsne/">tsne package</a> for R) to cluster similar Pokémon in a two-dimensional chart, and used R's image-handling capbilities to include avatars for each of the Pokémon. </p>
<p><a target="_blank" href="http://jkunst.com/r/pokemon-visualize-em-all/"><img title="TSE-pokemon" alt="TSE-pokemon" src="http://revolution-computing.typepad.com/.a/6a010534b1db25970b01b8d2078378970c-800wi" border="0"></a></p>
<p>This chart, which includes modern Pokémon along with the 151 originals in Pokémon Go, is colored according to each Pokémon's primary type. As you can see, the TSNE algorithm is super effective at clustering Pokémon according to type.</p>
<p>For more details on Joshua's analysis, including interactive versions of these charts and the R code that created them, follow the link below.</p>
<p>Joshua Kunst: <a target="_blank" href="http://jkunst.com/r/pokemon-visualize-em-all/">Pokémon: Visualize 'em all!</a> (<a target="_blank" href="https://twitter.com/MattBashton/status/755749710430863360">via</a> Matthew Bashton)</p>
</div>
<p><div><div><div><div data-width="55" data-show-faces="false" data-send="true" data-layout="box_count" data-height="62" data-href="http://www.r-bloggers.com/an-analysis-of-pokemon-go-types-created-with-r/"></div></div><div><a data-url="http://www.r-bloggers.com/an-analysis-of-pokemon-go-types-created-with-r/" data-counturl="http://www.r-bloggers.com/an-analysis-of-pokemon-go-types-created-with-r/" data-count="vertical" data-text="An analysis of Pokémon Go types, created with R" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://blog.revolutionanalytics.com/2016/07/an-analysis-of-pok%C3%A9mon-go-types-created-with-r.html"> Revolutions</a></strong>.</div>
<hr>
<a rel="nofollow" href="http://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="http://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a title="The R Project for Statistical Computing" rel="nofollow" href="http://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="http://www.r-bloggers.com/?s=data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="http://www.r-bloggers.com/?s=Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="http://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="http://www.r-bloggers.com/?s=map">maps</a>, <a title="Animation in R" rel="nofollow" href="http://www.r-bloggers.com/?s=animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="http://www.r-bloggers.com/?s=RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="http://www.r-bloggers.com/?s=sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="http://www.r-bloggers.com/?s=LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="http://www.r-bloggers.com/?s=SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="http://www.r-bloggers.com/?s=eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="http://www.r-bloggers.com/?s=git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="http://www.r-bloggers.com/?s=hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="http://www.r-bloggers.com/?s=Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="http://www.r-bloggers.com/?s=PCA">PCA</a>, <a title="Time series" rel="nofollow" href="http://www.r-bloggers.com/?s=time+series">time series</a>, <a title="finance trading" rel="nofollow" href="http://www.r-bloggers.com/?s=trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/0nM6y3Q7BCk"></a></div>