# Blog Archives

## Working with Globcolour data

April 2, 2012
By

The Globcolour project (http://www.globcolour.info/) provides relatively easy access to ocean color remote sensing data. Data is provided at http://hermes.acri.fr/and the following parameters are available:· Chlorophyll-a (CHL1 and CHL2)· Fully normalised water leaving radiances at 412, 443, 490, 510, 531, 550-565, 620, 665-670, 681 and 709 nm (Lxxx)· Coloured dissolved and detrital...

## Add a frame to a map

April 2, 2012
By

Here is a function that adds a frame of alternating colors to a map (un-projected). One defines the extension of each bar (in degrees) and an optional width of the bars (in inches). It uses the "joinPolys" function of the package to trim the bars near the map corners where the axes meet.the map.frame...

## Canonical Correlation Analysis for finding patterns in coupled fields

March 25, 2012
By

First CCA pattern of Sea Level Pressure (SLP) and Sea Surface Temperature (SST) monthly anomalies for the region between -180 °W to -70 °W and +30 °N to -30 °S. The following post demonstrates the use of Canonical Correlation Analysis (CCA) for diagnosing coupled patterns in climate fields....

## Exponentiation of a matrix (including pseudoinverse)

March 22, 2012
By

The following function "exp.mat" allows for the exponentiation of a matrix (i.e. calculation of a matrix to a given power). The function follows three steps:1) Singular Value Decomposition (SVD) of the matrix2) Exponentiation of the singular values3) Re-calculation of the matrix with the new singular valuesThe most common case where the method is applied...

## A ridiculous proof of concept: xyz interpolation

March 14, 2012
By

Ridiculous OrbThis is really the last one on this theme for a while... I had alluded to a combination of methods regarding xyz interpolation at the end of my last post and wanted to demonstrate this in a final example.The ridiculousness that you see above involved two interpolation steps. First,...

## XYZ geographic data interpolation, part 3

March 12, 2012
By

This will be probably be a final posting on interpolation of xyz data as I believe I have come to some conclusions to my original issues. I show three methods of xyz interpolation:1. The quick and dirty method of interpolating projected xyz points (bi-linear)2. Interpolation using Cartesian coordinates (bi-linear)3. Interpolation using spherical coordinates and...

## XYZ geographic data interpolation, part 2

February 29, 2012
By

Having recently received a comment on a post regarding geographic xyz data interpolation, I decided to return to my original "xyz.map" function and open it up for easier interpretation. This should make the method easier to adapt and follow.The above graph shows the distance to Mecca as interpolated from 1000 randomly generated lat/lon...

## Maximal Information Coefficient (MIC)

December 19, 2011
By

Pearson r correlation coefficients for various distributions of paired data (Credit: Denis Boigelot, Wikimedia Commons)A paper published this week in Science outlines a new statistic called the maximal information coefficient (MIC), which is able to equally describe the correlation between paired variables regardless of linear or nonlinear relationship. In...

## Maximum Covariance Analysis (MCA)

December 13, 2011
By

Maximum Covariance Analysis (MCA) (Mode 1; scaled) of Sea Level Pressure (SLP) and Sea Surface Temperature (SST) monthly anomalies for the region between -180 °W to -70 °W and +30 °N to -30 °S.  MCA coefficients (scaled) are below. The mode represents 94% of the squared covariance fraction (SCF).Maximum Correlation Analysis...

## Another aspect of speeding up loops in R

November 28, 2011
By

Any frequent reader of R-bloggers will have come across several posts concerning the optimization of code - in particular, the avoidance of loops.Here's another aspect of the same issue. If you have experience programming in other languages besides R, this is probably a no-brainer, but for laymen, like myself, the following example was...