Join up each stations by its frequency

Data arrangement

bikedata<-bikedata %>% select("StartStation.Id","EndStation.Id","Start.Date")
###merge coordinate
#########################################################################
a<- coor
colnames(a)<- c("StartStation.Id","s.lat","s.lon")
x<-join(bikedata,a)
## Joining by: StartStation.Id
aa<- coor
colnames(aa)<- c("EndStation.Id","e.lat","e.lon")
#a<-setnames(coor,old=c("id","lat","long"),new=c("EndStation.Id","e.lat","e.lon"))
#aa<-setnames(coor,old=c("id","lat","long"),new=c("StartStation.Id","s.lat","s.lon"))
z<-join(x,aa)
## Joining by: EndStation.Id
z<- na.omit(z)
x<- count(z,vars = c("StartStation.Id","EndStation.Id"))
bikedata<- join(z,x)
## Joining by: StartStation.Id, EndStation.Id
bikedata$weekdays<-weekdays(
  strptime(bikedata$Start.Date,format="%d/%m/%Y %H:%M",tz="UTC")
)
#############################################################  

Plotting

With own colour

map<- get_map(location = "London",source="google",maptype="roadmap",zoom = 11)
## Map from URL : http://maps.googleapis.com/maps/api/staticmap?center=London&zoom=11&size=640x640&scale=2&maptype=roadmap&language=en-EN&sensor=false
## Information from URL : http://maps.googleapis.com/maps/api/geocode/json?address=London&sensor=false
ggmap(map)+
  geom_segment(data=bikedata,aes(x=bikedata$s.lon,y=bikedata$s.lat,xend=bikedata$e.lon, yend=bikedata$e.lat,colour=bikedata$freq
  ),size=0.00001,alpha=0.01)+
  xlim(range(bikedata$s.lon))+
  ylim(range(bikedata$s.lat))+
  scale_color_gradient2(low="aliceblue",mid="wheat",high="red4")+
  geom_point(data=bikedata,aes(x=s.lon,y=s.lat),size=0.01,alpha=0.5)
## Scale for 'x' is already present. Adding another scale for 'x', which
## will replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which
## will replace the existing scale.

With Palette

map<- get_map(location = "London",source="google",maptype="roadmap",zoom = 11)
## Map from URL : http://maps.googleapis.com/maps/api/staticmap?center=London&zoom=11&size=640x640&scale=2&maptype=roadmap&language=en-EN&sensor=false
## Information from URL : http://maps.googleapis.com/maps/api/geocode/json?address=London&sensor=false
ggmap(map)+
  geom_segment(data=bikedata,aes(x=bikedata$s.lon,y=bikedata$s.lat,xend=bikedata$e.lon, yend=bikedata$e.lat,colour=bikedata$freq
  ),size=0.00001,alpha=0.01)+
  xlim(range(bikedata$s.lon))+
  ylim(range(bikedata$s.lat))+
  scale_color_distiller(palette = "YlOrRd")+
  geom_point(data=bikedata,aes(x=s.lon,y=s.lat),size=0.01,alpha=0.5)
## Scale for 'x' is already present. Adding another scale for 'x', which
## will replace the existing scale.
## Scale for 'y' is already present. Adding another scale for 'y', which
## will replace the existing scale.