I am struggling to combine colour coding to a Z variable (ShipSpeedGPS.Knots.) in a Y Variable (Lon) and X Var (Lat) plot.
I have mapped the route via the following commands
NWSMAP = qmap('brunei', zoom=3)
NWSMAP + geom_point(aes(x=Lon, y=Lat), data=D3)
And separately I have been able colour code the route without the base map by the following commands
D3Plot = ggplot(data = D3, aes(x=Lat, y=Lon, colour=yval))
D3Plot + geom_point(aes(colour = D3$ShipSpeedGPS.Knots.))
Ideally I would like to combine both of these features into the one chart. The 'brunei' map base with the route colour coded based on the speed of the vessel. This is so I can visually show the captains of the vessels where they are going unnecessarily fast and are wasting fuel.
str(D3)
'data.frame': 74843 obs. of 15 variables:
$ Date : Date, format: "2015-04-27"
$ Time : Factor w/ 86401 levels "","0:00:00"
$ Lat : num -19.9
$ Lon : num 117
$ ShipCourse.Deg. : int 182
$ ShipSpeedGPS.Knots. : num 13.4
$ ShipSpeedLog.Knots. : num 13.6
$ ShipSpeedPropllr.Knots.: num 14.3
$ Wind.Dir..Rel...Deg. : int 0
$ Wind.Speed.Abs...Knots.: num 13.3
$ WindSpeedRel...Knots. : num 0
$ ShaftPower.kW. : int 7526
$ ShaftSpeed.rpm. : num 58.8
$ ShaftTorque.kNm. : int 1222
$ ShaftThrust..kN. : int 915