AE 11: Midterm Pokémon Practice

In this AE, you’ll work through some variety of tasks to prepare for the midterm while learning about the Pokémon universe!

pokemon <- read_csv("data/pokemon.csv")
Rows: 924 Columns: 17
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr  (3): name, type_1, type_2
dbl (13): generation, height_m, weight_kg, total_points, hp, attack, defense...
lgl  (1): is_legendary

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
pokemon_go <- read_csv("data/pokemon_go.csv")
Rows: 1007 Columns: 24
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr  (5): pokemon_name, type, rarity, charged_moves, fast_moves
dbl (13): pokemon_id, base_attack, base_defense, base_stamina, candy_require...
lgl  (6): found_egg, found_evolution, found_wild, found_research, found_raid...

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

Question 1

Take a look at the data with an appropriate function. Report the number of rows and colmns in each one. Note that each row refers to a single Pokémon.

Question 2

Using the first data set, create a density plot of all water type’s hp. Note that a Pokémon is considered a water type if either its type_1 or type_2 is water. Describe the distribution with appropriate summary statistics.

Question 3

Create a table that displays the number of legendary Pokémon (is_legendary) from each (type_1) in descending order.

Question 4

Using the table above, make a barplot with n on the x-axis, but make sure that the order of the types in the first column is preserved

Question 5

Pokémon and Pokémon Go are actually very different games. You want to investigate if there is any relationship between the attack variable in Pokémon and the base_attack in Pokémon Go. The variables lie in different datasets however.

In a single pipeline, create a scatterplot that visualizes the relationship above. Only include Pokémon who are present in both games. Describe the distribution