class: center, middle, inverse, title-slide # Communicating with data visualization ### Camille Seaberry, DataHaven ### March 15, 2018 --- # Goal of this workshop .font130[Data visualization is way too big a field to cover in one morning! But these are some starting places for improving your use of data visualization. I'm not a data viz genius, so probably any of the charts I've made here could be improved upon.] .font150[Follow along: https://camille-s.github.io/viz] --- # What is data visualization? .font110[ > *The representation and presentation of data to facilitate understanding* -- Andy Kirk, "Data Visualisation: A Handbook for Data Driven Design" > *Data graphics visually display measured quantities by means of the combined use of points, lines, a coordinate system, numbers, symbols, words, shading, and color* -- Edward Tufte, godfather of data visualization, "The Visual Display of Quantitative Information" ] --- # Maybe you don't need a visualization .pull-left[ <img src="index_files/figure-html/unnamed-chunk-11-1.png" width="576" /> ] .pull-right[ Chart serves *some* purpose, but you might be better off with just text: * Working men's median income is $51,367, compared to women's median income of $35,681 * On average, working men out-earn working women by $15,686 each year * On average, women earn 69 cents on the male dollar ] --- # Maybe you don't need a visualization .pull-left[ * A few overview stats---especially if comparisons wouldn't be appropriate ![from https://ct-data-haven.github.io/nhv2016/](nhv_profile_table.png) ] .pull-right[ * Bullet points ![from Community Progress Report 2016](cwi_bullets.png) ] --- # Questions to ask yourself .font120[ If you *do* need a visualization, be intentional about what you create What's your purpose? * Comparing two or more observations * Comparing values changing over time * Showing parts of a whole * Finding relationships between values * Placing numbers on a map * Distributions of values ] --- # Purpose ## Comparing observations <img src="index_files/figure-html/unnamed-chunk-13-1.png" width="672" /> --- # Purpose ## Parts of a whole <img src="index_files/figure-html/unnamed-chunk-14-1.png" width="672" /> --- # Questions to ask yourself .font120[ * Who's your audience? + Make charts for yourself to understand your data as well * What's the purpose? * What do you need to communicate? What's the takeaway? * What can you do without? ] --- # Focusing on your audience Example: boxplots Statisticians: 😍. General audience: 🤔 <img src="index_files/figure-html/unnamed-chunk-16-1.png" width="672" /> --- # Focusing on your audience General audiences often more concerned with averages or summary figures, not distributions. Or pair a simple chart with more detailed text like "Low-income rates vary greatly throughout Greater New Haven's census tracts, with rates in some tracts in the single digits, while many city tracts have rates over 50%." <img src="index_files/figure-html/unnamed-chunk-17-1.png" width="672" /> --- # What's the purpose? Hard to read, and unclear what the purpose is <img src="index_files/figure-html/unnamed-chunk-19-1.png" width="672" /> --- # What's the purpose? Purpose: show differences in income between towns <img src="index_files/figure-html/unnamed-chunk-20-1.png" width="672" /> --- # What's the purpose? Purpose: to show income by gender in each town <img src="index_files/figure-html/unnamed-chunk-21-1.png" width="672" /> Alternatively, could order by largest pay gap --- # Basic guidelines .font150[ * Figure out what you're trying to show, and why * Use an appropriate chart/visualization type * Map ink to values * Get rid of junk and distractions ] --- # Basic guidelines <img src="Which-Chart-Should-I-Use.jpg" width="2250" height="60%" /> --- # Basic guidelines .font150[Previous guide: Curtis Newbold, [The Visual Communication Guy](http://thevisualcommunicationguy.com/2017/06/05/which-chart-should-i-use/) More detailed guide to picking charts: http://annkemery.com/wp-content/uploads/2017/10/AnnKEmery-FSI-Visualization-Handout.pdf] --- # Bad habits .font120[ * Muddying your data * Telling inaccurate stories * Visual cues that are flashy but contribute nothing/interfere with understanding (see any cable news channel) * Unexamined use of pie chart, 3D, shadows, etc * Encoding information that isn't actually there---e.g. do you actually need all those colors? * Comparing things that are not actually comparable ] --- # Bad habits ## Data mud <img src="index_files/figure-html/unnamed-chunk-23-1.png" width="672" /> --- # Bad habits ## Fox News-ing your data ![fox news](Fox-News-bar-chart-1.jpeg) --- # Bad habits ## 3D If you aren't solving differential equations or plotting terrain, you probably don't need 3 dimensions. Where should you be reading values? <img src="3d_bars.png" width="480" height="70%" /> --- # Bad habits ## Pie charts Google "pie charts are evil." There's almost always a better way. <img src="pies.png" width="1050" height="40%" /> --- # Bad habits ## Pie charts Stacked bars are easier to compare between observations <img src="index_files/figure-html/unnamed-chunk-27-1.png" width="672" /> --- # Bad habits ## Visualizing information that isn't actually there <img src="index_files/figure-html/unnamed-chunk-28-1.png" width="672" /> --- # Few notes on visual perception .font120[ Visual perception is a huge field of psychological study. A few basic ideas: * It might be hard to show minute differences---but it also might not be necessary * Ink to value---e.g. scale bubbles to area, not diameter * Colors convey meaning + Cultural significance, emotion, politics + Color scales might imply direction ] --- # Few notes on visual perception Can you spot difference between tract with 20% rate and 25% rate? Is it really necessary? <img src="index_files/figure-html/unnamed-chunk-29-1.png" width="768" /> How would you compare poverty rates between non-adjacent parts of the region? --- # Few notes on visual perception Putting values into buckets makes it easier to spot patterns & differences---might sacrifice detail but gain clarity <img src="index_files/figure-html/unnamed-chunk-30-1.png" width="768" /> Now how easy is it to compare different areas? --- # Few notes on visual perception What do these colors signify? <img src="index_files/figure-html/unnamed-chunk-32-1.png" width="768" /> --- # Few notes on visual perception Do these colors tell the story of *change* more accurately? What meaning do we give to these colors? Red = positive values, but negative outcome (e.g. increase in low-income rate) <img src="index_files/figure-html/unnamed-chunk-33-1.png" width="768" /> --- # Activities! ## Find what doesn't work .font130[ In groups, visit WTF Viz [viz.wtf](http://viz.wtf/). Find your group's favorite example of what not to do, and discuss: * What went wrong? * What is the visualization's purpose? Or is the purpose not even clear? * How could you achieve this purpose differently? ] --- # Activities! ## Improve a visualization .font130[ Use the Data Visualization checklist to rate either a chart you or a colleague has made recently, or the chart on the next slide Checklist: [bit.ly/vizcheck](http://bit.ly/vizcheck) ] --- # Improve this visualization <img src="index_files/figure-html/unnamed-chunk-36-1.png" width="768" /> --- # Some improvements <img src="index_files/figure-html/unnamed-chunk-37-1.png" width="768" /> --- # Resources * [Data + Design free open source book](https://infoactive.co/data-design) * [Storytelling with Data blog, book, and podcast](http://www.storytellingwithdata.com/) - Cole Nussbaumer Knaflic * [Data Stories podcast](http://datastori.es/) * [FlowingData](http://flowingdata.com/) - Nathan Yau + Includes tutorials! + [How to Spot Visualization Lies](https://flowingdata.com/2017/02/09/how-to-spot-visualization-lies/) * [Policy Viz blog & podcast](https://policyviz.com/) + Includes lots of remakes of bad charts * [Junk Charts blog](http://junkcharts.typepad.com/) - Kaiser Fung * [Pew Research Center Fact Tank blog](http://www.pewresearch.org/fact-tank/) * [Catherine D'Ignazio](http://www.kanarinka.com/) + [What would feminist data visualization look like?](https://medium.com/@kanarinka/what-would-feminist-data-visualization-look-like-aa3f8fc7f96c) --- # Tools * [Data Visualisation Catalogue](https://datavizcatalogue.com/index.html) * [Data Viz Project - catalog](http://datavizproject.com/) * [Visualising Data blog & book](http://www.visualisingdata.com/resources/) - Andy Kirk + Includes huge section of tools * [Interactive Data Visualization Checklist](https://datavizchecklist.stephanieevergreen.com/rate) + [pdf version](http://stephanieevergreen.com/updated-data-visualization-checklist/) * [Makeover Monday community](http://www.makeovermonday.co.uk/) + Mostly Tableau-focused --- # Stuff I've made .big[ [DataHaven B-sides blog: ct-data-haven.github.io](https://ct-data-haven.github.io/) ] The code that generated these slides is on GitHub: https://camille-s.github.io/viz