load("C:/Users/manue/Base_de_dados-master/df_pokemon.RData")
View(df)
names(df)
## [1] "id" "pokemon" "species_id" "height"
## [5] "weight" "base_experience" "type_1" "type_2"
## [9] "attack" "defense" "hp" "special_attack"
## [13] "special_defense" "speed" "color_1" "color_2"
## [17] "color_f" "egg_group_1" "egg_group_2" "url_image"
## [21] "x" "y"
var(df$height)
## [1] 106.501
sd(df$height)
## [1] 10.31993
var(df$weight)
## [1] 811992.3
sd(df$weight)
## [1] 901.1062
mean(df$weight)
## [1] 568.1657
library(flextable)
library(reactable)
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
#——————-
df %>% select (height,egg_group_1)%>%
group_by(egg_group_1) %>%
summarise (media=round(mean(height),2),
Desvio_Padrao=round(sd(height)))
## # A tibble: 15 x 3
## egg_group_1 media Desvio_Padrao
## <chr> <dbl> <dbl>
## 1 bug 9.03 5
## 2 ditto 3 NA
## 3 dragon 11.4 6
## 4 fairy 6.91 4
## 5 flying 9.41 5
## 6 ground 10.9 12
## 7 humanshape 11.8 4
## 8 indeterminate 10 5
## 9 mineral 13.4 17
## 10 monster 12.7 6
## 11 no-eggs 17.8 16
## 12 plant 9.12 5
## 13 water1 10.8 8
## 14 water2 12.4 15
## 15 water3 10.3 4
df %>% select (height,egg_group_1)%>%
group_by(egg_group_1) %>%
summarise (minimo=min(height),
primeiro_quartil=quantile(height,probs=0,25),
mediana=median(height),
terceiro_quartil=quantile(height,probs=0,75),
maximo=max(height)) %>%
flextable() %>% theme_tron()
egg_group_1 | minimo | primeiro_quartil | mediana | terceiro_quartil | maximo |
bug | 1 | 1 | 8.5 | 1 | 25 |
ditto | 3 | 3 | 3.0 | 3 | 3 |
dragon | 3 | 3 | 11.0 | 3 | 20 |
fairy | 1 | 1 | 6.0 | 1 | 15 |
flying | 2 | 2 | 8.5 | 2 | 18 |
ground | 2 | 2 | 9.0 | 2 | 145 |
humanshape | 4 | 4 | 13.0 | 4 | 23 |
indeterminate | 2 | 2 | 9.0 | 2 | 22 |
mineral | 2 | 2 | 10.0 | 2 | 92 |
monster | 4 | 4 | 11.0 | 4 | 27 |
no-eggs | 2 | 2 | 15.0 | 2 | 70 |
plant | 2 | 2 | 8.0 | 2 | 20 |
water1 | 3 | 3 | 9.0 | 3 | 62 |
water2 | 4 | 4 | 9.0 | 4 | 65 |
water3 | 3 | 3 | 10.5 | 3 | 16 |
boxplot(height~egg_group_1,data=df)
O gráfico acima mostra o máximo, o minimo, a média, a mediana e o desvio padrão de cada uma das variáveis qualitativas (grupo de ovos) em relação a altura dos pokemons.
Infelizmente não da pra ver o nome de todos os grupos (não faço ideia de como colocar), então vou analisar dos que tem.
O grupo flying, por exemplo, tem seu pokemon com maior altura em torno de 20 e menor um pouco acima de 0, ao que parece nada está fugindo muito do padrão, sua média e mediana são semelhantes e não apresenta nenhum pokemons totalmente “fora da curva”.