title: How to Add Data Labels to ggplot
body: <p>Attempting to add data labels to a barplot, using ggplot is giving me the following error:</p>
  
  <pre><code>Error: geom_text requires the following missing aesthetics: x
  </code></pre>
  
  <p>My sample data is as below:</p>
  
  <pre><code>| Team          | Goals     |
  |------------   |-------    |
  | Manchester    | 26        |
  | Liverpool     | 25        |
  | Man City      | 30        |
  | Chelsea       | 32        |
  | Arsenal       | 11        |
  | West Ham      | 22        |
  | Stoke         | 23        |
  </code></pre>
  
  <p>And here is the code I am using to create a barplot.</p>
  
  <pre><code>g&lt;- ggplot(data = scores) + 
    geom_bar(mapping = aes(x=Team, y=Goals, color = Team, fill = Team), 
             stat = "identity")
  g &lt;- g + ggtitle("Goals per Team") + ylab("Number of Goals")
  g &lt;- g + theme_bw() + theme(legend.position="none") + theme(plot.title = element_text(hjust = 0.5))
  g + geom_text(aes(y=Goals, label=Goals))
  g
  </code></pre>
  
  <p>Even when I add <code>x = Team</code> in <code>g + geom_text(aes(x = Team, y=Goals, label=Goals))</code>, it still gives me the same error.</p>
  
  <p>What am I doing wrong here?</p>