Overlay a kriged interpolated output on a base map

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Overlay a kriged interpolated output on a base map

PAMELLA KAGELIZA KILAVI
 Dear All

I have been trying to overlay the output of interpolation  shown in this
link on a longlat projection in vain
https://rpubs.com/pkilavi/597291

This is an output of the ggmap data int this link
https://rpubs.com/pkilavi/597295

The algorithm below gave me some output which could only work with
continuous fill

#Convert spatial objects into data.frames for ggplot2
Krig.output=as.data.frame(s4_dose_grid)
names(Krig.output)[1:3]<-c("lon","lat","var1.pred")
ggplot(data=Krig.output,aes(x=lon,y=lat))+
  geom_tile(data=Krig.output,aes(fill=var1.pred), alpha=0.6)+
  scale_fill_gradient(high = "#0033CC", low="#cc0033")+
  coord_quickmap()

https://rpubs.com/pkilavi/597297

I converted the UTM coordinates to longlat using the code below
utmcooord-SpatialPoints(cbind(Krig.output$lon,Krig.output$lat,
Krig.output$var1.pred, Krig.output$var1.var), proj4string=CRS("+proj=utm
+zone=37 +south"))
Krig.outpt.longlat<-spTransform(utmcoor,CRS("+proj=longlat"))
Krig.output.new=as.data.frame(Krig.outpt.longlat)
names(Krig.output.new)[1:4]<-c("lon","lat","var1.pred", "var1.var")

Unfortunately, this did not work out with geom_tile and instead, I used
stat_summary_2d, which also has not worked out. I actually hoped that I
will be able to use the ggmap and have the interpolated output well placed
on a hybrid base map

Therefore, I would like to request for an assistant to help me achieve this
objective.

Thank you

Pamella Kageliza Kilavi-Ndege
Ph.D. Student
Department of Physics
University of Nairobi, Kenya

--

The University of Nairobi is ISO 9001:2015 certified.
Website:
http://www.uonbi.ac.ke/ <http://www.uonbi.ac.ke/>
Facebook:
https://www.facebook.com/uonbi.ac.ke <https://www.facebook.com/uonbi.ac.ke>

Twitter: @uonbi¬† https://twitter.com/uonb <https://twitter.com/uonb>

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo