title: Overlaying line graph with barplot in ggplot2
body: <p>Provided <a href="https://www.dropbox.com/s/l647q2omffnwyrg/local.data.csv?dl=0" rel="nofollow noreferrer">the following</a> dataframe (see below) which was taken out of a questionnaire asking about perceived security to people from different neighborhoods, I have managed to create a bar plot which displays perceived security and groups results per each neighborhood:</p>
  
  <pre><code>questionnaire_raw = read.csv("https://www.dropbox.com/s/l647q2omffnwyrg/local.data.csv?dl=0")
  
  ggplot(data = questionnaire_raw, 
         aes(x = factor(Seguridad.de.tu.barrio..de.día.), # We have to convert x values to categorical data
             y = (..count..)/sum(..count..)*100,
             fill = neighborhoods)) + 
    geom_bar(position="dodge") + 
    ggtitle("Seguridad de día") + 
    labs(x="Grado de seguridad", y="% encuestados", fill="Barrios")
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/TV2De.png" alt="enter image description here"></p>
  
  <p>I would like to overlay these results with a line graph representing the mean of each security category (1, 2, 3 or 4) in all neighborhoods (this is, without grouping results), so it is easy to know if a specific neighborhood is over or under the average of all neighborhoods. However, since it's my first job with R, I do not know how to calculate that mean with a dataframe and then overlay it in the previous barplot.</p>