ggplot(civicpulse_important_part_of_job, aes(x=Category)) +
geom_bar() +
ggtitle("Frequency of Each Category") +
xlab("Category") +
ylab("Frequency")
pie_data <- as.data.frame(table(civicpulse_important_part_of_job$Category))
colnames(pie_data) <- c("Category", "Frequency")
ggplot(pie_data, aes(x="", y=Frequency, fill=Category)) +
geom_bar(width = 1, stat = "identity") +
coord_polar("y") +
ggtitle("Proportion of Each Category")
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter