Data Science: An Introduction/Thinking Like a Visual Artist

 Data Science: An Introduction  Chapter 5: Thinking Like a Visual Artist



Chapter Summary
Five design elements—Harmony, Rhythm, Flow, Balance, and Focus—are essential considerations to think like a visual artist. A data scientist must think creatively to combine these elements together in appropriate proportions to convey the essential conclusions to the audience.

Discussion
There are a dozen or more "Rules of Thumb" to guide the data scientist to think like a visual artist. We will examine just a few.

Harmony
The Wiktionary defines Harmony as a pleasing combination of elements. In visual art, harmony is the concordant use of shape and color. Humans easily consume and thus are attracted to harmonious visualizations. A data scientist will want to make sure the visual representations of the solution blend together well. One aspect of harmony is to consistently use a coherent color scheme across an entire presentation. One popular set of color schemes is to take 3 or 4 adjacent colors from the color wheel, such as the "earth" tones on the upper right or the "cool" tones on the upper left. A "complementary" color scheme will take colors from opposite sides of the color wheel.


 * BYR color wheel.svg

Similarly, when building a series of charts and graphs, the data scientist will want to have a consistent layout across them all, including using the same symbols and typefaces.

Rhythm
The Wikipedia defines Rhythm as a pattern marked by the regulated succession of strong and weak elements, or of opposite or different conditions across time and/or space. When a data scientist discovers rhythms in the data, she must then consider how to communicate these visually. A sine wave shows a consistent rhythm over time.


 * Sine wave amplitude.svg

One useful device is to show deviations (blue line) in the data from the background rhythm (black line), such as this chart showing climate change over the last 550 million of years.


 * Phanerozoic Climate Change.png

Another example is a depiction of the simulation of two waves interfering with each other.


 * Interferring waves two stimulators simulation.png

A final example shows the correlated distributions between two variables. Because the highs and lows are off center but repeat symmetrically, the correlations are not linear, but regular and offset by a constant amount.
 * 2D CVCNs Patch4.png

Flow
The Wiktionary defines Flow as the movement of a fluid. In visual art, flow is the illusion of movement through the manipulation of color and form. The human eye will naturally follow visual cues in the image. A data scientist will want to make sure the visual representations of the solution tell a "story" by inviting the eye to move from start to finish. Peter Paul Rubens was a baroque Dutch painter that perfected artistic flow. In his painting, "Fall of Phaeton," one cannot but help move the eye toward the upper right.


 * Rubens-Fall of Phaeton.jpg

So it is with data scientists. Their analysis of the data leads to come conclusion. The trick to is to depict the that helps lead the recipient to the conclusion. Sometimes flow is an inherent component of the data, such as the depiction of a fluid moving around a solid, with the resulting turbulence.


 * Flow sphere.svg

Many times, the data represent concepts that are inter-related and those relationships are shown as a flow diagram, such as this one from the July 1987 Psychological Review.



Balance: Symmetry
Balance is an important visual cue. The simplest form of balance is symmetry. The Wikipedia defines Symmetry as self similarity across time, space, or scale. Human beings find symmetry comforting. Many living things show symmetry in space such as a butterfly.
 * Simetria-bilateria.svg

Humans also create objects with symmetry, such as buildings, like the Taj Mahal.
 * Taj Mahal, Agra views from around (85).JPG

A data scientist will play to the human preferences for symmetry in visually presenting the solutions to problems. In the following example, the four graphs show size symmetry—and three of them show scale symmetry. They are also placed so as to be both horizontally and vertically symmetric. This multiple symmetry aids in the understanding of the information being presented.
 * Training data NNNarmaL2.JPG

Balance: Rule of Thirds
While symmetrical balance can help an audience to feel comfortable with data presentations, asymmetrical balance is often more visually appealing. We are not talking about just any random asymmetry, but two particular asymmetries. The first one we will exam is the Rule of Thirds and the second is the Golden Ratio. According to the Wikipedia, the "Rule of Thirds" proposes that an image should be imagined as divided into nine equal parts by two equally-spaced horizontal lines and two equally-spaced vertical lines, and that important compositional elements should be placed along these lines or their intersections. Proponents of the technique claim that aligning a subject with these points creates more tension, energy and interest in the composition than simply centering the subject would.

In the example below, the picture has been cropped without and with the rule of thirds. The right hand picture has the mountain tops along the axis of the bottom third, the stone outcropping is positioned along the axis of the left third, and the clouds hover just above the top third.


 * RuleOfThirds-SideBySide.gif

Thinking like a visual artist means thinking of visualizing data in terms of the "rule of thirds." For example, the chart below takes advantage of the rule of thirds, by placing the horizontal rules in thirds, and added the comment on the upper horizontal rule at about the position of the (imagined) right-most rule.


 * Chart-Rule-Of-Thirds.png

Balance: Golden Ratio
Although somewhat similar to the Rule of Thirds, the Golden ratio is a much more well developed concept, both in mathematical theory and in application to real world problems. According to the Wikipedia, the "Golden Ratio" is defined as two quantities where the ratio of the sum of the quantities to the larger quantity is equal to the ratio of the larger quantity to the smaller one. The figures below illustrate the relationship.


 * Golden ratio line.svg

and


 * SimilarGoldenRectangles.svg

The golden ratio is expressed algebraically as:


 * $$ \frac{a+b}{a} = \frac{a}{b} \equiv \varphi,$$

where the Greek letter "Phi" ($$\varphi$$) represents the golden ratio. Its value is:


 * $$\varphi = \frac{1+\sqrt{5}}{2} = 1.61803\,39887\ldots.$$

Many artists and architects have proportioned their works to approximate the golden ratio—especially in the form of the golden rectangle, in which the ratio of the longer side to the shorter is the golden ratio—believing this proportion to be aesthetically pleasing. A golden rectangle can be cut into a square and a smaller rectangle with the same aspect ratio. Mathematicians since Euclid have studied the golden ratio because of its unique and interesting properties. The golden ratio is also used in the analysis of financial markets, in strategies such as Fibonacci retracement. The golden ratio is commonly used in everyday design, for example in the shapes of postcards, playing cards, posters, wide-screen televisions, photographs, and light switch plates. Studies by psychologists have been devised to test the idea that the golden ratio plays a role in human perception of beauty, such as female waist to hip ratio, male shoulder to hip ratios, and forehead to face ratios. While some early studies showed support for this hypothesis, later attempts to carefully test the hypothesis have been inconclusive.


 * One classic example of the application of the golden ratio is the Great Mosque of Kairouan, built in 670 AD in Tunisia. The golden ratio is repeated from the overall design to the individual rooms and columns. Not only is it one of the oldest places of worship in the Islamic world, is one of the most impressive and largest Islamic monuments in North Africa.  The mosque is a masterpiece of both architecture and Islamic art.


 * 3D computer modeling of the Great mosquee of Kairouan-en.svg


 * Another example is Salvador Dalí's The Sacrament of the Last Supper. The dimensions of the canvas are a golden rectangle. A huge dodecahedron, in perspective so that edges appear in golden ratio to one another, is suspended above and behind Jesus and dominates the composition. See an image of the painting at the National Gallery of Art.

As a data scientist develops more sophisticated analytical skills, she will also need to develop more sophisticated visual presentation skills. The Golden Ratio is one way to put analytical and visual sophistication in harmony with each other. One simple way is to divide up the presentation charts in sections like example below:



Focus
The Wiktionary defines Focus as the concentration of attention. The data scientist will want to create visualizations to draw the audience's attention to the important point. Visual artists create focus by contrasting size (scale), color, and page position. It is important to make sure the visual elements have a function that supports the content. For example, in Francisco de Goya's painting, "The Vintage," he wants to highlight the grape harvest. First, he uses a triangular positioning of the people so that the grapes are at the apex of the triangle. He also places the grapes in the center of a bright (triangular) cloud that is surrounded by a dark cloud. He masterfully uses both design and color to bring focus to the subject of his painting.


 * The Vintage, Francisco de Goya.jpg

Here is a good use of focus to highlight conclusions based on data. The following charts depict above and below average country GDP per capita from the World Factbook and malaria risk by country from the Centers for Disease Control.


 * Average GDP PPP per capita.PNG


 * Malaria map.PNG

Creativity
The data scientist must use creativity to combine these five elements (Harmony, Rhythm, Flow, Balance, and Focus) together in appropriate proportions to convey the messages in interesting and informative ways to the audience. The creative process includes divergent thinking, which involves the generation of multiple answers to a problem; conceptual blending, in which solutions arise from the intersection of two quite different frames of reference; and, honing, in which an acceptable solution emerges from iterating over many successive unacceptable versions of the solution. In practice, creativity is often a team sport. When several people from diverse backgrounds come together to solve a problem, they can more easily engage in divergent thinking and conceptual blending. Honing is just good, old-fashioned elbow grease. Please do not fall in love with your first attempt. Think of your first attempt as the beginning (not the end) of a conversation that will engage both members of the data science team, as well as members of the potential audience for the team's findings.

The following graph is a good example of a science graphic using all five visual elements. See if you can see how harmony, rhythm, flow, balance, an focus are used.
 * The image shows that the atoms in a molecule can be modeled as charged spheres connected by springs that maintain bond lengths and angles. The charged atoms interact with each other (via Coulomb's law) and with solvent. The shroud represents the region of hydrophobic repulsion, where the strength of the hydrophobic effect is approximately proportional to the surface area of the shroud. The shroud, shown extending only over the back of the molecule actually extends all the way around it. The model shown is called a molecular mechanics potential energy function, and it is used by programs like Folding@Home to simulate how molecules move and behave. The molecule shown is an alanine dipeptide.


 * MM PEF 3.png

Assignment/Exercise
Use R to create some tables and plots. Get into groups of 2 to 3 students. Try to work with at least one other person you have not been a group with before. Be sure everyone in your group understands all of the R code as you execute it. Let's start by examining a categorical variable.

Let's try exploring a continuous variable.

Now try this simple plot.

You will need to add the library "calibrate" to your R workspace in order to use the "textxy" command in the following example. Use the "package manager" and "package installer" commands from the R console pull down menus. The packages chapter in the R programming Wikibook is a place to start.

Now, let's replace that first plot command with the following.

Be sure to print out a copy of that plot to use for reference.

Now, let's try changing the colors.

And, now let's change the size of the points in the plot

Finally, let's draw a line through the points.

Copyright Notice


You are free: Under the following conditions:
 * to Share — to copy, distribute, display, and perform the work (pages from this wiki)
 * to Remix — to adapt or make derivative works
 * Attribution — You must attribute this work to Wikibooks. You may not suggest that Wikibooks, in any way, endorses you or your use of this work.
 * Share Alike — If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.
 * Waiver — Any of the above conditions can be waived if you get permission from the copyright holder.
 * Public Domain — Where the work or any of its elements is in the public domain under applicable law, that status is in no way affected by the license.
 * Other Rights — In no way are any of the following rights affected by the license:
 * Your fair dealing or fair use rights, or other applicable copyright exceptions and limitations;
 * The author's moral rights;
 * Rights other persons may have either in the work itself or in how the work is used, such as publicity or privacy rights.


 * Notice — For any reuse or distribution, you must make clear to others the license terms of this work.The best way to do this is with a link to the following web page.
 * http://creativecommons.org/licenses/by-nc-sa/3.0/