Blog Archives

Transform point shapefile to SpatStat object

August 19, 2014
By

Today I wanted to do some point pattern analysis in R using the fantastic package spatstat.The problem was that I only had a point shapefile, so I googled a way to transform a shapefile into a ppp object (which is the point pattern object used by spats...

Read more »

Extract Coordinates and Other Data from KML in R

June 11, 2014
By

KML files are used to visualize geographical data in Google Earth. These files are written in XML and allow to visualize places and to attach additional data in HTML format.In these days I am working with the MIDAS database of wind measuring stations a...

Read more »

Merge .ASC grids with R

April 2, 2014
By
Merge .ASC grids with R

A couple of years ago I found online a script to merge several .asc grids into a single file in R.I do not remember where I found it but if you have the same problem, the script is the following: setwd("c:/temp") library(rgdal) library(raster) # ...

Read more »

Plotting an Odd number of plots in single image

March 3, 2014
By
Plotting an Odd number of plots in single image

Sometimes I have the need to reduce the number of images for a presentation or an article. A good way of doing it is putting multiple plot on the same tif or jpg file.R has multiple functions to achieve this objective and a nice tutorial for this topic...

Read more »

Displaying spatial sensor data from Arduino with R on Google Maps

February 26, 2014
By
Displaying spatial sensor data from Arduino with R on Google Maps

For Christmas I decided to treat myself with an Arduino starter kit. I started doing some basic experiments and I quickly found out numerous website that sell every sort of sensor: from temperature and humidity, to air quality. Long story short, I bou...

Read more »

Interfacing R and Google maps

July 30, 2013
By
Interfacing R and Google maps

Introduction I couple of weeks ago I had an idea for a website where people can collaborate to create the first real Audio Atlas, using the power of the Google Maps API. The problem was that I do some programming in R but I did know very few things about HTML and javascript. However, I knew that having...

Read more »

Box-plot with R – Tutorial

June 6, 2013
By
Box-plot with R – Tutorial

IntR – Interactive GUI for performing geostatistical analysis in R

June 4, 2013
By
IntR – Interactive GUI for performing geostatistical analysis in R

In 2011 I presented at the UseR conference, held in Warwick (UK), a piece of software for easing the learning curve of R for geostatistical analysis. It is a very simple attempt to create an interactive interface in R, by using Python as GUI. F...

Read more »

Terrain Attributes with the raster package

October 29, 2012
By

Terrain attributes can be derived by elevation values on a small neighbourhood of each DEM point.The major attributes can be calculated from the derivatives of the topographic surface. These derivatives measure the rate of change in elevation in relati...

Read more »

Variogram fit with RPanel

September 21, 2011
By
Variogram fit with RPanel

During the UseR 2011 conference I saw lots of examples of the use of RPanel to create a GUI in R. Yesterday, because I was a bit bored of the work I was doing I started thinking about this and I decided to try this package.My objective was to create a new panel with all the main setting for...

Read more »