Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am proficient in Python, but have no knowledge of R. Can you suggest a good tutorial in using rpy2 or any other R library to perform Block/Cokriging "Kriging"

share|improve this question
up vote 2 down vote accepted

I think if your are proficient in Python, you can manage the rpy2 part (there are examples here), but you need more a book on spatial statistics in R. That would probably be Applied Spatial Data Analysis with R. Section 8.5 is about spatial predictions. The book is available online through library subscription, but the code from the chapter is freely available (have a look at chunk 15 and following). gstat's vignette also provide step by step tutorial.

While I don't work with rpy2 a lot, I generally find it easier to work the R code in R, and once it's OK, run it through python.

share|improve this answer
The example provided is for rpy, not rpy2. – lgautier Nov 1 '12 at 6:19
Thanks, I fixed it – Etiennebr Nov 5 '12 at 2:08
Hi! Etiennebr, thanks for suggesting a good book for geostatistics with R. I was just wondering about "to work the R code in R, and once it's OK, run it through python." How is the R code run in Python? – user1142937 Nov 7 '12 at 10:52
That's where rpy2 comes in. Have a look at the rpy2 documentation. It's a module you load in python that allows you to interact with R from python. – Etiennebr Nov 9 '12 at 20:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.