Data, Design, Meaning
Idan Gazit · Reversim Summit 2013 transcripts · Markdown
Machine transcript. It can contain errors. Click a time to play the video from that point.
00:06 So, hi. I'm Idan. Please. Coming. Uh so I'm going to be talking uh about data visualization. Um So yeah, let's get started. Um, so for those of you who don't know me, um I'm Idan. I'm a a designer, developer, hyb, I guess, is the best way to describe it. Um, who here has heard of Django? Awesome. Um, so I'm one of the core develop like I'm one of the people that write writes Django, that builds Django. I'm a core developer, core contributor. Um, and uh for my day job, I have like a data visualization consultancy called Umbrella, and we're actually working on our our first like standalone product, which is called Pushpin. It's like analytics for Geo. Like if you have mobile apps and you want to know where people are doing things as opposed to just that they're doing things, then yeah, then check us out.
01:07 We'll be live soon with a really minimal, minimal viable product, which means that it'll be like totally ugly and terrible, but whatever, hopefully you'll still see that it's useful. So, yeah. Um, and I love visualization. I really love it. It's like the perfect field for somebody like me because I have this this mix of of developer and designer in me. Um, and you really need both of these skills in order to build a good data visualization. You need to understand the data side and you need to understand the design side to bring it all together into something um that's uh that's work that that works. Um, but data visualization is still like it's never going to be something automatic, right? You're never going to be able to like import visualization and like be done. You're always going to have to have some human to derive this middle step between the data and the meaning. Somebody that understands how to tell a story. Because that's what data visualization is essentially about.
02:07 You're telling a story with data, but it's still a story and good stories come from people. Um, they have to engage the uh the person that you're telling the story to on an emotional level. Um, and so how do you go about telling these stories with data? I'm going to be talking about, you know, a bunch of these um strategies or techniques and high-level ideas that you can go and apply, even if if you're not actually building them yourselves, just so you understand a little bit about how to go about building these things. Okay, so Ben Fry is a famous guy invented the processing language, which is a popular language for doing all sorts of data visualization or at least drawing things. He came up with something that he coined, he called it the seven stages of data visualization. Um, and uh, so the first four are actually sort of more developer oriented. Um, you know, you have to acquire uh the data that you want to work with. You have to parse it. You have to understand how it's built, how it's structured so you can start working with it. You have to filter out the parts that don't uh have any meaning for you, or don't have meaning for your story.
03:09 And then you have to mine what's left for uh your story, for the meaning. Um, those four happen when you're working with the data. Actually, the last three are the design parts, right? Uh, how do you take your data and actually turn it into something um that represents meaning for your viewers? I'm not actually going to be talking about the first four. I'm a Python guy. I think Python is great for the first four, but it doesn't really matter. Like any language will be, you know, helpful to some degree or another uh with the first four. I'm going to be talking more about the last three today. Um, right. So, creating meaning out of da- meaning out of data is hard. Um, even if it's just for yourself. And communicating that meaning to other people is even harder. Um, and the best visualizations let the people who are viewing the visualizations come up with their own stories to derive their own meaning from these visualizations. You there's lots of visualizations that take you like on a track and they explain to you, this is what you should understand and this is what you should understand.
04:09 But the best ones are ones that let you explore and find stories for yourself. Um, so yeah. So what is a visualization, right? Um, it's a super set of charts. Everybody looks at charts, they thinks it's a visualization, and that's true. Um, but um all visualizations deliver meaning through the visual display of information. But there's a big difference between charts and visualizations. Charts um tend to be one-dimensional, right? Um, there's not a lot of information that you can convey in one dimension. And some of them are maybe two-dimensional like time series data. You have some time and you have some value, and bam, you've got two dimensions. Um, but good visualizations tend to be highly multi-dimensional. They encode a lot of different kinds of data, and I'm not talking about 3D. I'm talking about encoding four, five, six, 10 different axes of information into some visual representation that we can make sense of. And that sounds tricky, but when you look at good data visualizations, they're actually conveying all these things.
05:13 So, this is an infographic, right? Um, and I actually don't think that this is a visualization of any kind. Um, people talk about visualization and infographics interchangeably as if they're something that can go together. But I don't think it's actually true. Here, what we have is actually a bunch of top 10 lists and a couple of charts, um very simple charts, just arranged in and attractive manner. It's pretty. Um, but I don't think it actually conveys a lot of meaning. It doesn't encode all these like layers of information into something that I can tell an interesting story with. This is probably one of the earliest examples of data visualization out there. It's created in 1869 by a French engineer named Charles Minard. Um, and um you probably don't read French, and you probably can't read the really small text. Um, and even if you could, um it's kind of hard to make out. What this is a visualization of is actually Napoleon's army as it marched all the way to uh Moscow and back.
06:16 Um, and it chose the size of the army as it marched. It gets smaller and smaller as they march as people die out. Um, um, and it correlates this to the temperature, like how balls freezingly cold, like up is colder. Um, uh, how cold it was all the way to Moscow, and then how many of the army actually made its way back, right? The black line is the return, like the march back. Um, um, and even along the way there was like a whole chunk of army that just was just like, okay, you know, we're giving up now. Um, uh, and here we have, you know, probably one of the first uses of uh of like a 2D data visualization that encodes a lot of information into one space. It's it's something novel. It was not standard, um, but it still worked and it uh was a fantastic find at the time. Another fantastic data visualization is the periodic table of elements. Everybody remember this from chemistry?
07:16 Yeah. So, in also in 1869 uh uh a Russian gentleman named Dimitri Mendeleev, Mendeleev, Mendeleev, something like that, published the periodic table of elements. Um, before uh the periodic table of elements, everybody looked at a list of elements like a list. It was just a list. You know, here's the atomic weight, here's the uh the name of the element, here's some other bits of information about it. It was a plain list. Here was the first one to sort of look at this list and try and draw these connections, these relationships between these different elements and lay them out in a fashion that had more meaning, right? He grouped elements with specific properties um and he provided um sort of meaning through structure. So, one of these groups is the noble gases, right? When you look at this, this is like a well-defined group in the periodic table of elements. Sometimes it's colored a different color. Um, and these are all elements that happen to have their outer shell full, which means that they're chemically unreactive with other elements. They're noble. They don't interact with, you know, the common elements of the table.
08:16 Um, and that's awesome. Um, but it's not just that. When you look at this this table, there's actually um uh you can infer all sorts of properties um if you know things about the elements that are to the left and to the right of the element that you're interested in, you can make all sorts of educated guesses about the element that falls in between, right? And actually, this property was used to um postulate the existence of elements that nobody knew about when this was like in 1869. This is all stuff that's like product of like, you know, like nuclear accelerators. This didn't exist in 1869. But when they built this table, they had this gap here. And they looked at this gap and they're like, well, something should go there. But we don't know what it is yet. The fact that the information was actually structured in this table actually helped them discover these new elements. It added meaning where there was no meaning beforehand. Here's something a little bit more modern. This is called the porcupine chart. It's invented by Amanda Cox at the New York Times. She's like known as the Queen of Data Viz at the New York Times.
09:18 She's really good. Um, and uh basically what this is, it's a uh a chart of uh the US budget like surplus, forecast, deficit um over time. Um, and the little like the light blue lines are the projections, right? Um, so what you're looking at here is is the dark blue is the actual and the light blue is at any given time, how did we think we were going to be doing in the future? And you can see uh here that sometimes they underprojected, sometimes they overprojected. Almost nobody caught this, right? Um, and here we have this whole other layer of meaning, right? Of how optimistic or pessimistic were we? This is a chart of of of optimism, not of budget surpluses. Um, so yeah, this is another fantastic kind of encoding of meaning onto data. Um, and a final uh really modern. This is from the the most recent um presidential elections. This is by Mike Bostock, who wrote uh the fantastic uh visualization library called D3.
10:20 If you've ever messed around with it, it's fantastic. Um uh and he actually showed uh the uh the motion of states from election to election because in the US, right, every state votes uh people in the state vote and then the state as a whole goes to one candidate or the other. So he actually showed how the different states have behaved over time. This is a fantastic interactive visualization that lets you track how states have behaved over time, how they move to the left, and to the right. Um and you can actually control and shuffle and sort by all these different variables. Fantastic visualization, a lot of different layers of meaning. Okay. So you have some data, right? And you want to make one of these. Um what do you do first? Well, the first thing is basically inception. You have to find like the smallest possible way to represent your idea. You're going to be trying to plant like a very complex thought in somebody's head. You got to find like the simplest representation of that thought. If you have some story you want to tell, figure out what that story is in a sentence. Start there and until you have that sentence, don't even start looking at visual representations, don't even download the data yet because you don't have like a story yet. You need to have a really tight, compact story. If it's too complicated, you're going to have trouble getting that story across. Even the best people in this business have trouble getting complicated stories across. So keep it simple, make it as simple as you can possibly make it.
11:46 And you might not have a good idea of exactly the story you want to tell, um, um, before you get to, you know, this sort of dividing line. And that's okay. Um, sometimes you don't know what story you really want to tell until you've worked with the data. You feel like there might be a story in there, you want to tell a story about optimism and pessimism, you want to tell a story about about how people move and where they go. You want to tell a story about, I don't know what, but you don't know exactly what the body of that story is. Fine, you can discover it as you go, but you need to have like a general idea before you get to the stage that you're actually designing the visual representation of your data. Now, there are a lot of ways to, uh, confuse or mislead your audience, um, right? Even by mistake, not on purpose. Um, so here's actually like, you know, a couple of, uh, no-nos that you should definitely not do. First of all, it it you have all this data, it's tempting to throw your data at, you know, the viewer and let them sort it out for themselves, right? It's very tempting. Say, just give them everything. Um, and this is actually, uh, a kind of failure. Uh, you have to resist that temptation because, uh, you need to think about the meaning you'd like to supply to your audience. If you just give them the data, then they're just going to drown in the data. They're not going to stick around to find the meaning. You need to supply that story to them, in the same way that a good writer supplies that story to them. A good journalist will supply a little bit of story, even if they give you all the background and the facts, they still take you on on a ride. You want to take your people along for a ride.
13:16 Um, and this sentiment really extends to everything. Anything that you do in data visualization, anything you do in products, anything you do in design, you want to get rid of everything that isn't critical to whatever story you're telling. Um, cuz the more crap you have, the more likely the people and users and whatever are just going to get lost. So, help people not get lost. Edward Tufte, who's a famous, um, I don't even know what to call him. He's just famous in this field of data visualization. He's written a bunch of important books. Uh, he coined this term called data-to-ink ratio. This is before there were pixels. Um, and the data-to-ink ratio is very simply put, it if every pixel in your visualization or every droplet of ink, um, um, how many of those droplets of ink or those pixels are conveying data, conveying meaning, and how many of them could you take out without altering the meaning, right? Now, in a perfect visualization, like the idea of visualization, has a data-to-ink ratio of one, which means that every single pixel that's lit up on screen is conveying meaning, and if you change that pixel, you would be changing the meaning.
14:26 Okay? If you think about like a bar chart, if all you have is the bar, if you took off one pixel from the top of the bar, that bar is shorter, all of a sudden the meaning is different, right? But if you take the grid lines away, does that change the meaning? No, it actually doesn't. Um, so there's a lot of things that you can do around data-to-ink ratio. You have to strive or at least try to get to one as close as you can. Um, so yeah, so here's a concrete example. This is a fantastic, uh, example from one of my favorite books called Designing with Data by Brian Suda. Um, I highly recommend it if you're looking for an introduction to the field. Just get this book online, it's available as a PDF, it's great. Um, and he shows this this fantastic progression of how to take, you know, this chart. And this chart is it's it's pretty clean, it's pretty good. There's not that much here. It's not terribly confusing, but even this can be made better. So, first, you know, we can start by just dimming out these lines, right? Um, we're not actually taking pixels away entirely, but we're reducing their visual weight, and I think that counts for something.
15:30 Um, uh, it makes the graph maybe a little less cluttered. It puts the focus on the data instead of the supporting metadata. Um, but in reality, we don't actually need most of these lines. You can take most of these lines away and the meaning remains. And already, just by taking these lines away, we're emphasizing like the natural range of the data, um, more. We're showing the viewer that the range is between 32 to 58 instead of showing them all this space and junk underneath and above and around. And finally, in a lot of cases, you don't actually need the lines. Sometimes you can do more just by taking things away. A gap can be just as meaningful as a line. Um, and I'll talk in a couple of minutes about, um, some properties of vision that actually affect this. Um, but when you look at this and you look at the original one, we're conveying the same meaning with a lot less pixels. Um, it's a lot cleaner in my eyes, a lot prettier, um, a lot easier to understand than the original one. Um, because there's less, less to be thrown at me. Less for me to process, less cognitive load. Who here is read anything by, uh, Daniel Kahneman?
16:36 Okay, a few people, awesome. He's like a famous cognitive psychologist, writer, he's an awesome guy. Uh, and he actually, uh, wrote in his latest book, Thinking, Fast and Slow about, um, how we perceive whether something is true or not or how likely we are to believe that something is true. And basically, he makes a direct correlation between cognitive load and our ability to be persuasive. If persuaded, if you're making me think a lot, then it will be much harder for you to convince me that what you're telling me is true. So, if you want to convince people of something, you need to make sure that the idea goes into their brains smoothly. No speed bumps. This is a good way to do that. Unfortunately, um, most of our like newspapers are filled with this, right? This is like the, like exact opposite of the chart that I just showed you. If like there was a data-to-ink ratio here, it would be like asymptotically approaching zero. Um, because there's almost no data and there's 100% pixels.
17:40 Um, and there's a name for this also coined by Edward Tufte, he called this chart junk. Don't do chart junk. Like just get rid of everything that doesn't matter, everything that doesn't tell the story that you want to tell. Um, except this isn't the worst of it. The worst of it is is is when you lie. Even if you assume that you have like the best of intentions and you're not going to show any chart junk and you're going to take as much data away, you can still find ways to shoot yourself in your users in the foot. Um, who here saw the famous Apple keynote with this chart? Okay, so don't, don't give away the end of the story. Um, which here is like the biggest slice of the pie? Just shout out a color. Red, blue. Red, blue. Okay. They're all the same. Okay? And this is lying with data. This slight angle, this 3D angle and it's it's so easy to do this because like keynote and PowerPoint, whatever, they all give you these fancy 3D charts for free. Um, even though they reduce your data to ink ratio.
18:42 Um, this is actually a kind of lying because because of the perspective, because the thing looks like it's tilted a little further back, um, then the bottom slice looks bigger. It it it's perceptually bigger. And if you don't label your stuff carefully, people might actually think that the bottom one represents a larger chunk of data than it does. Um, so be careful not to lie with your data. Make sure to always present your data honestly. It's easy to fall into this trap, especially with like modern tools like PowerPoint, whatever. Right? If you forget everything I'm going to say from this point out, just what I've talked about so far will serve you well when you're like doing data visualization. From here on out, we're going to talk about like more like practical stuff like vision, right? We're talking about visualizations. By definition, whoever is going to be seeing your visualization is taking it in through their eyeballs. So it makes sense that we should know a little bit about how eyeballs and vision in general work. Um, so we can use that knowledge to our advantage to make the best possible delivery like method for our information, for our story.
19:46 Um, so Gestalt theory of perception, um, arose in like the late 1800s, also around the same time as this Mendelev guy and and Menard, the guys who did those early visualizations. And roughly, I'm totally like screwing this up for sure, but basically it says that perception is more about the relationships between things and what we see, and less about the actual things that we see. Um, um, And that actually makes a kind of sense because more often than not, meaning is about relationships, right? What's related to what, what isn't related to what, how are they related? These are the things that that are these are sort of like the vehicles in which meaning is delivered. Um, and this theory or this set of theory is identified these six different kinds of of visual relationships. Um, visual relationships that we have been practicing since the moment we first open our eyes as babies, right? We do this automatically now. Um, so, um, let's go over them, right? Proximity, right? Things that seem closer together seem like a group.
20:51 Here, I have like these dots, but it seems like I have four groups of five. Similarity, things that look the same seem to be a group. Enclosure, a shape enclosed by another shape seems to be a group. So far, these are obvious and the most obvious one is connection, obviously. Like, if you have two shapes that are like attached somehow, then they're clearly uh related, right? And the last two, I think, are the more interesting ones. Um, continuity. We see this as two lines crossed. We don't see this as four lines meeting in the middle. right? Even though it could be, it could be four lines meaning in the middle. But that's not how we see it automatically because our brain makes the shape continuous. And the final one, and this is the most interesting one, is closure. Closure is when our brain figures out what's missing and and adds that information for us automatically. Um, when we look at this thing, everybody sees a rectangle. You don't see uh or if you'd ask like a random person on the street, what is this? They'd say, it's an incomplete rectangle. I don't think many people would be like, well, it's three line segments. Okay?
21:51 Uh and this, by the way, is the trick that makes the gaps in the charts that I was talking about, you know, instead of using a line, use a gap. This is what makes it possible, right? Closure. Um, Um, here's some more cool properties of our brains, right? We're very good at judging like orientation of things when they're vertical versus horizontal, right? Um, like when you look at these, like, which one is unsafe to step on? Okay? It doesn't take you any time. Like you look, you immediately know which one is like, oh, that's that's a dangerous one right there. That's the nail. Okay? But when we look at things that are at an angle, um it's not quite so clear. It's not that you can't figure it out. If I asked you to to sort these in order of how like angled they were, it's not that you couldn't do it, but you have to like, you know, you know when you like open like a site with flash on your computer and you hear the fans like melting your CPU down, this is roughly like the experience I have in my head when I look at this and try to do that. Um, and that's the experience that everybody will have. We're actually kind of bad at doing this.
22:52 Um, a practical takeaway from this is that if you're ever going to show people a lot of gauges, right? Especially when you want them to compare one gauge to another, that's a bad idea. Because people are very bad at doing exactly that operation of, you know, exactly what angle is more than the other angle. We're only good at doing vertical versus horizontal. shapes, more cool stuff. We're good at picking out different shapes, right? Um, but like uh above like, you know, uh like when it gets too cluttered, when we get like above a a certain density and the size of the shapes becomes small enough, um, then our ability to do this breaks down, right? When you look at this, if I asked you to pick out like only all of the squares, again, it's not that you can't do it, but you have to fire up a lot of your brain in order to do that. And that brings us to the most interesting property, which is color. Um, and color is special. Um, when you look at this now, it's absolutely effortless to pick out all the squares, right?
23:53 Um, compared to the previous one. Um, That's because color is special. Color is actually delivered to our brains um like pre-decoded. It's called pre-attentively processed. Um, like all the color information is like unpacked on the way to our brain. And when it comes to our brain, that information is already there for our brain to work with. Don't ask me how. This is what Wikipedia tells me and like all the books I've ever read on perception. I am not a cognitive scientist. I only play one on TV. Blah, blah, blah, like go do your own science. But um um that's why this color scatter plot feels so easy to interpret um because it comes to us for free. Our brain does that work automatically for us. Um, so yeah, so look at these two for a second and see what I mean. It's pretty awesome. But really, the most interesting property of color is that it allows us to encode another axis of information onto whatever other visualization we're doing. Like right here, I have two axes, but if I add color, bam, I've got three.
24:54 Okay? All of a sudden, I can start attaching more layers of meaning. Um, Excuse me. And in fact, with thoughtful use of color, you can encode more than one dimension of information in color. You can encode two, and in certain cases, three dimensions of information just inside color, right? You can work on value, like how bright or dark something is, and you can work on hue. So all of a sudden, you can encode a lot more information, like two or three more dimensions of information just by using color. Now here, um, I'm using like a a two-dimensional thing, but if you want to generate these sort of Spectra on your own and you want to like use color to convey meaning, you actually have to understand a little bit more about how our vision works on like a physiological level. So, um, the bits in our eyes, which sense like light versus dark, are called rods. Um, and the bits in our eyes, like inside our eyeballs, that sense color are called cones.
25:54 Um, and they come in three different variety: short, medium, and long. Um, they happen to correspond to the wavelengths that they sense, right? Like blue wavelengths are short, green is medium wavelengths, and red are the long wavelengths. Everybody remembers this from physics, like a long, long time ago. Yes? Hopefully. Great. Um, now, with a bit of simplification, this is roughly how it works. There's actually some overlap, they don't like, you know, it's not like one senses from here to here and the other senses from here to here, and you know, there is a little bit of overlap. And so it turns out, our scientific theory says that our brains don't actually record these inputs the way that like we think about computers recording these inputs. It's not like we have a red channel, a green channel, and a blue channel, and our brain like collects each of these channels and then composes it into a picture in our brains. No, it turns out that we actually have something called the opponent process. And the opponent process, um, doesn't measure these things discreetly, but actually measures um a response that's antagonistic, which means that the more red that a certain cone is sensing, the less green uh will be sensed, or at least that's how the information is like encoded and delivered to our brains.
27:02 Um, which is why that the which is why there's no color reddish green. Like can you think of a reddish green color? There is no such thing. There's also no color that's yellowish blue. Um, uh, because again, it's this opposing channel. There are actually like special humans, most of them female, that have the ability to sense a fourth like they have a a fourth uh cone type that can sense uh something like cyan. It's hard to describe because if you don't have that, you can't describe it. Um, but um, at least that's what the medical journals say, it's something like cyan. Um, so yeah, so we have like these two channels, we have the red-green channel, and we have the blue-yellow channel. Um, and actually, uh, color blindness, or at least the most common form of color blindness, which is uh deuteranopia, or red-green color blindness, um, it affects one in 10 men. How many men in this room are color blind? One, two. Okay, so we're a little under the statistics for this room, but it's true. If you make products for people and you're delivering information with color, if you're going to screw up the red-green thing, then you're locking out 10% of your male audience.
28:07 And um, I can't think of any context in which that's a desirable thing. Unless you're making a site for like only women, like, you know, what's the password? Or I don't know. Um, but yeah, it's actually this red-green color blindness, it's like a breakdown in in in this channel, this opposition. Something is broken in that channel and that's why they're unable to tell the difference between these two colors. Um, and actually, there's a third channel and that's the one from the uh the rods, the lightness. So, we have luminance, uh uh, this A channel and this B channel. And it turns out that there's actually a color space, like a way of talking about color and reasoning about it in math, um, that's called LAB. We know another one, it's called RGB. We you know probably several others by the name of um uh HSV or HSL. There's like a million different like color spaces, they're basically mathematical representations of color. Um, but the nifty thing about this representation of color is that it's the one that maps most closely onto how we actually perceive color.
29:08 Um, so, when you want to do work with color and you wanted to uh to to be, I guess, closest to how we perceive things, um, then you want to use this color space because when you do all sorts of interpolations and display colors and mix them and blend them and whatever, you'll be retaining things like brightness. Like, you don't want to move from one color to another and all of a sudden along the way it becomes a lot brighter. You want things to be like a nice smooth gradation, and this is the color space you want to use. Um, Now, for many years, we didn't use this color space, right? Uh, back in the 1970s or 60s when we actually figured out this LAB color space stuff, um, it's like heavy math, or at least it was heavy math for computers that had like 60k of RAM. Um, so at the time we came up with these much simpler color spaces that were easy to think about and were generally perceptually okay. HSL and HSV, they're both cylindrical color spaces, um, and they're more or less equivalent, um, but the math for them is a lot simpler. And so for like decades, this is what we used in computers.
30:09 Even though nowadays doing like LAB like interpolation on this is like effortless because now I carry around what used to take like a room of computer, like I have it in my pocket. And so you should no longer be using these for any kind of data visualization work, there's no reason. Um, you should be using LAB. Um, and there's also code for doing this. You don't even have to write the code yourself, just go and like import a library from somewhere. You can even do it in JavaScript nowadays. It's ridiculous. Um, just to give you a sense of of why this is awesome, it's kind of hard to see because it's not completely dark in here, but so this is a color image at the top left, and at the top right, it's the LAB, only the L channel, the luminance channel. Here is the HSL, like huge saturation and lightness, the L channel and HSV, huge saturation and uh uh what? Vibrance? Value, right. Uh, hue saturation value just the V channel and just the L channel. And if you look the uh the LAB version is the one that most um accurately represents the original image of the three.
31:14 Okay? Awesome property of LAB. So, yeah, use LAB. And actually, I was talking beforehand about interpolation of colors. When you look at all these different things, if I want to go from like one color to another color, which is the one that gives me like the smoothest gradation? It's actually hard to tell in the projector here the difference between these two, but there is a difference. This is the one that's smoothest with like maybe the runner-up being HCL, which is hue chrome luminance, is like a different way of thinking about it. Um, but it's similar to LAB. It just interpolates on like a different axis. Um, but you see that HSV and HSL are actually pretty crappy at doing these interpolations. You see you have like these weird spikes in the middle of like brightness or color that don't actually seem to fit in into the gradation. Um, that's why they're bad to use. So don't use them. And yeah, color science, it's like you start reading about this in Wikipedia and very quickly you're finding yourself in a page full of like little Greek letters, a lot of them and integrals and stuff. So it does get actually really deep, really fast.
32:15 Um, but there's like, you know, the cheat sheet and that's brewer palettes. If you ever need to work with color and data, just go to this site and pick a palette from this. Uh and in fact, a lot of tools for visualization let you use these palettes like out of the box. Um, Cynthia Brewer did a bunch of research like science, bitches, it works. Um, and she did some research about all these different palettes, what people uh had the easiest time perceiving, um uh and comparing for uses in cartography. And you can specifically say, I want only palettes that are color blind safe, I want palettes that are good for diverging data, for qualitative data, for all these different kinds of data, depending on how many classes of data I have. Um, And there's great palettes for everything here. So if you're going to be just like, you know, I want to just use something, I don't want to figure this up for myself. ColorBrewer 2 and forget it. Literally, that's simple. Even though this is like a terrible like it's flash, I think it's flash, I don't know. It's like the worst site ever, but it doesn't matter, just copy the values.
33:18 Okay. So color is awesome. Um. But it's not the only tool in your toolbox. When you're throwing a lot of information at people, you need to make it easy for them to like scan that content for something that's meaningful to them, find whatever is interesting and then like zero in on it and and and like, you know, um do something with that information or dig deeper into the information that's meaningful to them. Um and you can help people do that um through uh the creation of a visual hierarchy. If you don't provide a visual hierarchy, it's like talking in a monotone all the time in the same voice. It's very boring. Nobody knows what's important and what isn't. Right? It's like human speech has like natural ups and downs, intonations that help people focus in. Same thing with vision, right? Um, and you can create that hierarchy through uh like the application and removal of emphasis. And people forget the second one, which I think is a shame, because I think it's actually more important. Like if you're building things for the web, like you're going to say, okay, my most important information needs to be like an h1, really, really freaking big, right? Because that's the most important thing.
34:25 But actually, more of the time what you want to do is the opposite. You want to say this stuff is less important, therefore it should be less visually prominent. Um, don't use just one half of your toolbox, use both halves. You can emphasize, but also deemphasize and probably you're better off deemphasizing more than you are emphasizing. Um, So here's an example. You know, you could go with normal and emphasize or you could go with normal and deemphasize. Um, um, So, removing emphasis is awesome. And this is particularly important if you're showing people information, uh, once versus repeatedly. Like, if you're building a dashboard that people are going to be coming to to again and again, right? The first time they come, they're going to need help figuring out what all this information means, and you need to supply that help right where they are, right? I'm looking at a number, what does this number mean? I don't want to be looking for like a help. I don't want to go to a hover. I don't want to like look into a sidebar. I don't I want like the information right there. Like when I was a kid, like my dad had uh uh at some point like his business took off and he bought a BMW, and I never got to drive it because I didn't have insurance because it was way too expensive.
35:31 But um, I like came up with this term called the BMW effect, which is wherever I was looking for like a button when I would sit in the driver's seat, like that's where it would be. Like I want to turn on like, you know, the fog lights, where would they be? Oh, that's where they are. Exactly right there. I want to turn the volume up and down. Everything was where I expected it to be. Everything was labeled so I could find the information exactly where I needed it to. Um, and this is really critical. So actually, deemphasizing is probably the more useful tool because you're able to give this information in a fashion that the first time when people need to see it, they can find it, but every subsequent time when they come back, it falls away from view and it's not hitting them in the face with, like, "I'm helping you, like you don't know anything," over and over again, that makes users feel like they don't know anything. It makes them feel bad. It makes them feel like they suck, right? And that's not a feeling you want to give your users, like ever. You want to make them feel awesome. And while we're talking about uh numbers, let's talk a little bit about typography. Right, who here loves typography?
36:31 Awesome. Love you guys. Yeah, so um there are actually four different types of numerals. And actually that's kind of a lie. There's like 16 different types of numerals. But there's four major types of numerals. Um, old style versus lining. Ah, it's kind of hard to make out like the lines that I made here, but whatever. Um, old style numerals uh are like this mix that look sort of like uppercase and lowercase letters. I know this doesn't actually have meaning in Hebrew, but it does in English. I'm sure a lot of you are working on products in English. Um, uh it's supposed to go in with body text, right? It has some things that go underneath a descender, some things that go above. Um that's fantastic. Lining numerals are the opposite. They look like capital letters all the time. Um, and um usually you want to use lining uh figures when they're standing alone. So if you're going to be showing like a dashboard of like you have like such and such number of things, you don't want to use old style figures. It looks weird, right? This looks right. Um, we've been doing like type on a page for literally centuries.
37:32 There's all this like history and tradition and fashion and like conventions in typography that a lot of them got you know, were sort of lost when we moved to the screen. But now they're finally coming back because typography is catching up on the screen to like what is going on and like you know print. So yeah, use these kinds of things. You can actually do this today on the web. Sometimes, not always and it depends on the font and it depends on the browser and blah blah blah. But it's getting better the same way that browsers used to suck and now they suck less. This used to suck and now it sucks less. And that's the most charitable thing I can say about it. So is that like a lower recommendation to always use uh When you're presenting numbers like this, then yes. Like in running text In running text you should always use old style figures. Okay? Um or at least in running text that's a mix of uppercase and lowercase. If you have like something that's like uh caps, sometimes like people forget that you can use caps set small. Um for example like this post was tagged something, something and something else.
38:34 Um you don't have to make that just small and gray, you can make it small gray and uppercase to make it different from like the body text above it. Um um So in that case, you would use uh lining figures because they go correctly with uppercase text. So yeah. Um so yeah, lining figures just use them. Um and today if you're building things for the web, it's actually, you know, like I said, it's kind of crappy, but if you're using something like type kit, unfortunately you have to sort of pick your fonts based on what numerals they provide. Um, but they actually give you a convenient switch. In the future, fonts will come with like web fonts will come with both of these sets of numerals and in CSS you'll be able to say I want these kinds of numerals here and these kinds of numerals here. The future is actually kind of today, but not for the service and like I said, it's like a whole different talk. You can actually look it up online. I give this talk like a couple weeks ago at html5.il. Look for it on like meetups.com. Uh it's videoed and I talk about all about web typography. But that's like a whole different side of geekry. Um, right.
39:34 And the other two kinds of numbers, numerals are proportional versus tabular. Proportional is proportional and tabular is mono spaced. So even if you have a proportional font, like not a terminal font, not courier, um, you can still get your numbers tabular so that when you make a table, um, like, or not a table, but like if you have like sums and you need all the numbers to line up, they can line up, not like this. That's terrible. You want this. Okay? And again, you can do this with the web sort of kind of nowadays. You can do this offline very, very easily. If you buy like professional fonts, they come with all these kinds of numerals and they come with numerals for like uh uh numerators and denominators for fractions and superscripts and subscripts and all this awesome stuff. Um, but those are like a whole different thing. Okay. So the last thing that I'm going to cover about data visualization, right? Nowadays, the awesome stuff about data visualization is that um we can make them interactive. It doesn't have to be static anymore. It's not just something that's coming out on a printed page. We can um show like a ton more data, right?
40:37 But it's like rope that we can hang ourselves with because we can show too much data very, very easily. Um, so, like, what are some strategies, right? Like, one of the problems that journalism is running into nowadays is that they're trying to incorporate these interactive visualizations into like the news that they deliver. They try to tell stories with data. Um, but they're often overwhelming their audience. Who here has like gone to like some data visualization on some website and been like, "I have no idea what to do with this," right? I have. Uh I'm pretty sure everybody has. Um it's a problem. Everybody's still sort of figuring it out as they go. Um um And there's this natural tension between um who holds the steering wheel, right? Is the person telling the story like driving or are you like the user, the viewer of the story, are you the one who's driving? Um and there's no right answer here, right? Um, like some kind of mix is probably right for most visualizations. Um, some visualizations are better like this, some visualizations are better like that.
41:39 Um, but uh there's, once again, science, science done to determine like what are some successful models for telling stories. Um, this is done by um uh Edward Seegel and Jeffrey Hare at the Stanford Data Viz group, which is like the data viz, like the hot shot data viz group. Um, they're actually bonafide like bad asses, they're really good. Um, and so they they they did this paper about telling stories with data, and they identified three specific models that seem to be successful models for data visualization or interactive data visualization. The first one they called the Martini glass. Um, it like it represents this approach that's that's guided at first and then opens up later in the process to allow users to explore. So, like users come in, uh, it narrows down into like this guided narrative that takes them along like a track, like you're on a like you're on a train and it's going wherever like the um the the story wants to take you, and then at the end it lets you go and you're free to explore and so your story widens out, and all of a sudden you have all this like like area to explore and look at the bits that are more interesting to you after being pointed at the bits that may be of interest to everybody, um, and setting a stage.
42:52 And, um, ironically, it's kind of the opposite of how like written news stories work today. Um, in like written news stories you have the lead, like the opening sentence, it sets the stage. And then as the ad detail it constricts, constricts the story, and all of a sudden you've got a guided narrative, and then at the very end you're supposed to deliver like a kicker, like something that like flares out and like, now we're going to step back and here's the implications. And boom, like your head explodes from the awesome of this story, right? Um, so, it's interesting that like in journalism now we're seeing sort of this switch for this new kind of medium. It's almost like turning it on its. So, the Martini glass. The second one is the interactive slideshow. Everybody's seen this kind. Um, it's probably the more common one. Um, it's like a different approach to sharing the steering wheel. And the idea is basically you break down your story into like these three chunks and you say, okay, or like X chunks. Um, and the first chunk I'll show you some information and then set you loose to explore.
44:05 And when you're ready, you'll move on to the next chunk and then I'll guide you again for a little bit and then set you loose to explore. So, it's basically, you know, what it says on the tin, an interactive slideshow. This is another good way to do it. Um, it's not better than or worse than, it's just another strategy. Um, The upside to this approach is that users get the steering wheel sooner, right? Which maybe helps them like develop an emotional attachment to your story earlier. It makes them maybe stick around, whereas in the Martini glass maybe halfway through the guided thing somebody's just like, ah, this is not interesting for me. See you later. Okay? Here, it's like you're giving them the keys earlier and so maybe they'll stick around. Um, um, the downside is that if you give them the steering wheel here, they might never make it to here because they'll be so busy driving that they won't want to give you the keys back. Um, it's a problem. You need to think about, you know, your use case. The final model is the drill down, right? Um, usually applied to maps, but not only. Um, where you see sort of like a big picture and maybe you have a couple of regions of interest that like the storyteller wants to highlight, like over here we have this story, and over here we have this story, and down here we have this story. Pick a story and drill down and we'll show you more information. And you can do that iteratively as many layers deep as you want. But, um, this is the third sort of popular, like, mode of storytelling. When you look at all the data visualizations out there, they generally tend to fall into one of these three things, free things, interactive ones specifically. Um, so, yeah. And the upside of this is that at the top level, you're, you're doing a good job of giving like the reader, um, sort of an outline, like a map of the land, even if it's not actually a map. They get an idea of where the boundaries of the story, uh, are at, and they can sort of direct themselves to the parts that are interesting to them. Without feeling like they're surrendering the steering wheel and without feeling like they're being taken on the rails, they feel like they're exploring. Um, so there are upsides to this approach as well.
45:45 But in the end, all this needs to mean the service of your audience. Whatever like decisions you make about your data visualization, um, if like your audience needs are different, then do what your audience needs, like literally ignore everything I told you here and make up your own rules because at the end of the day your audience is most important thing. You need to serve them before you serve any like general rule. So, I want to plant an idea inside your heads, right? Um, it's a simple idea. Um, a lot of you are like busy doing stuff, the next big thing in whatever. Um, you're building all these awesome products. Um, uh, and that's awesome. But there are a ton of fields where people are rich in data, but poor in understanding. Um, if you know how to design, or you know how to code, and you've sat through this presentation, you already know more than, um, like 99% of people in all these fields, where they don't even know to understand what their users are doing, why their users are doing something, what something means about their data, their research. Um, even with whatever background you have, you can jump in and make a huge impact, a huge difference to their understanding of their own fields. And when you look at the greats of data visualization, people like Edward Tufte, these are people that come from, like, you know, some random field, like, I think Edward Tufte was like, he was like a statistician, or, yeah. What? Political scientist. He was a political scientist, right? He actually didn't know any of the design stuff that now he like invented later. He like picked up the sort of the language by working with designers, by sort of moving in like, you know, building things in his field, um, and through that he actually like ascended to greatness, built these meaningful things and taught others how to build these meaningful things. There's no reason why all of you can't go out and make that huge impact. Um, even if you're not going to be Edward Tufte, you can do so much for these fields where people don't understand their own data. So, go out and make awesome things and teach other people how to make awesome things. It's really something that you can pick up by yourselves. Um, and it's fun to read about and it's fun to see like, you know, something visual at the end of the day instead of just like, oh, I optimized my query and now runs like 0.25 seconds like faster. That's an awesome feeling, but it's really awesome to see something tangible in front of your eyes that anybody can understand. So, go build awesome stuff and thanks. Questions? Speaker 1: [48:33] Actually, have uh, a bit of a critical question. [48:37] Um, you talk about visualizations, something that um, makes information more accessible to the user, for the reader. [48:48] But um, my question for you is what is your opinion about the way visualizations and infographics uh, flattens the narrative, uh, and enables us to pass only, this is more of a conceptual question rather than a technical one. [49:05] But it helps us to it actually defines the, the discourse for the readers and give the reader um, a subset of tools, but a limited one to deal with and to perceive the, the narrative you're trying to present. [49:22] Speaker 2: Okay, I'll rephrase your question so it gets recorded on the thing and the question is, um, uh, do data visualizations flatten the narrative? [49:31] Do they basically restrict users to a specific story or overly restrict users to a story where maybe the story could be wider and carry more meaning than just what the data visualization can supply. [49:42] Did I accurately state your question? [49:44] I don't think that there's a single story out there that does what you ask. [49:49] Um, not data visualization, not not data visualization. [49:52] There is no story of everything, you know? [49:55] Like, there's no, like, data, like, there's no journalism piece. [50:00] Um, and as people who live here in Israel and see so much terrible journalism about here, not terrible as in critical or positive. [50:08] I mean, terrible as in, it just doesn't convey the truth of whatever happened effectively. [50:14] Um, we should know this better than most people that, um, there's no way to like take all the truth and stuff it into a story. [50:20] You have to focus on a part of the truth, something that maybe gives you the flavor of the truth. [50:25] Um, and in many ways, hm? [50:27] That there's no such thing as absolute. [50:30] And now we're vering into like the realm of philosophy and I don't want to do that too much. [50:34] Um, um, uh, crap, I lost my train of thought. [50:39] Um, it's, it's uh, uh, uh, because there's no sort of story of everything, you have to always pick something that's like a slice of the truth, that gives the flavor of the truth, and I think that's a lot like art, which I think is not a terrible comparison to draw. [50:52] So I don't think in that sense that data visualization is more or less advantaged than regular journalism. [50:59] If anything, I'd say that maybe interactive data visualization gives most users more than they had otherwise. [51:05] Even if it takes them on rails, even if it shows them only a part of the story, even like, even with all those things, if you're telling people a story with just words or just images, you know, there's always what happened just outside of the, the frame of the image. [51:19] There's always what the photographer didn't take a photo of. [51:23] Um, there's always the part of the story that the writer didn't choose to focus on. [51:27] And maybe with interactive, we have the ability to deliver more of the surrounding scene, to deliver more truth, but in a fashion that doesn't overwhelm people anymore than like a regular story would, but allows them to sort of explore at their own pace. [51:41] So, I don't think that data visualization or interactive data visualizations are actually worse at this. [51:45] I think they're better. [51:46] Um, but that's just my opinion. [51:48] So, more questions? [51:53] What do you think about heat maps? [51:55] What do you think about Heat maps, heat maps. [51:57] Heat maps. [51:58] Depends on your audience, it depends on your data. [52:02] Like, so I've given this talk once before and unfortunately a lot of the Q&A in that talk was also it depends. [52:14] Heat maps are fantastic for a certain kind of of information. [52:19] Sometimes when you're, say you have a heat map and it, it represents like points on some kind of a map, right? [52:25] Sometimes the density of those points grows too large, and it makes it hard for me to like, you know, if I have like 1,000 points clustered in this small area, or 100 points clustered in this small area, there's no way for me to draw those points if they're overlapping in a fashion that lets me look at these points and be like, oh, okay, I, you know, there's a 1,000 versus there's 100. [53:45] And that's where something like a heat map or maybe clustering, uh, can come in handy, because it'll tell the truth more effectively. [53:52] Um, and then what color scale should you use? [53:56] Well, it depends. [53:57] You might want to have like the classic spectrum. [53:59] Um, it depends what your range is. [54:02] Is it a large range? [54:03] Is it a small range? [54:04] Do you have like, like a lot of hotspots? [54:07] Is it evenly spread out and there's like not a lot of variation in your data? [54:11] Your choice of spectrum is going to be dictated by these things. [54:15] You're going to see what comes out and you're going to say, that doesn't look so great, or that doesn't actually tell the story. [54:19] Um, I need to like mess around with the spectrum. [54:22] Maybe I need to make it like a logarithmic scale, I don't know. [54:24] Um, so there's no like one set answer for like, you should just use this ever in pretty much anything, uh, when it comes to data visualization. [54:37] I will be around for a little bit more today and I will be around all day tomorrow. [54:41] Please come by, ask me questions, um, and if you have data you need visualized, please come by and ask me questions. [54:47] Thanks, guys. [54:48]