Hi guys,
I hope everyone is well at this time.
I am in the middle of an important assignment for university. I need to produce a map with the sites that were sampled during data collection. I have attached the code I have produced thus far. I am, however, struggling to complete the code.
If anyone could offer some suggestions I would greatly appreciate it.
Many thanks,
Boru
#Please find the code below:
library(maps)
Localisation of the file with all the coordinates
Sampling_coord <- read.csv()
#Project only islands
palette(c("yellow","green","red"))
#Create a file in output
png(, res=300, width = 15, height = 15, units = "cm")
coordinates of the area
map(xlim =c(-10,0), ylim=c(55,60), fill=F, col="black",mar=c(1,1,1,1))
Substract only the island samples
islands=subset(Sampling_coord, Project == 'Island')
Put the points on the map and color by type of site
points(islands$Long,islands$Lat,col=islands$SiteMiteBees,pch=19)
Put the labels on the sites
text(islands$Long, islands$Lat,label=islands$Code, cex=0.8, adj=1.4) legend("bottomright",legend=unique(islands$SiteMiteBees),pch=19,col=unique(islands$SiteMiteBees),cex=0.6) dev.off()
Please find the sites below:
58.223914;-6.386988;L;Island;Varroa;Honey Bees;Island + Varroa + Honey Bees
57.051801;-5.923568;S;Island;Varroa;Honey Bees;Island + Varroa + Honey Bees
56.598782;-6.627109;Coll;Island;Varroa;Honey Bees;Island + Varroa + Honey Bees
56.62349;-6.073362;Mull;Island;NoVarroa;Honey Bees;Island + Honey Bees
55.698677;-6.445954;I;Island;NoVarroa;Honey Bees;Island + Honey Bees
56.959589;-7.443962;B;Island;NoVarroa;Honey Bees;Island + Honey Bees
56.068724;-6.196989;C;Island;NoVarroa;Honey Bees;Island + Honey Bees
57.153458;-7.308724;SU;Island;NoVarroa;No Honey Bees;Island
57.084832;-7.310713;E;Island;NoVarroa;No Honey Bees;Island
57.010631;-6.265324;R;Island;NoVarroa;No Honey Bees;Island
`