Import data
# excel file
data <- read_excel("data/myData.xlsx")
data
## # A tibble: 949 × 23
## Column1 id pokemon species_id height weight base_experience type_1 type_2
## <dbl> <dbl> <chr> <dbl> <dbl> <dbl> <dbl> <chr> <chr>
## 1 1 1 bulbasa… 1 0.7 6.9 64 grass poison
## 2 2 2 ivysaur 2 1 13 142 grass poison
## 3 3 3 venusaur 3 2 100 236 grass poison
## 4 4 4 charman… 4 0.6 8.5 62 fire NA
## 5 5 5 charmel… 5 1.1 19 142 fire NA
## 6 6 6 chariza… 6 1.7 90.5 240 fire flying
## 7 7 7 squirtle 7 0.5 9 63 water NA
## 8 8 8 wartort… 8 1 22.5 142 water NA
## 9 9 9 blastoi… 9 1.6 85.5 239 water NA
## 10 10 10 caterpie 10 0.3 2.9 39 bug NA
## # ℹ 939 more rows
## # ℹ 14 more variables: hp <dbl>, attack <dbl>, defense <dbl>,
## # special_attack <dbl>, special_defense <dbl>, speed <dbl>, color_1 <chr>,
## # color_2 <chr>, color_f <chr>, egg_group_1 <chr>, egg_group_2 <chr>,
## # url_icon <chr>, generation_id <dbl>, url_image <chr>
Secondary Types
data %>%
ggplot(aes(type_2)) +
geom_bar()+
theme(axis.text.x=element_text(angle=45,hjust=1))
