[Get file]
#install.packages("mapview")
#install.packages("Rmisc")
library(sp)
library(lattice)
library(ggplot2)
library(gdata)
library(Rmisc)
library(plyr)
library(ggmap)
library(leaflet)
library(mapview)
setwd("/Users/yourname/yourfilefolderlocation/") for a mac
OR
setwd(c:/docs/yourfilefolderlocation") for a PC
mydata = read.xls("SDmappractice.xls")
head(mydata)
pnt <- data.frame(x = mydata$Long, y = mydata$Lat)
pt <- data.frame(x = jitter(rep(117.1611, 3), factor = 0.001),
y = jitter(rep(32.7157, 3), factor = 0.001))
coordinates(pnt) <- ~ x + y
proj4string(pnt) <- "+init=epsg:4326"
p2 <- levelplot(t(volcano), col.regions = terrain.colors(100))
mapview(pnt, popup = popupGraph(p2, width = 400, height = 300))
#install.packages("mapview")
#install.packages("Rmisc")
library(sp)
library(lattice)
library(ggplot2)
library(gdata)
library(Rmisc)
library(plyr)
library(ggmap)
library(leaflet)
library(mapview)
setwd("/Users/yourname/yourfilefolderlocation/") for a mac
OR
setwd(c:/docs/yourfilefolderlocation") for a PC
mydata = read.xls("SDmappractice.xls")
head(mydata)
pnt <- data.frame(x = mydata$Long, y = mydata$Lat)
pt <- data.frame(x = jitter(rep(117.1611, 3), factor = 0.001),
y = jitter(rep(32.7157, 3), factor = 0.001))
coordinates(pnt) <- ~ x + y
proj4string(pnt) <- "+init=epsg:4326"
p2 <- levelplot(t(volcano), col.regions = terrain.colors(100))
mapview(pnt, popup = popupGraph(p2, width = 400, height = 300))