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
listen; there's a hell of a good universe next door: let's go.e.e. cummingsgo theremore quotes

data: iterative


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

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.

Analyzing outliers: Robust methods to the rescue

Sat 30-03-2019
Robust regression generates more reliable estimates by detecting and downweighting outliers.

Outliers can degrade the fit of linear regression models when the estimation is performed using the ordinary least squares. The impact of outliers can be mitigated with methods that provide robust inference and greater reliability in the presence of anomalous values.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
Nature Methods Points of Significance column: Analyzing outliers: Robust methods to the rescue. (read)

We discuss MM-estimation and show how it can be used to keep your fitting sane and reliable.

Greco, L., Luta, G., Krzywinski, M. & Altman, N. (2019) Points of significance: Analyzing outliers: Robust methods to the rescue. Nature Methods 16:275–276.

Background reading

Altman, N. & Krzywinski, M. (2016) Points of significance: Analyzing outliers: Influential or nuisance. Nature Methods 13:281–282.

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.

Martin Krzywinski @MKrzywinski mkweb.bcgsc.ca
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.

Background reading

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