SHARE
TWEET

Untitled

a guest Feb 21st, 2019 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. library(PBSmapping); library(RgoogleMaps); library(maptools)
  2. cases<-read.table("cases.csv")
  3. cases.ppp<-ppp(cases@coords[,1], cases@coords[,2], unitname=c("km"))
  4. dens.cas <- density.ppp(cases.ppp, bw)
  5. plot(dens.cas)
  6.    
  7. shp <- importShapefile('map.shp', projection="LL");
  8. bb <- qbbox(lat = shp[,"Y"], lon = shp[,"X"]);  
  9. MyMap <- GetMap.bbox(bb$lonR, bb$latR, destfile = "map.jpg");
  10.    
  11. PlotPolysOnStaticMap(MyMap, shp, lwd=.5, col = rgb(1,1,1,0.2), add = F)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top