• Home
  • Workshops
    • Overview
    • Scientific Writing
    • Peer Review
    • Proposal Writing
    • Online Workshops
  • Online Services
    • Writing Lab – NEW!
    • Writing Factory – Coming soon
  • About
    • Brian Cusack
    • Clients
  • Contact

Implementing the Grammar of Graphics

Posted on Aug 30, 2014
Rick Scavetta
0 Comment
Data Visualisation

This is the second part of a three-part Grammar of Graphics series (See part one). In this post, I want to explore how data can be represented in different ways. It is only when we take advantage of a plot’s grammer that we can being communicating results and uncovering interesting trends.

 

Case Study: Representing the Wage Gap

During my talk at re:publica 14, I presented a case study of a popular data set: the male-female wage gap. Highlighing the disturbing trend that women continue to earn less than men in almost every job is an important and frequent part of reporting. However, the data can be presented in many different ways. Consider the two possibilites below, which are coincidently both attributed to Simon Rogers, formerly of The Guardian and current data editor at Twitter.

 

Pay-gap-graphic-007

 

 

 

 

Tableau Pay Gap Data

 

Both plots suffer from a limited capacity to represent large amounts of information. This results from disregarding a plot’s inherent grammar and makes it difficult to see an overall impression of the data or convey a meaningful message.

The New York Times: Showing Trends in the Data-set

I like to contrast these examples with a similar attempt from the New York Times. Clicking on the link will take you to the interactive version, but I have reproduced their example below:

 

wage_gap

This representation allows for many more data points to be plotted simultaneously, thus providing an overview of the data’s structure. The diagonal guidelines clearly tell us what a dot’s position represents. It is in this format that we can see that not only do women earn less than men in most jobs, but that the wage gap increases the higher up the pay scale a job is. In addition, each sector claims a different portion of the plot, with service, sales and office jobs being generally lower paying than science, computers and healthcare, as we would expect.

In terms of the Grammar of Graphics. The New York Times has understood that mapping female and male wages to the y- and x-axes, respectively, would allow them to clearly convey many messages simultaneously. We may even go one step further and consider the statistics layer. Instead of plotting individual jobs, we can show trends within each sector using a local regression. This technique essentially traces the shape of the each sub-set, according to sector:

 

wage_gap2

 

 

Now, anomalies in the data set, such as the dip in the dark green line, become apparent. Such plots drive the conversation forward. Is there a problem with the data set? Which jobs cause the wage gap to appear so great? Why only in that area? In addition to anomalies, further trends can also be seen. There is a distinction in the wage gaps among the three high-paying sectors. In general, the management, business and financial sector has the worst ratio for high earners.

Conclusion

In this post we have seen two dramarically different was of dealing with the same kind of data. Thinking about the Grammar of Graphics led us to consider aspects of our data set we would not otherwise see. In my next post, I will elaborate on implementing the Grammar of Graphics plotting concept to show how it can be applied to a multivariate experimental data set.









  • Search:

  • Categories

    • China
    • Data Analysis
    • Data Visualisation
    • Our Vision
    • Presentation Skills
    • Proposal Writing
    • Scientific Writing
    • Statistical Literacy
  • Popular Posts

    • Toolmaking We shape our tools, and thereafter our tools shape...
    • Science's Lingua Franca is a PatchworkThe dominance of English in science can obscure the contribution...
    • Why Use R? R's 3 Core Strengths: Simplicity, Power, FlexibilityIn my experience, most biologists justify their continued...



  • Contact
  • Impressum
  • Privacy Policy
© 2012-2018 by Science Craft, Berlin
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.Accept Read More
Privacy & Cookies Policy

Necessary Always Enabled