after getting the different topics, group the data according to topics and visualize the distribution of upvotes for each topic