Publications by andrew

Percolation Threshold on a Square Lattice

29.10.2013

Manfred Schroeder touches on the topic of percolation a number of times in his encyclopaedic book on fractals (Schroeder, M. (1991). Fractals, Chaos, Power Laws: Minutes from an Infinite Paradise. W H Freeman & Company.). Percolation has numerous practical applications, the most interesting of which (from my perspective) is the flow of hot water ...

4265 sym R (4082 sym/13 pcs) 6 img

Percolation Threshold: Including Next-Nearest Neighbours

01.11.2013

In my previous post about estimating the Percolation Threshold on a square lattice, I only considered flow from a given cell to its four nearest neighbours. It is a relatively simple matter to extend the recursive flow algorithm to include other configurations as well. Malarz and Galam (2005) considered the problem of percolation on a square latt...

2428 sym R (1554 sym/6 pcs) 8 img

Introduction to Fractals

03.11.2013

A short while ago I was contracted to write a short piece entitled “Introduction to Fractals”. The article can be found here. Admittedly it is hard to do justice to the topic in less than 1000 words. Both of the illustrations were created with R. Mandelbrot Set The Mandelbrot Set image was created using the Julia package. library(Julia) Firs...

939 sym R (2154 sym/4 pcs) 6 img

Iterators in R

13.11.2013

According to Wikipedia, an iterator is “an object that enables a programmer to traverse a container”. A collection of items (stashed in a container) can be thought of as being “iterable” if there is a logical progression from one element to the next (so a list is iterable, while a set is not). An iterator is then an object for moving thro...

9209 sym R (7292 sym/35 pcs)

Implementing a Queue as a Reference Class

24.11.2013

I am working on a simulation for an Automatic Repeat-reQuest (ARQ) algorithm. After trying various options, I concluded that I would need an implementation of a queue to make this problem tractable. R does not have a native queue data structure, so this seemed like a good opportunity to implement one and learn something about Reference Classes in...

4285 sym R (4333 sym/19 pcs)

Deriving a Priority Queue from a Plain Vanilla Queue

25.11.2013

Following up on my recent post about implementing a queue as a reference class, I am going to derive a Priority Queue class. Inheritance The syntax for Reference Class inheritance is quite intuitive. PriorityQueue <- setRefClass("PriorityQueue", contains = "Queue", fields = list( ...

1891 sym R (1717 sym/4 pcs)

Contour and Density Layers with ggmap

13.12.2013

I am busy working on a project which uses data from the World Wide Lightning Location Network (WWLLN). Specifically, I am trying to reproduce some of the results from Orville, Richard E, Gary R. Huffines, John Nielsen-Gammon, Renyi Zhang, Brandon Ely, Scott Steiger, Stephen Phillips, Steve Allen, and William Read. 2001. “Enhancement of Cloud-to...

2160 sym R (1940 sym/5 pcs) 6 img

Processing EXIF Data

15.12.2013

I got quite inspired by the EXIF with R post on the Timely Portfolio blog and decided to do a similar analysis with my photographic database. The Data The EXIF data were dumped using exiftool. $ find 1995/ 20* -type f -print0 | xargs -0 exiftool -S -FileName -Orientation -ExposureTime \ -FNumber -ExposureProgram -ISO -CreateDate -ShutterSpeedVa...

5239 sym R (5088 sym/9 pcs) 8 img

How Much Time to Conceive?

12.01.2014

This morning my wife presented me with a rather interesting statistic: a healthy couple has a 25% chance of conception every month [1], and that this should result in a 75% to 85% chance of conception after a year. This sounded rather interesting and it occurred to me that it really can’t be that simple. There are surely a lot of variables whic...

6122 sym R (2876 sym/10 pcs) 4 img

Filtering Data with L2 Regularisation

25.03.2014

I have just finished reading Momentum Strategies with L1 Filter by Tung-Lam Dao. The smoothing results presented in this paper are interesting and I thought it would be cool to implement the L1 and L2 filtering schemes in R. We’ll start with the L2 scheme here because it has an exact solution and I will follow up with the L1 scheme later on. Fo...

4519 sym R (2081 sym/9 pcs) 36 img