Here is my dataset: https://www.dropbox.com/s/31qvc6miew2qkpp/top_terms.csv?dl=0
top_terms = read.csv("top_terms.csv")
top_terms %>% # take the top terms
mutate(term = reorder(term, beta)) %>%
ggplot(aes(term, beta, fill = factor(topic))) +
geom_col(show.legend = FALSE) +
facet_wrap(~ topic, scales = "free")
labs(x = NULL, y = "Beta")
coord_flip()
Spent some time researching on Google and tried various ways but still cannot get the order fixed. I wanted the terms to be sorted in desc order.