Richer Knowledgebase Access

Pokémon Power

The Wolfram Knowledgebase contains information on popular culture icons as well as scientific knowledge. Here, various physical characteristics (attack and defense points, weight, color) of the Pokémon menagerie are explored, contrasted, and visualized using the built-in entity framework.

Plot the distributions of attack and defense points in all Pokémon.

In[1]:=
Click for copyable input
PairedHistogram[EntityValue["Pokemon", "Attack"], EntityValue["Pokemon", "Defense"], ChartLabels -> {"attack", "defense"}, ChartStyle -> {{LightOrange, LightBlue}, None}]
Out[1]=

Create a Dataset of attack vs. defense points for Generation VI Pokémon and plot them against each other.

In[2]:=
Click for copyable input
stat = EntityValue[Entity[ "Pokemon", { "Generation" -> Entity[ "PokemonGeneration", "GenerationVI"]}], {"Attack", "Defense"}, "Dataset"];
In[3]:=
Click for copyable input
ListPlot[stat, PlotStyle -> Directive[Opacity[0.5], Orange, PointSize[Medium]], AxesLabel -> Automatic, LabelingFunction -> None]
Out[3]=

Compare and plot the average weights of Pokémon over different generations.

In[4]:=
Click for copyable input
wg = Normal[ GroupBy[Rule @@@ EntityValue["Pokemon", {"Generation", "Weight"}], First -> Last, Mean]]
Out[4]=
In[5]:=
Click for copyable input
BarChart3D[wg[[All, 2]], ChartLegends -> wg[[All, 1]], ChartStyle -> 24]
Out[5]=

Use an implicitly defined entity class to find the three heaviest Pokémon.

In[6]:=
Click for copyable input
EntityList[EntityClass["Pokemon", {"Weight" -> TakeLargest[3]}]]
Out[6]=
In[7]:=
Click for copyable input
EntityList[EntityClass["Pokemon", {"Weight" -> TakeLargest[3]}]]; EntityValue[%, "Generation"]
Out[7]=

Use an implicitly defined entity class to find the yellow Pokémon weighing between 50 and 100 kg.

In[8]:=
Click for copyable input
yellowMidweights = EntityList[ Entity["Pokemon", {"PokedexColor" -> "Yellow", "Weight" -> Between[{ Quantity[50, "Kilograms"], Quantity[100, "Kilograms"]}]}]]
Out[8]=

Create a collage of these Pokémon characters with sizes based on their weights.

In[9]:=
Click for copyable input
ImageCollage[ Rule @@@ EntityValue[yellowMidweights, {"Weight", "Image"}], Background -> White]
Out[9]=

Compare colors of Pokémon in original (Generation I) and newest (Generation VI) groups.

show complete Wolfram Language input
In[10]:=
Click for copyable input
{color1, color6} = Sort[Tally[EntityValue[EntityList[ Entity["Pokemon", {"Generation" -> Entity["PokemonGeneration", #]}]], "PokedexColor"]]] & /@ {"GenerationI", "GenerationVI"};
In[11]:=
Click for copyable input
PieChart3D[{color1[[All, 2]], color6[[All, 2]]}, PlotLabel -> "Gen. I (outer) vs. Gen. VI (inner)", ChartElementFunction -> "ProfileSector3D", SectorOrigin -> {Automatic, 1}, ChartStyle -> (color1[[All, 1]] /. co_Entity :> Symbol[co[[2]]]), ChartLegends -> color1[[All, 1]]]
Out[11]=

Related Examples

de es fr ja ko pt-br ru zh