Show number of observations in R Scatter plot with factor levels

Viewed 1867

My Data Frame d

str(d)
'data.frame':   10821 obs. of  2 variables:
 $ Actual : Factor w/ 10 levels "SA103","SA111",..: 6 6 6 6 9 9 6 9 6 6 ...
 $ Planned: Factor w/ 17 levels "SA103","SA111",..: 1 6 6 6 1 9 6 9 6 6 ...

I am plotting this using ggplot2 with following code

ggplot(d, aes(x=Actual, y=Planned))   + geom_point()

Plot Result

I want to show number of observations at each point to easily identify where the deviation is large between Planned & Actual levels. (Example: if it shows SA121 (planned) moved to SA103 (Actual) ~1000 times then it is a serious concern.

How to put data labels in this type of plot with data labels showing number of observations (for given x,y condition)?

1 Answers
Related