tl;dr: ggplot-nyc && googlemap-nyc && TSP-Map (the Dancer2 app) One day I decided to glue-together a couple cool Perl modules and the visualization capabilities of R to generate a map of locations and the computed path of a traveling salesman (TSP) – who in this case is a restaurant critic. The prerequisite is to have MongoDB installed […]

## Subsequent Prime Number Distribution

In 2016, two mathematicians, Kannan Soundararajan and Robert Lemke Oliver found that the prime numbers do not occur at random when looking at the final digits of subsequent primes. For instance, a prime ending in 9 is more likely to be followed by a prime ending in 1, than any other digits (1, 3, 7 […]

## Inspecting American Inaugural Addresses with Perl and R

Given all the inaugural addresses of American presidents, what are the readability stats? What is the sentiment over time? UPDATE: Results charted for 2017 As usual I reach for perl to acquire and format the data for exploration with R. The code below (and available on github) reads and analyzes a collection of text documents. […]

## Inspecting the English Premier League Player Stats with R

Being a soccer person and programmer, I wanted to inspect player statistics for myself. I finally found this excellent site for many leagues and primarily with player stats: whoscored.com. So, seeing that there was no download link, I determined to tediously copy/paste all the records for each player, for defensive, offensive, passing and summary categories, […]

## Musical Random Walks Over Weighted Graphs

tl;dr: https://github.com/ology/Music/blob/master/random-walk In this post, I illustrate a simple technique in Perl 5 to perform random walks over (node-edge) graphs, adding the named, “semantic” vertices to a MIDI score. The image on the left is not generated by the random-walk program, but is just a related illustration. :-) OK – on with the code! First, there […]

## Plotting Successive Primes Modulo A Number

tl;dr: https://github.com/ology/Math/blob/master/primes/sequence-pairs File this under Recreational mathematics… I have this passionate curiosity for seeing the primes “folded in on themselves” – constrained to a phase space. I also have a burning desire to visualize successive events. I suppose that I am searching for “strange attractors”, as with the famous water drip […]

## Visualize Move, Protection and Threat Status in Chess

tl;dr: https://github.com/ology/Chess-Inspector When I was a kid, my younger brother became a chess master and would regularly thrash me in the game. Invariably this seemed to be because I would do something dumb like leaving my queen threatened and unattended. As with many budding CS students, I devised my own chess playing program, but in […]

## Visualizing Chatter on a Polar Plot

What does IRC chatter look like on a polar plot, with lines linking the conversations?

## Fibonacci v Primes: Cage Match!

Today I decided to more deeply investigate this curious math thing I discovered (for myself) – Plotting the Fibonacci numbers by Prime numbers each by a given modulo. “Fibo-what? Mod-what? So what!”, you say. :p tldr code: slice-seq and slice-seq.R For the mechanics, I use Perl to produce the data and R to visualize it.

## Growing Melodies

Ever since I heard about evolutionary programming, I’ve wanted to try it with music. On a recent weekend, I finally did just that! Some generated melodies are lovely in spurts but betray their purposlessness. …Some just sound like Metroid on drugs. The code is here: https://github.com/ology/Music/blob/master/bitstring-fitness Update with less dependencies: https://github.com/ology/Music/blob/master/ai-genetic