im trying to add the default percentage % on top of the bars in the following graph. y is the loan purpose and x-axis is the number of loans issued for each category. The default variable tells whether the loan has been payed back or not.
Can anyone help with the code? What I have done is
ggplot(loan_data, aes(x=purpose, fill = default))
+ geom_bar()
+ coord_flip()
+ facet_wrap(~term)