The objective of this blogpost is to find out if the dragon pokemon types are stronger than the flying ones.
library(tidyverse)
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ──
## ✓ ggplot2 3.3.5 ✓ purrr 0.3.4
## ✓ tibble 3.1.4 ✓ dplyr 1.0.7
## ✓ tidyr 1.1.3 ✓ stringr 1.4.0
## ✓ readr 2.0.2 ✓ forcats 0.5.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
##install.packages("janitor")
library(janitor)
##
## Attaching package: 'janitor'
## The following objects are masked from 'package:stats':
##
## chisq.test, fisher.test
df <- read.csv("pokemon_data_science.csv") %>%
clean_names()
#View(df)
dragon_v_flying <- df %>%
filter(type_1 == "Dragon" | type_1 == "Flying")
ggplot(dragon_v_flying) +
geom_density(aes(x = total, color = type_1)) +
labs(title = "Flying type Pokemons outperform dragon ones", x = "Total Stats") +
theme_bw() +
theme(plot.title = element_text(hjust=0.5))
According to the chart above, most of the flying pokemons are located towards the right end of the chart as compared to the dragon ones which are quite spread out. My theory about choosing a pokemon a high median and low average was right. This can be observed as the reasoning behind the flying pokemons’ lower average lies in the very few ones who are so weak. Above all, flying pokemons are stronger than dragon pokemons.