Gráfico de Barras
ggplot(dados, aes(x = Animal, y = Total, fill = Animal)) +
geom_bar(stat = "identity") +
scale_fill_brewer(palette = "Set2") +
labs(
title = "Casos de Intoxicação por Animal Peçonhento",
subtitle = "Brasil, 2005",
x = "Tipo de Animal",
y = "Total de Casos",
fill = "Legenda"
) +
theme_minimal() +
theme(legend.position = "bottom")

Gráfico de Pizza
ggplot(dados, aes(x = "", y = Porcentagem, fill = Animal)) +
geom_bar(stat = "identity", width = 1) +
coord_polar("y", start = 0) +
scale_fill_brewer(palette = "Set2") +
labs(
title = "Distribuição Percentual dos Casos",
fill = "Animal"
) +
geom_text(aes(label = paste0(Porcentagem, "%")),
position = position_stack(vjust = 0.5),
color = "white", fontface = "bold") +
theme_void()
