Martin Krzywinski / Genome Sciences Center / mkweb.bcgsc.ca Martin Krzywinski / Genome Sciences Center / mkweb.bcgsc.ca - contact me Martin Krzywinski / Genome Sciences Center / mkweb.bcgsc.ca on Twitter Martin Krzywinski / Genome Sciences Center / mkweb.bcgsc.ca - Lumondo Photography Martin Krzywinski / Genome Sciences Center / mkweb.bcgsc.ca - Pi Art Martin Krzywinski / Genome Sciences Center / mkweb.bcgsc.ca - Hilbertonians - Creatures on the Hilbert Curve
Twenty — minutes — maybe — more.Naomichoose four wordsmore quotes

data: numerical


DNA on 10th — street art, wayfinding and font


data visualization + art

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Like algorithms?
Enjoy even more `\\pi` art.

Hola Mundo and Hello `\pi`

Art is science in love.
— E.F. Weisslitz

Cover design by Martin Krzywinski of Hola Mundo (Hannah Fry) / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Remix of the cover design of Hola Mundo by Hannah Fry. (zoom)
Cover design by Martin Krzywinski of Hola Mundo (Hannah Fry) / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Remix of the cover design of Hola Mundo by Hannah Fry. (zoom)
Cover design by Martin Krzywinski of Hola Mundo (Hannah Fry) / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Remix of the cover design of Hola Mundo by Hannah Fry. (zoom)

art and algorithms

Some algorithms connect us and some keep us apart—we need them to remind us what it is to be human and what it is to be a computer.

My cover design for Hannah Fry's Hello World: Being Human in the Age of Algorithms is based on my 2013 `\pi` Day art. The book is published by Blackie Books.

Cover design by Martin Krzywinski of Hola Mundo (Hannah Fry) / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Hola Mundo by Hannah Fry. Translation by Francisco J. Ramos Mena. Published by Blackie Books. Cover design by Martin Krzywinski. The front cover of the book shows a network based on the first 1,418 digits of `\pi`. (zoom)
Cover design by Martin Krzywinski of Hola Mundo (Hannah Fry) / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Hola Mundo by Hannah Fry. Translation by Francisco J. Ramos Mena. Published by Blackie Books. Cover design by Martin Krzywinski. The back cover of the book shows a network based on the first 837 digits of `\pi`. (zoom)

creating the cover

The cover begins with a 57 × 35 matrix of 1,995 colored circles. Each circle encodes a digit of `\pi`, starting with 3.1415.... Inside each circle is a smaller circle whose color is based on the next digit. The radius of the inner circle is `1/\phi^2` where `1/\phi = 0.618` is the Golden Ratio.

Cover design by Martin Krzywinski of Hola Mundo (Hannah Fry) / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
The beginning of the cover design. 1,995 colored circles encode digits of `\pi`. (zoom)
Cover design by Martin Krzywinski of Hola Mundo (Hannah Fry) / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Each circle has a smaller circle inside it that encodes the next digit. (zoom)

Once the circles are drawn, neighbouring circles that correspond to the same digit are connected with thick lines. The thickness of these lines is `t_0 = 3/(2\phi^2)`, relative to the outer circle radius. Circles that correspond to digits whose difference is `1` or `-1` are connected by a slightly thinner line with thickness `t_1 = t_0/\phi`.

Cover design by Martin Krzywinski of Hola Mundo (Hannah Fry) / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Neighbouring identical digits are connected with thick lines. (zoom)
Cover design by Martin Krzywinski of Hola Mundo (Hannah Fry) / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Neighbouring digits that are off by 1 are connected by thinner lines. (zoom)

More lines are drawn that connect digits with a larger difference, `|d| > 1`. The thickness for these lines is `t_d = t_0/\phi^{|d|}`. When all differences up to `|d| < 6` are accounted for, we get a pleasant jumble of lines.

Cover design by Martin Krzywinski of Hola Mundo (Hannah Fry) / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Neighbouring digits whose difference is greater than one are connected by progressively thinner lines. (zoom)
Cover design by Martin Krzywinski of Hola Mundo (Hannah Fry) / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Circles representing the digits of `\pi` with all lines connecting neighbouring digits. (zoom)

To accommodate the title and other text on the cover, the design was generated by avoiding drawing any circles within a certain distance of the text.

This way, the network of digits wraps around the text. In the final design, the front page has 1,418 digits and the back has 878 digits.

Cover design by Martin Krzywinski of Hola Mundo (Hannah Fry) / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Hola Mundo by Hannah Fry. Translation by Francisco J. Ramos Mena. Cover design by Martin Krzywinski. (zoom)
Cover design by Martin Krzywinski of Hola Mundo (Hannah Fry) / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Hola Mundo by Hannah Fry. Translation by Francisco J. Ramos Mena. Cover design by Martin Krzywinski. (zoom)

cover remixes

just the lines

Cover design by Martin Krzywinski of Hola Mundo (Hannah Fry) / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Just the connecting lines. (zoom)
Cover design by Martin Krzywinski of Hola Mundo (Hannah Fry) / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Triangle color is the average color of their corners. (zoom)
Cover design by Martin Krzywinski of Hola Mundo (Hannah Fry) / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Inner circles punched out. (zoom)
Cover design by Martin Krzywinski of Hola Mundo (Hannah Fry) / Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Just the triangles. (zoom)
VIEW ALL

news + thoughts

Yearning for the Infinite — Aleph 2

Mon 18-11-2019

Discover Cantor's transfinite numbers through my music video for the Aleph 2 track of Max Cooper's Yearning for the Infinite (album page, event page).

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Yearning for the Infinite, Max Cooper at the Barbican Hall, London. Track Aleph 2. Video by Martin Krzywinski. Photo by Michal Augustini. (more)

I discuss the math behind the video and the system I built to create the video.

Hidden Markov Models

Mon 18-11-2019

Everything we see hides another thing, we always want to see what is hidden by what we see.
—Rene Magritte

A Hidden Markov Model extends a Markov chain to have hidden states. Hidden states are used to model aspects of the system that cannot be directly observed and themselves form a Markov chain and each state may emit one or more observed values.

Hidden states in HMMs do not have to have meaning—they can be used to account for measurement errors, compress multi-modal observational data, or to detect unobservable events.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Nature Methods Points of Significance column: Hidden Markov Models. (read)

In this column, we extend the cell growth model from our Markov Chain column to include two hidden states: normal and sedentary.

We show how to calculate forward probabilities that can predict the most likely path through the HMM given an observed sequence.

Grewal, J., Krzywinski, M. & Altman, N. (2019) Points of significance: Hidden Markov Models. Nature Methods 16:795–796.

Background reading

Altman, N. & Krzywinski, M. (2019) Points of significance: Markov Chains. Nature Methods 16:663–664.

Hola Mundo Cover

Sat 21-09-2019

My cover design for Hola Mundo by Hannah Fry. Published by Blackie Books.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Hola Mundo by Hannah Fry. Cover design is based on my 2013 `\pi` day art. (read)

Curious how the design was created? Read the full details.

Markov Chains

Tue 30-07-2019

You can look back there to explain things,
but the explanation disappears.
You'll never find it there.
Things are not explained by the past.
They're explained by what happens now.
—Alan Watts

A Markov chain is a probabilistic model that is used to model how a system changes over time as a series of transitions between states. Each transition is assigned a probability that defines the chance of the system changing from one state to another.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Nature Methods Points of Significance column: Markov Chains. (read)

Together with the states, these transitions probabilities define a stochastic model with the Markov property: transition probabilities only depend on the current state—the future is independent of the past if the present is known.

Once the transition probabilities are defined in matrix form, it is easy to predict the distribution of future states of the system. We cover concepts of aperiodicity, irreducibility, limiting and stationary distributions and absorption.

This column is the first part of a series and pairs particularly well with Alan Watts and Blond:ish.

Grewal, J., Krzywinski, M. & Altman, N. (2019) Points of significance: Markov Chains. Nature Methods 16:663–664.

1-bit zoomable gigapixel maps of Moon, Solar System and Sky

Mon 22-07-2019

Places to go and nobody to see.

Exquisitely detailed maps of places on the Moon, comets and asteroids in the Solar System and stars, deep-sky objects and exoplanets in the northern and southern sky. All maps are zoomable.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
3.6 gigapixel map of the near side of the Moon, annotated with 6,733. (details)
Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
100 megapixel and 10 gigapixel map of the Solar System on 20 July 2019, annotated with 758k asteroids, 1.3k comets and all planets and satellites. (details)
Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
100 megapixle and 10 gigapixel map of the Northern Celestial Hemisphere, annotated with 44 million stars, 74,000 deep-sky objects and 3,000 exoplanets. (details)
Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
100 megapixle and 10 gigapixel map of the Southern Celestial Hemisphere, annotated with 69 million stars, 88,000 deep-sky objects and 1000 exoplanets. (details)

Quantile regression

Sat 01-06-2019
Quantile regression robustly estimates the typical and extreme values of a response.

Quantile regression explores the effect of one or more predictors on quantiles of the response. It can answer questions such as "What is the weight of 90% of individuals of a given height?"

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Nature Methods Points of Significance column: Quantile regression. (read)

Unlike in traditional mean regression methods, no assumptions about the distribution of the response are required, which makes it practical, robust and amenable to skewed distributions.

Quantile regression is also very useful when extremes are interesting or when the response variance varies with the predictors.

Das, K., Krzywinski, M. & Altman, N. (2019) Points of significance: Quantile regression. Nature Methods 16:451–452.

Background reading

Altman, N. & Krzywinski, M. (2015) Points of significance: Simple linear regression. Nature Methods 12:999–1000.