9

I have many lines of georeferenced hydrological data with weekly resolution:

Station name, Lat, Long, Week 1 average, Week 2 average ... Week 52 average

Unfortunately, I also have some data with only monthly resolution:

Station name, Lat, Long, January average, February average ... December average

Rather than "reinventing the wheel," can anyone recommend a favorite module, package, or technique that would provide a reasonable interpolation of weekly values from monthly values? Linear would be fine, but it would be nice if we could use the coordinates to improve the interpolation based on nearby stations.

I've tagged this post with python because it's the language I've been using recently (although not its statistical functions). If the answer is "use a stats program like r" so be it, but I'm curious as to what's out there for python. Thanks!

Paul Hiemstra
  • 56,833
  • 11
  • 132
  • 142
Martin Burch
  • 2,184
  • 1
  • 23
  • 53

4 Answers4

4

I haven't had a chance to dig into it, but the hpgl (High Performance Geostatistics Library) provides a number of kriging (geospatial interpolation) methods:

Algorithms

  • Simple Kriging (SK)
  • Ordinary Kriging (OK)
  • Indicator Kriging (IK)
  • Local Varying Mean Kriging (LVM Kriging)
  • Simple CoKriging (Markov Models 1 & 2)
  • Sequential Indicator Simulation (SIS)
  • Corellogram Local Varying Mean SIS (CLVM SIS)
  • Local Varying Mean SIS (LVM SIS)
  • Sequential Gaussian Simulation (SGS)
monkut
  • 36,357
  • 21
  • 109
  • 140
  • 2
    This looks a little hairy -- sparse on documentation and examples -- but I appreciate your effort. It would be nice to hear from somebody who has used it, of course. – Martin Burch Jul 26 '12 at 05:05
  • 1
    I probably found that package from this question (not python specific): http://gis.stackexchange.com/questions/1041/open-source-methods-for-kriging – monkut Aug 01 '12 at 01:44
4

If you are interested into expanding your experience into R, there are a number of good, well used and documented packages out there. I would start by looking at the Spatial Taskview, which lists what packages can be used for spatial data. One of the paragraphs deals with interpolation. I am most familiar with automap/gstat (I wrote automap), where especially gstat is a powerfull geostatistics package which supports a wide range of methods.

http://cran.r-project.org/web/views/Spatial.html

Integrating Python and R can be done in multiple ways, e.g. Using system calls or an in memory link using Rpy. See also:

Python interface for R Programming Language

Community
  • 1
  • 1
Paul Hiemstra
  • 56,833
  • 11
  • 132
  • 142
1

I am looking into doing the same thing, and I found this kriging module written by Sat Kumar Tomer at AMBHAS.

There appears to be methods for producing variograms and performing ordinary kriging.

I'll update this answer if I use this and make further discoveries.

ryanjdillon
  • 13,415
  • 6
  • 73
  • 96
1

Since I originally posted this question (in 2012!) an actively-developed Python Kriging module has been released https://github.com/bsmurphy/PyKrige

There's also this older option: https://github.com/capaulson/pyKriging

Martin Burch
  • 2,184
  • 1
  • 23
  • 53