Dear friends,
I am learning how to use dotchart as an alternative to bar chart. I have the following data set, please use the link;[Dropbox - File Deleted - Simplify your life]
The goal is to plot the crime percent by year, faceted by crime type (i.e. Primary.Type). There are two primary goals, sort the crime percent for each crime type, and reduce the size of the axis labels.
Here is my code to achieve this;
ggdotchart(street_crime_year_pct %>% arrange(Primary.Type,crime_percent),x="Year",y="crime_percent",
color="tomato", facet.by = c("Primary.Type"),
dot.size=2,rotate=TRUE,
ggtheme=theme_pubr())+
labs(x="Type of Criminal Activity",y="Crime Percent", title="Yearly Trend of Different types of Crimes on Streets of Chicago")
As seen , the values are not sorted despite of using arrange. Moreover we can't read the values for Year properly. Can I kindly get help to sort these two issues?thanks in advance.