title: How to plot and colour streets in a SpatialLinesDataFrame with ggplot/ggmap?
body: <p>I've got a shapefile (SpatialLinesDataFrame) containing all streets in cologne, which can be downloaded from <a href="http://offenedaten-koeln.de/dataset/strasse" rel="noreferrer">here</a>. I merged this @data with data from an external source. How can i plot these streets (if possible on an google map using ggmaps), so that every street has a different colour (or thickness), depending on its individual value?</p>
  
  <p>So far, i have done this:</p>
  
  <pre><code>shapefile &lt;- readOGR(shapfile, "Strasse", stringsAsFactors=FALSE, 
  encoding="latin-9")
  shp &lt;- spTransform(shapefile, CRS("+proj=longlat +datum=WGS84"))
  </code></pre>
  
  <p>at this point i add another column to the shp@data data frame, which contains a certain value for each street. Then I fortifiy the the shapefile so it can be plotted using ggplot:</p>
  
  <pre><code>shp$id &lt;- rownames(shp@data)
  shp.df &lt;- as.data.frame(shp)
  data_fort &lt;- fortify(shp, region = "id")
  data_merged &lt;- join(data_fort, shp.df, by="id")
  </code></pre>
  
  <p>When i use geom_lines, the lines do not look good and are not easy to identify:</p>
  
  <pre><code>ggplot(data_merged, aes(x=long, y=lat,
                        group=group,
                        colour=values)) +
   geom_line()
  </code></pre>
  
  <p><a href="http://statistik-stuttgart.de/r-street-of-france/" rel="noreferrer">Here</a> i saw that one could transform the shapefile so that geom_segement (or in this case a modified function "geom_segment2") can be used, but then would loose my the street specific values.</p>