These graphs show the “emotional valence” or sentiment over narrative time percent. That is, they chart the positive and negative valued sentences from beginning to end. A positive valued sentence would be, “I feel good.” A negative one of equal value would be, “I feel bad.” A neutral sentence would be, “I feel okay.” If […]

## Visualizing Vocalization with R

One day I decided that I wanted to have the ability to see a frequency x time “amplitude density” plot of sound – specifically dolphin and bird voices. So the first task was to locate some sounds! Preferably these should be free from all other sounds, including those from the ambient environment – splashing, microphone […]

## 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, […]

## The Density Plot of the Prime Gaps is a Fractal

tl;dr: Inspect the last image below and check out gap-density.R. I just discovered something that made me smile: As I looked at the density plots of increasing numbers of prime gaps, a fractal emerged. Allow me to explain. First I get the prime gaps (basically, the distance between primes) with this perl code:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
#!/usr/bin/env perl # gaps-simple: Print the gaps between primes use strict; use warnings; use Math::Prime::XS qw(primes); my $limit = shift || 100; my @primes = primes($limit); my $n = 0; while ( $n < @primes - 1 ) { my $prime = $primes[$n]; my $greater = $primes[ $n + 1 ]; my $gap = $greater - $prime; print "$gap\n"; $n++; } |

This […]

## Alternatives to the Logistic Equation

tl;dr: bifurcation.R Yesterday, I decided to plot the bifurcation diagram of the logistic equation. This is a famous plot from the 70s, that many geeks will be familiar with (left). It shows that simple systems can switch into “chaos mode” and begin to bifurcate wildly. To produce the graph, we use code in the R […]

## 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 […]

## Successive Old Faithful Eruption Durations

Because of the observed data, a four group clustering emerges when you plot successive eruption durations, of the famous geyser. That is, the x axis is the first eruption and y is the next.

## 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 code: https://github.com/ology/Math/blob/master/slice-seq and https://github.com/ology/Math/blob/master/slice-seq.R For the mechanics, I use Perl to produce the data and R to visualize it.

## Visualizing US Presidential Elections

I am a curious cat by nature, and a visual one at that, so back in 2012 I made a little scatter plot of the popular votes in the recent presidential election… { “tl;dr” : “https://github.com/ology/Election-Viz/ & 1900 to 2012 elections” }