data.bythebay.io: Akash Mukherjee, When Visualization Best Practices Fall On Deaf Ears
Recording: data.bythebay.io: Akash Mukherjee, When Visualization Best Practices Fall On Deaf Ears
[Applause] so the title may be a little bit Sensational but the talk is not so Sensational it's more uh real world uh trying to answer real world problems that we face so yeah I work at Facebook trying to uh we I do a lot of data visualization uh my team does a lot of dashboarding for um trying to report on questions like are people at Facebook happy people at Facebook are they growing um because it's very important for us to retain uh Talent there's a lot of competition about that so um what I'm going to talk about is so this is a story one year back when I joined Facebook uh there was another colleague of mine who join and very interestingly we had such contrasting backgrounds we were coming from and we were both tasked with um creating data visualizations to answer all of these questions uh about employees so when you get two people in a room who have different backgrounds have different approaches to solve a problem um you start debating and there is some um some healthy argument and conflict that comes into picture and that that actually helped me a lot starting to think uh about the the the the problem of data visualization in in many different ways so I was coming from a very uh data engineering background uh who had studied a lot of theory about data visualization uh studied academic papers and uh which have scientific research done by professors and universities also um got mentored by some data visualization experts uh whereas my colleague came from a very um good communication uh background she she used to work with salespeople she exactly knew what uh senior leadership uh what are the challenges senior leadership has um she uh knew things like how much time you have to send the message across to them what is the level of comprehension of information or data that consumers of dashboards have and you have to be able to speak the language so when we started this whole exercise both of us were kind of rigid in our own way own ways so um coming from a data visualization Community which is a very close-nit Community which is very active on Twitter uh and kind of criticizes a lot of bad visualizations done by journalists and people who are not trained so we try to think of problem in a very rigid manner like this should be uh done this way versus uh any other way um so we'll be without getting too much into that particular conversation we'll be looking into whenever you're trying to come up with a data visualization you'll always have to make tradeoffs or choices and there are going to be people who are going to op opinionate on whether to go with this or that so even like the simplistic thing like the first question someone would actually debate with you is whether to even use a chart at the first place or not you would be surprised that there are a lot of people who who actually prefer uh a table over a line even though uh it might feel obvious that a line is obviously visually more representative but uh it's it's depending on your audience what they prefer whether to use a pie or bar chart very debated in the data visualization Community right but you there are still a lot of people who want to see a pie chart and if your customer says I need a pie chart I mean if they want it you probably have to give it to them right so so how do you so so we we're going to look into this uh physical objects like angular gauges and funnels used a lot in uh visualizations traditionally but now they're being Tor down into like angular gauges have turned into bullet charts which which take a much lesser space and have higher perception for accuracy um again yeah funnels versus you could have just done this with with bars and it's much more accurately perceived so the the the fundamental difference between uh going by an academic approach is you're trying to tell see I will listen to you I listen to your problem but I think I'm an expert and I'm going to tell you how this is going to be done done but that's probably not the uh not the thing that your customer is looking for um also being being very uh rigid about making your visualization informative through an academic approach so I don't know if uh how many people here have are like read a piece about data visualization in a blog or a book or maybe met someone who knows a lot about data visualization uh yeah so so the the scientific research that's been done behind that it basically to to make it very simple and summarize there are these visual encodings position length color and shapes so these are kind of ranked by scientists like position and length is much better perceived than angles or colors when you are mapping quantitative data right the problem is if we always follow this approach we'll end end up with making bar charts line charts and Scatter Plots in isolation that visualization looks great and is very accurately perceived but when you start putting things together on a dashboard and start putting a lot of dashboards in a story or a slideshow and a lot of stories floating around in your company then everything looks the same so so the content is great but are you able to grab attention to your visualization to your dashboard so that the users even go there and see your content so sales people are really good at that and that's what you can learn from them right how do you package a solution how do you uh get attention of your dashboard you kind of need a mix of both because you don't just want to get attention and once they come there they're not able to perceive that information that's not great so yeah does your dashboard look like this because if it's all bars uh probably it has all the good information but it won't be clicked so and this is something that is talked about lesser um in the community uh so data visualization is fundamentally like a product um and you have to start we we should start thinking of it more like get increasing our click-through rate because in a company like Facebook there are thousands and thousands of dashboard floating around and for a VP uh a VP would have time to uh would have a time of like 2 minutes to spend on a dashboard so they need to reach your dashboard to get data so increasing increasing the click-through rate and also being good about data visualization is both um the goals of this exercise so on a high level there are three categories of disagreements that I have observed that could happen between these two schools of thoughts um one the first one is do you make your visualization very simple that's really easy to comprehend that's at a high level of versus something that's very informative and very detailed so uh thing to remember here is simple is great and a lot of one school of thought is like if you make something simple that's the best way to visualize anything but every time you you abstract uh uh some data you're kind of hiding complexities or details from that piece of visualization so uh this has been talked a little bit in stepen F's book of um why we should at times avoid traffic light visualizations uh there are advantages right if you can tell a VP that your business is green blue sorry green yellow or red uh you're kind of helping their job but you're also kinding kind of hiding that detailed uh level of information which is required for them to drive those actions um the second kind of second kind of disagreements that you would see is Some people prefer making very illustrative data visualizations whereas the other kind of people want to make it clean so 3D effects uh this one has been seen a lot by a lot of people very misleading use of Real World objects like gauges and funnels um CH junk I'm not sure if I'm not sure if everyone is aware with this term the idea behind the term chart junk is the maximum amount of in that's used on your dashboard should be because of the data and not because of anything else so here this monster is taking much more attention and the plane is taking much more attention when it could have just been a line um so yeah so this visualization could be basically turned into a simple line chart but am I saying that that the the visualization on the right is the correct way of doing things I'm not saying that although a lot of people do think that that that is the way to go about it but there are pros and cons of both and we'll look into that so if you start thinking about it this way like if this was done in a newspaper right if someone had put up a line chart like the one on the right people wouldn't even have gone through it so it's about the click through rate you have to get people's attention to your um to your data the the last kind of disagreement M you see is when people start approaching data visualization as a design question than as a information or communication question because data visualization is really communication communicating that piece of information so if you do design you're going to end up with this which means this this is uh like a funky shape uh of Pi which doesn't make any sense then uh in in a lot of infographics what you would see is uh labels wouldn't be present you would have legends that are missing you would have axes that are missing and uh then again a really nicely designed dashboard but you can't really make out what this is about there are no titles there are no subtitles so very well designed but lack of information so how do we find a balance between these two schools of thoughts so uh to to to decide between whether you do simple or um or detailed so the idea is to start small give the high level picture and then give drill Downs right uh so if you give drill Downs you're not abstracting away that piece of information which you uh need to provide the other way uh the other thing that you could do is whenever you're adding detail to your visualization make sure you add a information button on top of your dashboard explaining in text what this visualization is how to read about it because it might be very obvious obvious for you as a data visualization person to read charts but not for everyone else in the company and the third piece I really like this people like traffic light visualizations give them the red yellow and green but give them uh as it as an overlay on the detailed data like this one right so you don't lose the details and you also help them make decisions so clickbait I mean I kind of made this uh I think we can try this technique with dashboards I've been trying it a bit so okay this is controversial so Subway does did an advertisement like this to grab people's attention right so the idea is the same if people want pie charts give them the pie chart and then either present the the good data visualization on hover or as buttons to switch between visualization and get a better view so when you on bars you can more accurately represent that information but yeah um so this is done by a company called Dark Horse analytics let me play this uh so this is kind of funky they they take a py chart and they just convert it into bar uh through a nice animation Okay the third third way to solve these problems is um content is not enough and this is a little bit different from the clickbait way of grabbing people's attention but this is more genuine way of grabbing people's attention which is to add context like I said if if your dashboard looks like a bunch of collection of blue bars with with gray uh grid lines then you're not grabbing their attention so add context and make it easy for them to visit to understand what's going on so some people do a amazing job of adding context to their charts without uh compromising on the good data visualization aspect of things so on top you see those are just bar charts right uh he or she whoever designed this dashboard they did they use the right kind of charts but the fact that they added these casino chips immediately gives you a context that this is something about casino and something about chips and something about Revenue so that kind of gets your attention onto the dashboard and you're more curious about learning more about that dashboard another example so in a way this is chart junk but it's also adding context for people to look at your dashboard uh the beer bottle wasn't necessary but it helps this tells you this is like some sport food football a football game visualization right so some really good examples this again this could have been just just a scatter plot with dots floating around but the fact that that person added sun in there kind of tells you it's about sunshine I don't know if this is a great uh uh dashboard but I really like the food in here so I just added it so um okay and the last piece is design is important and Aesthetics is important so you have got the information right but if you have zero knowledge about colors and if you have zero knowledge about um good design then please make an effort and learn a little bit about it if you don't want to read about color theory you can like steal colors from good designers right uh so tone down the color of your axis and grid but don't get rid of your axis and grid and legends so if you if you want to like uh so like I said info infographics often remove the axis and remove the labels so it it's not worth removing them because then you're removing information but if you want to uh want them to be less loud then you can tone them down with a lighter color um and okay so declutter declutter is a very important aspect to look at like draw people's attention towards one thing because the more number of targets you have on your screen the Lesser each Target becomes so if you have 16 things happening on your dashboard then people will probably not know which to focus on uh this uh kind of shows a quick way of cleaning your bar chart from a slightly uglier one to a cleaner one and so in in this example what I'm going to show here what I'm going to show you is so 80% of the times I just made that number 80% of the times let's say 80% of the times you're probably going to be making bar charts right bars can almost do everything except for the scatters so even with bar charts you can kind of design bar charts differently uh and make your visualization stand out so I mean this is also kind of a bar chart this is a bar chart uh this is also bars actually these are stacked bars and just connected the dots this is bars looks looks different uh this is parts so design kind of plays a role it's the same chart but the way you're making your visualization stand out you're increasing the click- through rate on your dashboard because the end goal is they look at it and they accurately perceive the information if you can't bring them to your dashboard then there's no value of all the work that you put in in presenting that data um thanks uh if you have any [Applause] questions yeah sure a couple questions so on one slide I didn't understand why the bacon was red as on the bar chart um you know like a meat proportions history oh yeah bacon was red and the others were gray I some kind of color the or sales uh that's um for that particular visualization the person who designed it they wanted to highlight one value like maue yeah the max value yeah to call something out and then with the um you you called the casino chips you called it a bar chart but I I remember from a lecture that having um depth actually misrepresents proportion yeah right is that a little bit yeah not a best practice May good for you're you're that's a great Point thanks for bringing it up so uh in this case it kind of doesn't because I mean it could yeah it's also that we are kind of looking at the front view not completely we still see the top part a little bit yeah I know it it does it does skew it I'll I'll show you the one where it actually skews it right this the 3D Pi that we took a uh took a look at right um wow so yeah this this is a clear example where depth depth does skew and even for that you're right so yeah in most cases you should avoid it um this in this people uh does everyone here know what's wrong with the chart yeah anyone wants to call it out yeah the 19% looks bigger than 21% yeah exactly so so that's what happens and 3D visualizations again like most of the times they're terrible but there are some implementations which are done really good like you just have to use it the right way I think especially when virtual reality comes into picture then you can like when you start walking them through different angles of the visualization then probably you using that depth to the right uh to the right capabilities because you're being accurate about it yeah when you when you kind of pan your camera across the whole thing and uh you're using depth as an additional axis going behind maybe as drill downs but is that when you actually haven't seen access data or is this just yeah so it it depends you could have a z-axis data you could uh you could have bars that are going like this and also behind so there's a nice 3 visualization that I can remember I just don't have it right now there it was about uh people uh like Runners who who finished first or last so that they did it really well uh in 3D visualization yeah yeah okay I'll probably just take one last question here yeah have you got push back when you Tred to go against the academic Norms yeah uh oh yeah sure that's true uh so I think it's a lot about negotiation with people I would say I get more push in in in a business context you have to negotiate more with non-academic people right because there are more business people around you who haven't uh read data visualization you have to do more of that negotiation but yeah it's also the other way around like I could be beaten for showing chart junk as a as a good technique right and the other thing is uh uh this is how I feel and a lot of people feel about this thing is trying to be as open and flexible about thinking about these problem solving differently because as much as data visualization is a science it's also art so yeah we yeah okay thank you yeah take it [Applause] up