## Repaired R code for Markov spatial simulation of hurricane tracks from historical trajectories

###### (Slight update, 28th June 2020.)

I’m currently studying random walk and diffusion processes and their connections with random fields. I’m interested in this because at the core of dynamic linear models, Kalman filters, and state-space methods there is a random walk in a parameter space. The near-term goal is to understand how to apply these techniques to series of categorical data, and understand the relationship between, say,
``` W. Li, ``Markov chain random fields for estimation of categorical variables'', Mathematical Geology (2007) 39: 321–335 DOI 10.1007/s11004-007-9081-0. ```
and
``` K. V. Mardia, C. Goodall, E. J. Redfern, F. J. Alonso, ``The kriged Kalman filter'', Test, December 1998, 7(2), 217–282 DOI 10.1007/BF02565111. ```
Along the way, I came across a mention of work done by Christophe Denuse-Baillon in his actuarial thesis which appears to study and describe a method of simulating North Atlantic hurricane tracks using a Markov spatial process calibrated with historical tracks. The idea, essentially, is to make a random walk from a suitably chosen starting point, taking steps conditional upon relative frequencies of directions taken from the current step. In other words, the Markovian assumption of conditional independence is made so the next step depends only upon the probabilities of taking a step in directions centered on the current one.

I would not know the details, since Denuse-Baillon’s thesis is in French, but Professor Arthur Charpentier introduced the idea and provided some R code for implementing Denuse-Baillon’s idea on actual hurricane tracks. Now the thing is the datasets he drew upon have naming mistakes in them which need to be repaired in order to use them, and his blog post did not identify these, although he did note they existed. But, more seriously, he did not provide a complete, runnable set of R code to reproduce his results, something which would be quite useful to students of the technique and the problem.

This blog posting remedies that providing runnable R code for replicating his results (a tarball), and fixing the mistakes in the datasets on the fly. Note that the R relies upon the XML, maps, ks, and RColorBrewer packages which also need to be installed.

The general technique is interesting in that it offers a non-parametric, indeed, model free way of forecasting hurricane tracks.

I have reproduced the figures Professor Charpentier showed below:

Larger versions of these figures can be seen by clicking on any one of them, and then using your browser Back Button to return to the blog.

The R code has been cleaned up some, and made a bit more robust.

Robert Grant also remarked upon Professor Charpentier’s work.

Note that it is still possible that when trajectories are generated, if a poor starting point is chosen, the generation step can take a while.

I also want to make note of the spMC package by Luca Sartore, available via CRAN, which he describes here. Abstract:

Currently, a part of the R statistical software is developed in order to deal with spatial models. More specifically, some available packages allow the user to analyse categorical spatial random patterns. However, only the spMC package considers a viewpoint based on transition probabilities between locations. Through the use of this package it is possible to analyse the spatial variability of data, make inference, predict and simulate the categorical classes in unobserved sites. An example is presented by analysing the well-known Swiss Jura data set.

##### Update, 28th June 2020.

Another perspective of what’s being done here is that there’s an implicit supposition that, long term, hurricanes are embedded in some kind of flow field having velocity gradients. This field may be stochastic. Historical data is used to infer the streamlines of this flow. Once constructed, these give a means of predicting which direction the center tracking point of the hurricane will go.