Do you know which generation of Pokémon is the strongest?

Do you know which generation of Pokémon is the strongest?

Preface

Time flies, and the years go by. Pokémon has accompanied most of our childhoods born in the 90s. The editor also prefers Pokémon. Until now, the eighth generation has made us a variety of Pokémon. Feast your eyes.

The editor found a Pokémon data set, which contains data from the first to seventh generations of Pokémon. The data comes from kaggle. The author who published this data crawled the data from this website. This website is equivalent to A wiki of Pokémon contains some game values, and all updated version data exist here:

https://serebii.net/

As a member of Pokémon, can you answer the following questions accurately:

  1. What is the gender ratio of Pokémon?
  2. Pokémon body size distribution?
  3. The number of Pokémon in each generation?
  4. The level of each generation of Pokémon, which generation is the strongest and which is the weakest?
  5. How are Pokémon's attributes distributed?
  6. .What abilities are endowed with Pokémon?
  7. What is the number of Pokémon Legends?
  8. Can you recognize the legendary Pokémon?

Speaking of data, then we will answer the above questions from the perspective of data.

the data shows

The data contains a total of 801 Pokémon data from the first generation to the seventh generation, with 41 columns.

There is a small editor's documentation on the meaning of these columns, and here is also an explanation, which are the main columns:

name: the English name of the Pokemon

japanese_name: the original Japanese name of the Pokémon

pokedex_number: The item number of the Pokemon in the country Pokemon

percent_male: is the percentage of male species. If the Pokemon has no gender, it is blank.

type1: The main type of Pokemon

type2: The secondary type of Pokemon

classification: The classification of Pokemon described by Sun Moon Pokemon

height_m: The height of the Pokemon, in meters

weight_kg: The weight of the Pokemon in kilograms

capture_rate: Pokemon’s capture rate

baseeggsteps: The number of steps required to hatch a Pokémon’s egg

abilities: A stringified list of abilities that Pokemon can have

experience_growth: Pokemon’s experience growth

base_happiness: The basic happiness of Pokémon

against_?: Eighteen characteristics, representing the loss caused by a specific type of attack

hp: Pokemon’s base HP

attack: Pokemon’s basic attack

defense: Pokemon’s basic defense

sp_attack: Basic special attacks of Pokemon

sp_defense: Pokemon’s basic special defense

speed: the basic speed of the Pokemon

generation: The numbered generation that Pokemon first introduced

is_legendary: Indicates whether the Pokemon is legendary.

Import the data in:

Pokémon gender

The editor also thought that the proportion of males would be more than that of females. Males accounted for about 60%-70%, but after calculations, I found that they did not account for that much.

percentage_male This field is the percentage of male species. After checking the data, the average proportion of males is 55%, and the proportion of females is 45%.

Draw a doughnut chart to view the proportions:

It can be seen that there are indeed more male Pokémon, but not much more, it can be said to be more balanced.

Pokémon size

Is Pokémon's height and weight correlated? That is to say, the heavier the weight, the higher the height. Let's draw a scatter chart to check it out:

We can see that within the range of height less than 3m and weight less than 400kg, height and weight are positively correlated, and they have a certain influence on each other. The higher the height, the heavier the weight.

In terms of body size, we are divided into small size (height ≤ 1m), medium size (1m <height ≤ 2m), and large size (height> 2m). How much do they account for each?

The editor’s guess is that there are more small and medium-sized ones, and the least large ones. Isn’t that the case? Let’s take a look together~

Let's group heights first, and then draw a pie chart:

In fact, as we expected, the small ones are like Pikachu, the medium-sized fire-breathing dragons must be familiar to everyone, the large ancient Guraton, the rift seat and so on.

When comparing the height and body shape, the editor specially found a video to view the height of each Pokémon, link:

https://www.bilibili.com/video/BV1iE411N7ua/?spm_id_from=333.788.videocard.2

Number of generations

There are so many generations of Pokémon, and all kinds of Pokémon are emerging in an endless stream. How many Pokémon will be involved in each generation from the first generation to the seventh generation?

We calculate by grouping by generation and draw a line chart:

Oh, it can be seen that the number trend from the first generation to the seventh generation is wavy, and the number of generations is more than the generation is changed, but the sixth generation suddenly decreases. It may be that the previous design is enough, haha, of course Those who are interested can dig deeper.

Generational level

After so many generations, maybe everyone is more concerned about the strongest generation in that generation? The weakest of that generation? What is the level of each generation?

Generally speaking, six indicators of HP, attack, defense, special attack, special defense, and speed can determine the strength of a Pokémon:

We group by each generation, calculate the average of these six indicators, and draw a radar chart for comparison:

The editor previously thought that the level of each generation is quite different, but now the level of the second generation is weaker. Except for the special defense and the average HP, the others are the lowest level;

The seventh generation is top-notch except for its lack of speed. It seems that the seventh generation is still relatively strong;

The most balanced is the fourth generation, all items are relatively average, and there is no "partial subject" situation.

Attribute distribution

So many Pokémon, what attributes do you have the most? What about the distribution of each attribute? Which attribute has the least number?

We draw bar graphs by grouping calculations:

It seems that Pokémon has the most water attributes and the least ice attributes. Water attributes seem to be the most popular attribute. When choosing Pokémon, it is a good choice to choose public water attributes. .

Pokémon Ability

With so many Pokémon, everyone must be wondering what abilities are given to Pokémon, and I am also curious about what abilities are bestowed on Pokémon.

Let's draw a word cloud to check it out:

chlorophyll (chlorophyll), the ability of plants;

sturdy (sturdy), that is, the skin is thick and thick;

keen (keen), ability in speed and flexibility

Swim (swimming), the ability to be water-based, and at the same time, once again verified that the number of Pokémon with the water attribute is the largest;

There are other attributes, so I won’t explain them one by one, just look at the pictures (mainly in English╮(╯▽╰)╭)

Number of legends

How many of the legendary Pokémon have been released?

Let's just draw a picture to tell everyone:

Classifier

Now that we know the number of legendary Pokémon, can we build a classifier to identify them?

The editor selected some columns and used logistic regression to perform two classifications, as follows:

The recognition accuracy has reached more than 90%, so next time there is a new Pokémon, we can use this model to judge~

Reference: https://cloud.tencent.com/developer/article/1653351 Do you know which generation of Pokémon is the strongest? -Cloud + Community-Tencent Cloud