My question is similar to this question.
But I can't transfer it to my own data.
I have a dataframe like this (over 1400 rows):
Code Stationsname Startdatum LAT LON Höhe Area Mean
1 AT0ENK1 Enzenkirchen im Sauwald 03.06.1998 48.39167 13.67111 525 rural 55.76619
2 AT0ILL1 Illmitz 01.05.1978 47.77000 16.76640 117 rural 58.98511
3 AT0PIL1 Pillersdorf bei Retz 01.02.1992 48.72111 15.94223 315 rural 59.47489
4 AT0SON1 Sonnblick 01.09.1986 47.05444 12.95834 3106 rural 97.23856
5 AT0VOR1 Vorhegg bei K”tschach-Mauthen 04.12.1990 46.67972 12.97195 1020 rural 70.65373
6 AT0ZIL1 Ried im Zillertal 08.08.2008 47.30667 11.86389 555 rural 36.76401
Now I want to create a map with ggplot and display the points in different colors based on the value in the Mean
column, it reaches from 18 to 98.
Also I would like to change the symbols from a dot to a triangle if the value in the column Höhe
is over 700.
Until now I did this:
library(ggmap)
library(ggplot2)
Europe <- get_map(location = "Europe", zoom = 3)
p = ggmap(Europe)
p = p + geom_point(data = Cluster, aes(LON, LAT, color = Mean),
size = 1.5, pch = ifelse(Höhe < 700,'19','17')) +
scale_x_continuous(limits = c(-25.0, 40.00), expand = c(0, 0)) +
scale_y_continuous(limits = c(34.00, 71.0), expand = c(0, 0)) +
scale_colour_gradient ---??
But I don't know how to go on and assign the colors.