Tuesday, August 7, 2012

Provincial Monthly Rainfall of the Philippines from WORLDCLIM

Preparing for a future conference on climate change, I downloaded and extracted average monthly rainfall in the Philippines from worldclim.org. Using maptools, raster, and animation package in R, I produced an animation of average monthly rainfall of the country.


5 comments:

  1. Hi,arsalvacion. It's a very nice graph.
    I am working in New Zealand. I am wanting to produce something very similar to your stuff.
    I am wondering if you can share your code with me.

    Thanks in advance.
    Yang.
    My email address is gylamb@gmail.com

    ReplyDelete
  2. Hi Yang,

    I just save each file as png (e.g. Rainfall1.png to Rainfall12.png) the use the code (below) sent to me by Yihui Xie to produce the GIF file.


    library(animation)
    files = sprintf('Rainfall%d.png', 1:12)
    im.convert(files, output = 'Rainfall.gif')

    Best regards,

    ARSalvacion

    ReplyDelete
  3. Hi, arsalvacion! I was led onto your blog through the R-bloggers. Nice graph!
    I'm doing a paper on institutions and poverty. I want to include geophysical attributes, including average rainfall and average elevation, in my model to control for potential development. Do you have any idea where to get these data by municipality, or how I can generate them?

    ReplyDelete
  4. Hi Mikel,

    Can you give me more information about the paper you are doing? Kindly send me a message on my email (arsalvacion@gmail.com)

    Thanks!

    arsalvacion

    ReplyDelete