#########################################
library("ggmap")
library(maptools)
library("raster")
library("foreign")
library(maps)
library(ggplot2)
setwd('../code/')
input <- "../plasticityData4gitHub_references_sample.csv"
coord<-read.csv(input,header=TRUE,sep=",",dec = ".")
setwd('../Code/')
input <- "../Data/plasticityData4gitHub_references_sample.csv"
coord<-read.csv(input,header=TRUE,sep=",",dec = ".")
input <- "../Data/plasticityData4gitHub_references_sample.csv"
coord<-read.csv(input,header=TRUE,sep=",",dec = ".")
input <- "../Data/plasticityData4gitHub_references_sample.csv"
coord<-read.csv(input,header=TRUE,sep=",",dec = ".")
input <- "../Data/plasticityData4gitHub_references_sample.csv"
coord<-read.csv(input,header=TRUE,sep=",",dec = ".")
map.dat <- map_data("world")
mp <-ggplot() + geom_polygon(aes(long,lat, group=group), fill="grey65", data=map.dat) + theme_bw() +
labs(x="Longitude",y="Latitude")
visit.x2 <- coord$Lon
visit.y2 <- coord$Lat
latlimits <- c(-55, 90)
longlimits <- c(-180, 180)
# Now Layer the cities on top
mp <- mp+ geom_point(aes(x=visit.x2, y=visit.y2) ,color="orange", size=1) +
coord_cartesian(xlim = longlimits, ylim = latlimits)
mp <- mp + coord_quickmap(xlim = longlimits, ylim = latlimits)
pdf("./map.pdf")
print(mp)
dev.off()
mp
library(maps)
library(ggplot2)
setwd('../Code/')
input <- "../Data/*.csv"
coord<-read.csv(input,header=TRUE,sep=",",dec = ".")
input <- "../Data/plasticityData4gitHub_references_sample.csv"
coord<-read.csv(input,header=TRUE,sep=",",dec = ".")
map.dat <- map_data("world")
mp <-ggplot() + geom_polygon(aes(long,lat, group=group), fill="grey65", data=map.dat) + theme_bw() +
labs(x="Longitude",y="Latitude")
visit.x2 <- coord$Lon
visit.y2 <- coord$Lat
latlimits <- c(-55, 90)
longlimits <- c(-180, 180)
mp <- mp+ geom_point(aes(x=visit.x2, y=visit.y2) ,color="orange", size=1) +
coord_cartesian(xlim = longlimits, ylim = latlimits)
mp <- mp + coord_quickmap(xlim = longlimits, ylim = latlimits)
pdf("../Figures/map.pdf")
print(mp)
dev.off()
mp
