I have a total of 90 sites with longitude/latitude coordinates. These sites are grouped into a total of 10 Koepen-Geiger climate classifications, with codes like "Af" and "Cb," etc. (If you know about this, you might realize that I have left a letter out of the classification scheme, but that's entirely okay for the purposes of this problem.)
What my code below does is to take the longitude and latitude of each site of coordinates, and then color its dot on the map based on its KG climate classification. It actually works like a charm, except for the fact that the colours I get are too similar (see the legend in the attached image.)
locations_of_sites = openxlsx::read.xlsx(*LOCATION OF EXCEL SHEET WITH COORDINATES + KG CLASSES*)
locations_of_sites = openxlsx::read.xlsx("/home/abed/Documents/research_papers_2021/Dec2022Discussion/top_level_data/all_sites_with_KG_classes.xlsx")
library(sf)
library(maps)
world = maps::map(database = "world")
worlddata = map_data("world")
myPaletter = magma(20)
ggplot() + geom_map(data = worlddata, map = worlddata, aes(long, lat, map_id = region), fill = "lightgrey") +
geom_point(data = locations_of_sites, aes(longitude, latitude, col =
((factor(Second_KG)))), alpha=1, size = 4) +
scale_color_manual(values = as.factor(locations_of_sites$Second_KG), name = "Second level \n KG classification")