Embrace me, surround me as the rush comes.drift deeper into the soundmore quotes

# making poetry out of spam is fun

In Silico Flurries: Computing a world of snow. Scientific American. 23 December 2017

# visualization + design

The 2019 Pi Day art celebrates digits of $\pi$ with hundreds of languages and alphabets. If you're a kid at heart—rejoice—there's a special edition for you!

# The art of Pi ($\pi$), Phi ($\phi$) and $e$

2019 $\pi$ has hundreds of digits, hundreds of languages and a special kids' edition.
2018 $\pi$ day
2017 $\pi$ day
2016 $\pi$ approximation day
2016 $\pi$ day
2015 $\pi$ day
2014 $\pi$ approx day
2014 $\pi$ day
2013 $\pi$ day
Circular $\pi$ art

This section contains various art work based on $\pi$, $\phi$ and $e$ that I created over the years.

Some of the numerical art reveals interesting and unexpected observations. For example, the sequence 999999 in π at digit 762 called the Feynman Point. Or that if you calculate π to 13,099,586 digits you will find love.

$\pi$ day art and $\pi$ approximation day art is kept separate.

All of the posters are listed in the posters section. Some also appear in the methods section, where I describe how they were made. Most of the circular art was made with Circos.

A path connecting segments traces out the digits of $\pi$. Here the transition for the 6 digits is shown. Concept by Cristian Ilies Vasile. Created with Circos.

Cristian Ilies Vasile had the idea of representing the digits of $\pi$ as a path traced by links between successive digits. Each digit is assigned a segment around the circle and a link between segment $i$ and $j$ corresponds to the appearance of $ij$ in $\pi$. For example, the "14" in "3.14..." is drawn as a link between segment 1 and segment 4.

The position of the link on a digit's segment is associated with the position of the digit $\pi$. For example, the "14" link associated with the 2nd digit (1) and the 3rd digit (4) is drawn from position 2 on the 1 segment to position 3 on the 4 segment.

As more digits are added to the path, the image becomes a weaving mandala.

## circos art of $\pi$, $\phi$ and $e$—transition paths and bubbles

I added to Cristian's representation by showing the number of transitions between digits in a series of concentric circles placed outside the links. This summary representation counts the number of transition links within a region and addresses the question of what kind of digits appear immediately before or after a given digit in $\pi$. The approach is diagrammed below.

The number of transitions to and from a given digit within a window of 10 digits is shown by circles. For a given digit segment (here, 9) each circle indicates the presence of a specific digit appearing before (inner track) or after (after track) the digit. Solid circles are used for the digit that appears most often and if all digits appear equally often, the choice is arbitrary. In some images the order of digits in the inner track is outward. (zoom)

The original images were generated using the 10-color Brewer paired qualitative palette, which was later modified as shown below.

For added visual impact, I inverted the color palette and added hue shift and vibrance effects.

The bubbles that count the number of links quickly draw attention to regions where specific digit pairs are frequent. In the image for $\pi$ below, which shows transitions for the first 1,000 digits, the large bubble on the 9 segment is due to the "999999" sequence at decimal place 762. This is the Feynman point, which I describe below.

Progression and transition for the first 1,000 digits of $\pi$. Created with Circos. (PNG, BUY ARTWORK)

The image below shows how this representation of $\pi$ compares to that of $\phi$ and $e$.

Progression and transition for the first 1,000 digits of $\pi$, $\phi$ and $e$. Created with Circos. (PNG, BUY ARTWORK)

The transition probabilities for each 10 digit bin for the first 2,000 digits of $\pi$, $\phi$ and $e$ are shown in the image below.

Progression and transition for the first 2,000 digits of $\pi$, $\phi$ and $e$. Created with Circos. (PNG, BUY ARTWORK)

## Feynman point

This sequence of 6 9's occurs significantly earlier than expected by chance. Because the distribution and sequence of digits of $\pi$ is thought to be normal, we can calculate how frequently we should expect a series of 6 identical digits.

For a given digit, the chance that the next 5 digits are the same is 0.00001 (0.1 that the next digit is the same × 0.1 that the second-nex digit is the same × ...). Therefore the chance that a given position the next 5 digits are not the same is 1 - 1/0.00001 = 0.99999. From this, the chance that $k$ consecutive digits don't initiate a 6-digit sequence is therefore 0.99999$k$.

If I ask what is $k$ for which this value is 0.5, I need to solve 0.99999$k$, which gives $k$ = 69,314. Thus, chances are even (50%) that in a 69,000 digit random sequence we'll see a run of 6 idendical digits. This calculation is an approximation.

It's fun to look for words in $\pi$. For example, love appears at 13,099,586th digit.

## A tangent into randomness

The digits of $\pi$ are, as far as we know, randomly distributed. Art based on its digits therefore as a quality that is influenced by this random distribution. To provide a reference of what such a random pattern looks like, below are 16 random numbers represented in the same way. They're all different, yet strangely the same.

Digit transition paths of sixteen 1,000 digit random numbers. (PNG, BUY ARTWORK)

## Circos art of $\pi$—heaps of bubbles

Below are more images by Cristian Ilies Vasile, where dots are used to represent the adjacency between digits. As in the image above, each digit 0-9 is represented by a colored segment. For each digit sequence $ij$, a dot is placed on the $i$th segment at the position of $i$ colored by $j$.

In a digit bubble heap, a digit is represented by a bubble and placed on the segment of its previous neighbour at the index position of the neighbour.

For example, for $\pi$ the dot coordinates for the first 7 digits are (segment:position:label) 3:0:1 → 1:1:4 → 4:2:1 → 1:3:5 → 5:4:9 ...

segment position colored_by

3       0        1
1       1        4
4       2        1
1       3        5
5       4        9
9       5        2
2       6        6

Because there is a large number of digits, the dots stack up near their position to avoid overlapping. The layout of the dots is automated by Circos' text track layout.

Progression and transition for the first 10,000 digits of $\pi$. Created with Circos. (PNG, BUY ARTWORK)

## spiral art of $\pi$

The Archimedean spiral embodies $\pi$.

By mapping the digits onto a red-yellow-blue Brewer palette (0 9) and placing them as circles on an Archimedean spiral a dense and pleasant layout can be obtained.

Why the Archimedean spiral? This spiral is defined as $r = a + b \theta$ and has the interesting property that a ray from the origin will intersect the spiral every $2 pi b$. Thus, each spiral can accomodate inscribed circles of radius $\pi b$.

Why the Brewer palette? These color schemes have some very useful perceptual properties and are commonly used to encode quantitative and categorical data.

The digits of π assembled along an Archimedean spiral.
Calculating (x,y) coordinates for each digit along the Archimedean spiral.
Distribution of the first 13,689 digits of π. (PNG, BUY ARTWORK)
Distribution of the first 3,422, 13,689 and 123,201 digits of π. (PNG, BUY ARTWORK)

I have use the Archimedean spiral to make art for $\pi$ approximation day

Pi Approximation Day Art Poster | July 22nd is Pi Approximation Day. Celebrate with this post-modern poster. (PNG, BUY ARTWORK)
VIEW ALL

# Two-level factorial experiments

Fri 22-03-2019
To find which experimental factors have an effect, simultaneously examine the difference between the high and low levels of each.

Two-level factorial experiments, in which all combinations of multiple factor levels are used, efficiently estimate factor effects and detect interactions—desirable statistical qualities that can provide deep insight into a system.

They offer two benefits over the widely used one-factor-at-a-time (OFAT) experiments: efficiency and ability to detect interactions.

Nature Methods Points of Significance column: Two-level factorial experiments. (read)

Since the number of factor combinations can quickly increase, one approach is to model only some of the factorial effects using empirically-validated assumptions of effect sparsity and effect hierarchy. Effect sparsity tells us that in factorial experiments most of the factorial terms are likely to be unimportant. Effect hierarchy tells us that low-order terms (e.g. main effects) tend to be larger than higher-order terms (e.g. two-factor or three-factor interactions).

Smucker, B., Krzywinski, M. & Altman, N. (2019) Points of significance: Two-level factorial experiments Nature Methods 16:211–212.

Krzywinski, M. & Altman, N. (2014) Points of significance: Designing comparative experiments.. Nature Methods 11:597–598.

# Happy 2019 $\pi$ Day—Digits, internationally

Tue 12-03-2019

Celebrate $\pi$ Day (March 14th) and set out on an exploration explore accents unknown (to you)!

This year is purely typographical, with something for everyone. Hundreds of digits and hundreds of languages.

A special kids' edition merges math with color and fat fonts.

116 digits in 64 languages. (details)
223 digits in 102 languages. (details)

Check out art from previous years: 2013 $\pi$ Day and 2014 $\pi$ Day, 2015 $\pi$ Day, 2016 $\pi$ Day, 2017 $\pi$ Day and 2018 $\pi$ Day.

# Tree of Emotional Life

Sun 17-02-2019

One moment you're :) and the next you're :-.

Make sense of it all with my Tree of Emotional life—a hierarchical account of how we feel.

A section of the Tree of Emotional Life.

# Find and snap to colors in an image

Sat 29-12-2018

One of my color tools, the colorsnap application snaps colors in an image to a set of reference colors and reports their proportion.

Below is Times Square rendered using the colors of the MTA subway lines.

Colors used by the New York MTA subway lines.

Times Square in New York City.
Times Square in New York City rendered using colors of the MTA subway lines.
Granger rainbow snapped to subway lines colors from four cities. (zoom)

# Take your medicine ... now

Wed 19-12-2018

Drugs could be more effective if taken when the genetic proteins they target are most active.

Design tip: rediscover CMYK primaries.

More of my American Scientific Graphic Science designs

Ruben et al. A database of tissue-specific rhythmically expressed human genes has potential applications in circadian medicine Science Translational Medicine 10 Issue 458, eaat8806.

# Predicting with confidence and tolerance

Wed 07-11-2018
I abhor averages. I like the individual case. —J.D. Brandeis.

We focus on the important distinction between confidence intervals, typically used to express uncertainty of a sampling statistic such as the mean and, prediction and tolerance intervals, used to make statements about the next value to be drawn from the population.

Confidence intervals provide coverage of a single point—the population mean—with the assurance that the probability of non-coverage is some acceptable value (e.g. 0.05). On the other hand, prediction and tolerance intervals both give information about typical values from the population and the percentage of the population expected to be in the interval. For example, a tolerance interval can be configured to tell us what fraction of sampled values (e.g. 95%) will fall into an interval some fraction of the time (e.g. 95%).

Nature Methods Points of Significance column: Predicting with confidence and tolerance. (read)

Altman, N. & Krzywinski, M. (2018) Points of significance: Predicting with confidence and tolerance Nature Methods 15:843–844.