g <-
ggplot(df,aes(x=fct_rev(fct_infreq(bird_breed)), y =Count , fill = bird_breed))+
stat_summary(fun.y = "sum", geom = "point",size=4.5, shape ="\U1F426") +
coord_flip() +
facet_wrap(~vote_rank,scales = "free") +
theme_hc()+
scale_fill_igv()+
theme(legend.position = "none",
plot.caption = element_text(size = 11,color = "grey76", hjust = .98),
plot.title = element_text(hjust = 0.5, size=20, color="grey76"),
plot.subtitle = element_text(hjust = 0.5, size=13, color="grey76"),
panel.background = element_rect(fill="grey10"),
strip.background = element_rect(fil="grey7"),
plot.background = element_rect(fill="grey7"),
axis.text = element_text(family = "Roboto Mono",
size = 10,
colour = "grey76"),
strip.text.x =element_text(family = "Roboto Mono",
size = 12,
colour = "grey76"),
axis.title = element_text(family = "Roboto Mono",
size = 16,
colour = "white"),
line = element_line(linetype = "dashed"),
#axis.line = element_line(arrow = arrow(), color="grey50"),
panel.spacing = unit(2.5, "lines"))+
labs(title = "Top 10 for the new zealand bird of year",
subtitle = "Day: {frame_time}",
y="Number of Votes",
x="Birds",
fill="Language",
caption = "Vizualization by Duvan Nieves | Data : 'NZ Bird of the Year' by New Zealand Forest and Bird Org")+
transition_components(date)+
enter_fade() +
exit_fade()
animate(g, renderer = gifski_renderer(),height = 600, width =800,fps = 2)