title: geom_text in barplot to show frequency over bars using R
body: <p>I have this graph that I want to show the count over the bar, however my code shows the number 1 inside the bars..</p>
  <p>What I have:
  <a href="https://i.stack.imgur.com/2iSgo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2iSgo.png" alt="enter image description here" /></a></p>
  <p>What I am trying to make:</p>
  <p><a href="https://i.stack.imgur.com/6GdUp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6GdUp.png" alt="enter image description here" /></a></p>
  <pre><code># Library
  library(ggplot2)
  
  # 1. Read data (comma separated)
  df = read.csv2(text = &quot;Id;Date
  1;2021-06-09
  2;2021-06-08
  3;2021-06-08
  4;2021-06-09
  5;2021-06-09&quot;)
  
  # 2. Print table
  df_date &lt;- df[, &quot;Date&quot;]
  df_date &lt;- as.data.frame(table(df_date))
  colnames(df_date)[which(names(df_date) == &quot;df_date&quot;)] &lt;- &quot;Date&quot; # Set column name to Date
  df_date
  
  # 3. Plot bar chart
  ggplot(df_date, aes(x = Date, y = Freq)) + 
          geom_bar(stat = &quot;identity&quot;) + 
            theme_classic() +
            ggtitle(&quot;Date&quot;) +
            xlab(&quot;Date&quot;) + 
            ylab(&quot;Frequency&quot;) +
            geom_text(stat= &quot;count&quot;, aes(label = ..count.., y= ..prop..), vjust = -1)
  </code></pre>