0:01 For me, if I want to make some visualizations that tell a specific story, typically they’re going to go into a presentation or a book or a report or something like that. So, they’re static visualizations. And I don’t think there’s a better tool for Python users. Yeah. Than Map Plot. Now, you could ask why Python, right? And obviously, I’m totally biased since I’ve been using Python for a long time. But I did I did make a Corsera course a few years ago and in that course I used math plot lib I used seabor I used plotly and then I did stuff with Tableau and Excel and I basically recreated all these plots and these different tools right and my take on that is that you know the sort of no code stuff is great for when you’re in the sandbox but really when
0:49 you want to start putting these small tweaks and cleanups to your plot. It’s either impossible or very difficult to do that with other tools. Today’s guest is Matt Harrison, bestselling author, Python educator, and expert in practical data visualization. In this episode, we’ll explore why communication is the most underrated skill in data science. Matt’s clear method for creating visualizations that truly tell a story. Common visualization mistakes every data scientist makes and how to fix them and why simplicity, not complexity, is your key to becoming influential through data. Don’t forget to subscribe to Dana Neighbor wherever you listen to podcasts and YouTube and drop a like and comment below. It keeps us bringing you great content like this. With that, let’s dive into our chat with Matt Harrison.
1:44 Hey everyone, welcome back to Data Neighbors with Hias Ravi and Sean. So today we’re joined by someone who’s taught thousands of people how to use Python and think like a practical data scientist, Matt Harrison. Matt, welcome to the show. Thanks. Thanks for having me. Welcome Matt. Thanks for letting me hop on. Yeah, it’s great to have you here. So, Matt, for our listeners, Matt’s the author of a series of books on data science, Python, visualization, including effective pandas. Uh, I’ve got his book, Effective Visualization, right here. Yeah. And he’s built a reputation for teaching these topics in a way that I think is actually like pretty useful in real world workflows for your day-to-day job. So today we’re going to dive into a topic that every data scientist and analyst wrestles with the most underrated skill of a data person
2:29 and that’s how to communicate insights effectively. Whether you’re in product or analytics or ML your work is only valuable if people can understand it and happy to kind of like jump into this with you Matt in terms of you know how do we uh not only find insights but visualize them and and communicate that to our our stakeholders and our partners. Yeah, excited. Excited to share. It’s super. Being able to communicate well and tell your story, tell the story that your boss needs to hear or maybe doesn’t need to hear is an important skill. Um, so maybe to kick it off, so you’ve taught Python to like kind of everyone from analysts to engineers.
3:05 Um, and you’re well known for your like effective pandas book. What made you decide to focus on visualization in this new book? Yeah, I guess I’m just scratching my itch. I have a series of books for Python pandas. I’ve got a Polar’s book and advanced Python book and I felt that well there’s a lot of books out there that cover the theory of visualization and I’ve got a bunch of them on back here Tuft and you know show me the numbers and you know O’Reilly has various books on visualization and they all talk about the theory and they talk about colors and you know how you make something darker, lighter and and they give you all this theory which is great and they have a bunch of examples and then you have on the other side you have like a bunch of books that
3:54 are like here’s map plot and here’s 500 things you can do with map plot and I felt like there aren’t a lot of books that like say here’s map plot and here’s how you tell a story with map plot and so that’s what I set out to do is to sort of bridge the gap like there’s a bunch of theory books that are great but how do I put that in practice and that was the goal with effective visualization. So, it’s it’s pretty opinionated and focused on uh a small segment of data visualization to to help people tell the story. Yeah, why did you choose uh Matt Plot for the focus? Yeah, that’s a great question. So, Matt Plot has been around forever and for better for worse, it is super powerful. the API isn’t particularly consistent and you know you always hear about how people
4:48 are like well in R we have such smooth thing you know libraries ggplot 2 is so awesome blah blah blah blah blah and yeah so my experience is that I’ve I’ve worked for over 10 years teaching people Python in a professional context um and 25 years as a Python programmer and When I think about for me what makes a good visualization, you know, you can get it the basic visualization is like one or two lines of code for for something just very quick and dirty. But when I think of something that is focused and wants to tell a particular story, there are various parts of that visualization. And you can see examples of these if you go to media outlets online, the New York Times, Economist, these types of places.
5:43 And those visualizations that you see that are telling stories these ways aren’t plots that you can do in one line of code. And you can’t even if you’re using whatever ggplot 2 or other plotting libraries to create those types of visualizations, they kind of have to be done by hand. And like I said, I didn’t feel like there was any tool or any resource that sort of showed me an opinionated take on visualization. And so for me, if I want to make some So again, the the book is focused on visualizations that tell a specific story. Typically, they’re going to go into a presentation or a book or a report or something like that. So they’re static visualizations. And I don’t think there’s a better tool for Python users. Yeah. Than Matt Plot. Now you could ask why Python, right? And
6:38 obviously I’m totally biased since I’ve been using Python for a long time. But I did I did make a Corsera course a few years ago and in that course I used Matt Plot, I used Seabor, I used Plotly and then I did stuff with Tableau and Excel and I basically recreated all these plots in these different tools, right? And my take on that is that, you know, the sort of no code stuff is great for when you’re in the sandbox, but really when you want to start putting these small tweaks and cleanups to your plot, it’s either impossible or very difficult to do that with other tools, but with map plot li.
7:19 Yeah, I was actually me and Hi were talking about this. I feel like I’ve kind of read a lot of like more of the like yeah I guess theoretical books like I really like like Cole News Bombers’s book storytelling with data that was kind of like got me more into like oh can I make this more like what I see in like the newspaper and I was always doing it in my previous jobs in Tableau but you did have to kind of like to get to what you wanted you had to like constantly like query and model the data differently before you went in there and do some hacky stuff and I was just thinking about it recently like I now I’m using a lot more Python just because with also like the help of LLMs and stuff like I can just be like hey I want
8:00 to use Matt Pub or I want to use Seabour or something but like how do I get this like one bar just colored and I I do wonder if like if coding gets easier if like the if like the no code stuff’s going to disappear a little bit more. I don’t know the existential crisis of programmers getting eaten by AI. Yeah. I I mean I I have a take on that right now. My my current take on that is that right now I haven’t seen any AIs that you can feed it a CSV or an Excel and say make a plot that tells a story from this that looks whatever like the economist. They’re not going to be able to do that right now. And you know it’s possible that they could do that in the future that there’d be have to be a lot
8:43 of back and forth because to be honest there like even when I’m doing this these are plots that I’m generally back and forthing myself cuz they’re handed out which is one of the reasons why tools like you know plotly or bokeh while they’re great for interactive stuff again the focus of this book is not on interactivity. The focus of this book is like here is a plot that goes in a presentation or in a book and it or on a newspaper and it tells a story, right? Yeah. Yeah. Absolutely. To your earlier point Matt about you are taking an opinionated approach to kind of visualizations. Why do you think um like opinions are have been absent in such a important kind of like thing? Right.
9:28 That’s a good question. So as an educator like like my day job is like teaching folks Python and and data science. So I spend a good deal of my time either in person or on Zoom calls teaching these sorts of things. And you know you might ask like why why would someone even want that when you can go on YouTube and you can get a PhD’s worth of knowledge or whatever Tik Tok or name or social media source you want or now with AIS you can get these sorts of answers. And I I think one of the really important things is curation that you want curation especially with beginners.
10:07 I think that if you’re don’t know where you’re going and you’re asking for directions you the you’re going to get a path but it might not be the path that exposes you to the warts the things you need to watch out for or the sort of hidden tricks that you might not know about. And so I I think a lot of people really appreciate like we’re going to start here and we’re going to take you through this path and I’ve been doing Python for 25 years. So I’m going to show you like here’s here’s where people get hung up. Here’s how you can make your pandas code better. And I think I think particularly for visualization because if you read all these books, right, they they’re all like art art.
10:45 Here’s the science or the theory of color and how to tell stories. reason a lot of people who sit in front of computers all day are kind of like I’m sitting in front of a computer because I I don’t want to talk to people. I want to work with a computer, right? Um which is one of the reasons why communication is a really important skill for for data folks. But I I I think there’s probably a feeling that you need some sort of ability with art to be able to make these visualizations and you’re a computer scientist or a data scientist or a data analyst and so you don’t have artistic abilities. So my my take is like I’m going to give you a framework and if you walk through this framework it’s going to force you to think about
11:29 what you need to do to make a plot. I think a lot of people when they’re plotting, they’re like, “Well, I make a line plot and this is how I make a line plot.” And then somebody said, “I need to remove chart junk, so I get rid of my grids.” And then after I’ve gotten rid of my grids, I’ve made my plot and that’s it, right? I’ve checked off all the boxes because that’s what they’ve been told told, right? But they don’t really think about it like instead of like this is a line plot, instead I think you should reframe. It’s like what story am I trying to tell and how does the line plot tell this effectively and what other elements do I need to incorporate into that to reinforce or make my point stronger. Yeah, I mean I’m
12:07 so excited to dive into some of the tips and tricks and like best practices and stuff like that. But yeah, you’re absolutely right. I mean, you know, like we in in in the industry, we see it a lot like people just people give it very little thought about, you know, like what the chart would look like. It’s like, hey, I’ve done the grunt work of organizing the data, cleaning it up, doing all the modeling stuff, getting the insights, and here you go. Here’s the here’s the default package that I get from uh uh from a from a from a charting library, and I just present that and and that’s it. But like, as you said, there’s so much that goes into it.
12:45 It’s uh it’s amazing how little it gets talked about. Yeah. Yeah. And I I I mean to be honest, I was surprised as I was going through these books. It’s like where is a book that like shows me with any library how to do this, right? They’re all like we did this with Excel or we did this with whatever, but we’re not showing you how we did it, right? Which which for me is like great, but I would I love the theory, but I also love to see the progression from here’s a oneline plot to here’s the cleaned up one that would go in a magazine or a newspaper. I remember a really short story, a really funny story before which is uh I was working with a designer on something like analytics platform of some sort that has a visualization
13:26 component and then she gave me these really great, you know, like mockups of of actually like dummy data sets that I gave her and I was like, “Wow, how do you plot these?” And she was like, “I handdrawn them.” Yeah. Illustrator. And I was like, “Oh, okay. I guess I I guess that’s not reproducible, but uh that’s that’s kind of like the the holy grail, but anyway.” Yeah. Yeah. I I I mean there is there is an art to it, right? And and I don’t mean to take away from like professional data visualization people who are like the top of the top making the these plots saying that like you know just by following these steps you’re going to put yourself up there because I think there there is a lot of art still involved but I think there there’s you know to get to you know just
14:10 to get past that initial level and start thinking about not just this is a visualization but like reframe it all. this is a story that I’m trying to tell. Does does this tell my story? Yeah. I think it’s so important. Something I’ve always realized, it’s like getting your story across. There’s there’s the time when you’re like in the room and you’re talking to people and you’re walking through them and you don’t want their eyes to glaze over when they see the graph and not know what’s going on. But then I think actually what’s even like the higher risk part is like after the presentation when your thing starts getting shared around you’re not there to talk about it and then people start drawing different conclusions from this graph you made having that really clear like even having like the title being
14:50 like the actual takeaway from from what you’re trying to get there is so important otherwise then you’re caught up in meetings later on where it’s like hey so and so said you did this analysis and it said xyz and it’s like no that’s definitely not what I wanted to get across But I can see how they got to that. Well, the crazy part is that the on most plot like most plotting libraries like title title is kind of a first class thing. But it’s like you don’t have to make a title, right? Like it’s like you can make a plot without even having a title. And it’s like if you look at these professional plots, they all have titles and subtitles, right? And I don’t know any any tool that has like subtitle is like a first class thing. when you make a
15:30 visualization, you provide a subtitle with it. Yeah. Yeah. 100%. Uh maybe getting into the framework a little bit. I know in the book you mentioned like the clear method. Could you tell us a little bit about that approach to start? Sure. Yeah. Yeah. So part of part of the book introduces these clear principles and that was again I think this idea of going through a path an opinionated path and giving you um I I guess questions you can ask yourself and and think about uh and I think if you go through this you know potentially you won’t change your plot. I imagine that your plot will change quite a bit if if you answer these questions. It forces you to reframe that it’s like this is not just a visualization but this is a story that I want. And so
16:17 clear stands for color. The C is for color. So you know there we can go into color theory and all that but but to me the important thing isn’t is it you know I think with a little bit of color theory you can do a lot but oftent times like the default colors for plots are not great. Like if you do a line plot in Mattplot Lib with a bunch of lines, it’s going to put just every line is a different color and then it will cycle through them at some point. And again, if if you look at like real world professional plots, no one is doing that. They call that a spaghetti plot.
16:48 But if you you know, but there are techniques that we can do that if you look at how how real world people do this, we can apply those techniques using map plot li and pandas to do that. um you know and and then also think so limiting your colors, being careful about what colors you choose are all important aspects. So that that’s the C. The L is for limited plots. And this one might be a little bit maybe folks think it’s a little bit maybe heavy-handed. You know, there there’s the idea of like removing chart junk and and getting rid of anything that tells a story or that doesn’t tell the story. And and I think that’s part of it. But to me, a lot of times I see folks where they’re like, I’m going to I saw some fancy plot
17:32 somewhere and so I’m going to reach out and try and make some really fancy plot. And when I was going through the, you know, planning stages of the book, I went to all of these professional data visualization teams and started pulling down samples of what kinds of plots they were making. And I bucketed them into five buckets. So we have line plots, we have bar plots, we have scatter plots, we have histograms, which are kind of a subcategory of bar plots, but they’re they’re a little different. And then you kind of have the fifth category, which is kind of a catch-all. It’s like maps and sometimes some other type of plot.
18:10 But if again if you if you go to these sites, you don’t see some of like the plots that you would see on, you know, that people post like Twitter or radar thing or like Yeah. Yeah. You don’t see a radar plot. You don’t see tree maps, things like that. Nut graphs. Yeah. And and you but you see like on social media, you see like here’s how to choose your plot and it’s got 40 plots in there. It’s like you can go through this little this little thing to choose your plots. And I’m like, yeah, but like pros aren’t doing that. They’re using like I mean basically five plots. And so part of the limited is not just like removing chart junk, but it’s like okay, if you want to tell your story, these are kind of the proven plots that folks are using
18:56 to tell a story, you should really consider if you have to use some other plot type before throwing away the these plot types. And so to that point, the book only focuses on it doesn’t talk about maps. It just focuses on those four plots, which a lot of people to them it’s like, come on, Map Plot Lib makes all of these other types of plots and it does all these other things. It’s like it does, but again, I’m being opinionated, but I’m also like based on my experience and even like looking at the theory books, right? The theory books aren’t showing those other types of plots. They’re showing these these simple plots. So I think people a lot of you know I I once had a colleague who a new version of Python came out and this colleague proceeded to make a poll
19:39 request using every feature of the new version of Python and oh man and some of them sort of fit in but the other ones are like you are just doing this to like either practice your Python or like force us to upgrade Python or whatever right but but it was like force us to but it was like you know chasing like this this new novel thing, right? It’s not that like new features aren’t good per se, but it’s like if you can’t master these skills, which are like the basics of storytelling that kind of everyone understands, then you really should consider why you aren’t. So that I think that’s a little bit opinionated but it also again it’s a constraint and I think oftent times when we are given these constraints it it forces us to think about what we’re doing and in the
20:29 end I think the product and product is better. Yeah. I mean I mean too also like just like besides like the fact that like those are good plots those five. It’s kind of like everyone knows what a bar plot and a line plot is like you don’t have to explain it. Like some people you might have to explain a scatter plot a little too, but like line line plots and bar plots have been around for a long time. That’s just kind of the other part too. It’s like you have to be like, okay, here this is what this is saying to you. There’s no voice over. Yeah. And and I think a lot of people think I need to wow people with my plot. And it’s not like you need to wow them. You need to present something that’s simple and like kind of
21:07 irrefutable, I think. And so using using the basic plots just sort of actually I think helps you tell your story. Yeah. So that’s L limited. Again, a lot of people say like you’re you’re like that’s a copout or whatever. And I think it’s a constraint that forces you to make better plots. So we got the color, the limited. The E is for explain. And I think this is where a lot of people probably miss out or don’t think about this, right? And and so generally I say you want to explain with a title, a subtitle and annotations, right? And you can do those with most tools. They might not be first class elements, but you can like get text into a plot or an arrow into a plot somehow. But again, it’s it goes back to that notion of tell them
21:51 what you’re going to tell them. Tell them and then tell them what you’re going to tell them. And so I think of the title and the subtitle are you have this plot. Hopefully it’s simple. The colors make it so your eyes like colors are forcing your eyes to look at a certain thing, right? By maybe muting everything else and making one thing bright or something like that. And then the title maybe gives a short explanation. Then the subtitle dives into that a little bit more. And if there’s something that’s like that’s weird, why is that there? Or you want to draw someone’s you want to further focus someone on something else. You can use an annotation to like hey in this year this happened or this is this vehicle that has this whatever miles per gallon versus horsepower or something like
22:34 that. Right? So I I think a lot of people really miss out on that in that like subtitles aren’t a first class thing in plotting packages. So people are like I don’t I don’t even make a subtitle for my plot. And then annotations I think people people just don’t think about that. They’re like, “Well, they should be experts and then we can sit down and we can talk about the plot and I can I can tell them what it is.” Right? So, that’s that’s the explain kind of tell tell them tell them with the visuals tell them what you’re going to tell them and then with the subtitle and title and the annotations tell them what you’re going to tell them again. Nice. Yeah. The A in clear is for audience. And again there might be cases where you know your audience needs has
23:17 some technical understanding and you’re making a plot specifically for them right so so it’s you know if I’m doing some machine learning plots we often use plots for machine learning to validate our our models or something like that I kind of assume that if I’m collaborating with someone else I’m I’m making those plots they have some understanding about what’s going on there the the audience level understands what’s going on. So I I want to think about who is my audience and what is appropriate for them. So, you know, there could be something that Well, I I think in general, you know, I I I’ve said I want to be opinionated and I I think I’ve come the more I’ve I’ve been, you know, working with folks and and and helping teach people or train people, I think you’re if you’re aiming to be
24:06 everything to everyone, you’re going to kind of either be bland or please no one. M and I and so I I really think you do want to have a specific focus on your audience and I think to some degree like my book kind of does that right it’s like yeah I get that like some people are going to be upset about my book like doesn’t use plotly it doesn’t show all of these other libraries right but uh you know I I think if you if you are focused on your audience it’s going to help you think about what story you’re going to tell right am I presenting to the CEO am I presenting ing to my colleagues, am I presenting to you know external consumers or external audience that can change what you share and what is in your visualization.
24:51 Absolutely. Yeah. And then the final one which which again is not really a first class element in any in any plotting library that I know of is references. If you look at like professional visualizations, they will all have at the bottom a reference that states like here’s the data, maybe here’s some tweaks that we did to the data or some footnotes or something that you need to that you need to know about the data. And and like there is no package or there there is no there is no plotting library that that adds references to your plot. But if you think about it, like I said, you don’t want to throw this wild thing out there that like no one can understand. You want to tell them your story with the plot. You want to enforce that with the subtitle and
25:34 the title and the annotations. And then at the bottom, you want your references to be like irrefutable proof. It’s like this is where I got the data. You can go get the data and you can validate this if you want to. Like it’s not magic, right? And it’s just sort of like saying here it is. You can take the whole thing and it’s sort of all self-contained, right? And if if they want to question it, they can. But it’s like there there’s this is what the data tells you, right? And yeah. Yeah, we can certainly like adapt the color or maybe the axes or something like that to to tell a different story. But I I think that, you know, if you look at these professional plots, there’s a reason why they put references in there, right? And it’s to
26:12 give you an the authority, right? You’re not hiding anything. This is what’s there. Yeah. And even beyond that, I feel like uh does your your fellow data analysts and data scientists uh favor when inevitably later on someone’s like, “Hey, can you refresh this visualization that XYZ who longer is it’s with the company made?” It’s like came. Well, it it also it also gives you I think someone who’s an aspiring data visualization person a great way to practice is to go out and find some of these charts, right? and they will have the reference at the bottom and you can say, “Okay, I’m gonna I’m gonna go get that data and I’m going to recreate this chart.” Right. Yeah. And so that I find that that’s a great practice for folks just to, you know, if if you wanted to like say get familiar with map plot or
27:03 any plotting package, right? go out and try and recreate one of these plots and you know go you can go through this clear process and it’s going to expose you to maybe some of the warts or inconsistencies but get you thinking about you know what what should really be included in the visualization. Yeah, I love this framework. I mean just to summarize to recap for our audience so clear C is color and to me that’s like to declutter, right? like make sure you don’t have too many colors, you don’t do the stuff that’s uh that’s confusing people. And then but you can also you can also pull people’s attention, right?
27:42 Like another thing I like to tell people is like close your eyes and then open them and then pay attention to what you notice, right? And generally that color like you’re literally like controlling someone’s attention with color. Yeah. So, would you recommend like using like a lot of grays and then like I don’t know stand out color from that or Yeah. Dep depends on what you’re trying to do, right? But but a lot of times like you just do this when when you find a plot that you like, close your eyes, open it, like pay attention to where your eyes go, right? And often times you will see some desaturated and then a saturated color, right? And your eyes are going to go generally I do this when I teach this, right? I’m like, “Everyone close your eyes and then I want you to type
28:22 into the chat or if we’re in live person, tell me what you you focus on, right?” And and a lot of times with these plots, it’s the color, right? Often other times it will be like there’s a title and the title’s in bold and my eyes went to that bold thing. Yeah. And the color also has like the connotation with it too. I was going to say when I worked at PWC, they were like there’s some people who were like you have to use brand colors and their brand colors were red, orange, and yellow. I’m just like everything looks bad. Like you just open every dashboard. It’s like it’s like things are positive but it’s like it all it’s all red. It’s like yeah but it’s on brand. It’s like no dude we got to stop doing this. Yeah. It’s uh I
28:59 mean that’s that’s an interesting limitation in itself. That’s uh Wow. I think we got them off some people off it. But some people were like we have to because you know they’re doing these decks and it’ be like competing against like Deoid or something like don’t use blue like but that’s such a nice neutral color. Yeah. Yeah. I mean that is a challenge. I really like how these are spelled out like so C is for color. So be intentional about it. L is for limited which is limit your chart types and all that. Explain is the E which is to annotate to make your title to actually tell the story instead of I guess X versus Y variables which is the default for every single plotting language libraries out there. Uh A is for audience. So be very clear about who
29:44 you’re speaking to. R is for reference so that people don’t actually question the data because you’re very transparent about it. So I mean like all of that speaks to me that you are trying to make the reader or whoever is looking at it as effortless as possible to get to what you’re trying to say because they don’t have to understand what this chart type is about. They already don’t have to, you know, like rethink why is this line red when it’s positive. They don’t have to question the data. Oh, where is this coming from? You’re already super transparent about it. And I mean like love that how the end outcome of all these intentional steps that you just laid out effectively is like focusing people to, you know, hey, just look at the story like everything else I’ve already answered for you. Yeah. Yeah.
30:30 And and I think a lot of people again are are focused on how do I make a line plot, right? And they focus so much on that that they forget about like what the purpose of the plot and visualization is. So when you’re so you have these principles that are really good and then now when you’re putting it into practice, what’s kind of like your process there? Is it like figure out what your final thing is going to be and then try and build it or is it like put all the information in first and then start deleting or or something else?
31:04 Yeah. Yeah. A lot of this is iterative, right? And so I’m a Python person. And I’m generally living in in Jupyter notebooks either Jupyter straight up or VS code or something like that. But you know oftent times remember that A is for audience. Oftent times the audience is myself. I’m just doing exploratory data analysis trying to sort of find out what’s in the data because I want to make a model or do some prediction for a client something like that. And you know when I’m the audience it can be like this is a oneline thing and works for me. But then oftent times you know if I’m making like a histogram or something like that I might want to think about okay well the default histogram has 10 bins. That’s actually probably not a good number of bins. It’s probably
31:46 probably needs to be changed right and so how how do I change that? Right? So there’s some iteration like in the book I show different techniques that I use to sort of choose an appropriate number of bins and depending on what your subject is. You might want to use one or a different method again sort of like if if I’m if I’m doing like dollar amounts, right? I might want to actually bin on like the quarter interval or something like that, right? But if I’m doing, you know, something that’s a floatingoint number, like, you know, if if you’re talking about like internal combustion engines and like liters of displacement or something like that, then that’s a floating point number. And maybe we want to bin that differently. And so I I show different techniques for like looking at bins and trying to to, you know, figure
32:34 out what what is telling my story. Yeah. What actually and like histograms are actually kind of tricky because as you move the data along around or you change the bin locations like you’ll see what I call comb effects where like things will pop up because they like fall into a different bin, right? You need to be careful that like there’s actually like some sort of mode there or concentration there and it’s not just like you shifted an edge and things fell out of one bin and and moved into another. So, you know, there’s a lot of back and forth to to kind of think about what what’s telling the story. But then, you know, in the book, I give a bunch of examples where I just sort of like say, “Okay, here here’s your basic, you know, here’s the data. We sucked it in. We maybe we
33:16 did some cleanup or we did pivoted it or something.” And then here’s your basic plot generally audience of Matt, right? Where it might be like one line of code to plot it or a few lines of code depending on what you want to do. But then it’s like, okay, now let’s assume that we’re presenting this to someone else, right? And let’s kind of go through this process thinking about, you know, each of each of these letters and how we would apply them, right? And then sort of show the the progression from, you know, here’s your out of the box bland plot to to a final product. Matt, for people who are, let’s say, like more of a novice in terms of uh, you know, like building very effective visualizations, how do they how do they get to a point where they can themselves tell that this
34:02 is a good visualization so that I should build up my um, you know, like uh, how I learn about um, uh, for example, the clear method to help me get there. Like, you know what I mean? kind of like some people would be like, “Hey, uh, if I know what the destination looks like, I can I can uh I can backtrack my way for to, you know, to a path to get there.” But probably a lot of people are like, “Hey, I made a plot. I don’t know if it looks good. It looks good to me. How how how do they know?” Yeah, that’s a great question. And and again, I think a lot of people kind of want that path, right?
34:37 They want like here’s the starting point and here’s the end destination. But you know when a lot of people are starting off with a a visualization they have like the starting point but they might not be able to see where that end point is. And so I guess I have a few thoughts about that. You know obviously I’m biased I wrote a book about like taking you through that process right so so I do think like just in the book I have a bunch of questions for each of the letters to sort of like force you to think about those things. So, you know, if you know, if you don’t have a title or a subtitle, you probably should have one because that’s what real professionals do, right? Like the reference, it’s like, yeah, you can put the reference on there. Is that going to
35:17 change your plot? You know, if you’re sharing it with someone, right? It comes off as more authoritative if you can, but it’s like, you know, am I using a bar plot versus a line plot? I think a lot of that comes down to practice and intuition. Um I generally so I mean this is this is sort of a thing I I get with with whatever I teaching whether it’s like you know uh using testing frameworks in Python or like using new features of Python or like making predictive models or using pandas and in my opinionated preferred ways. It’s like you can you can read my book or take one of my courses but after that the onus is really on you to like start incorporating that right and and generally my recommendation to folks is um you know find find excuses to
36:07 practice this like you said you that you like started you know before you were using different tools and you like wanted to use Python so you like kind of forced yourself to use Python to do that I think I think that’s great you know just finding excuses is to use it. I think like I said recreating known good visualization just like just that process of of going through that and recreating that. I think a lot of times I mean at least my experience with like working with professional programmers and data folks is that like we don’t really practice that much like like we we write code or create things at work but we don’t we don’t really like intentionally practice. Like my kids play music, music musical instruments and like they have teachers like hold your bow this way, right? Do this and
36:55 and do that and and I I think a lot of times we don’t get that practice. So I I think recreating known good plots is just sort of like expose you to like I’m going to like try and recreate this plot. Exactly. And as you do that, it’s going to actually be painful and kind of annoying regardless of what library you use. Like cuz you’re going to find out that like a lot of these things are either manual or like kind of a pain to do in whatever library. But it’s going to like force you to think. It’s like why did they put the axis on the right hand side when the default axis is on the left hand side? Well, they put it over there because generally on a line plot, a line plot is for temporal data and generally you care about the end
37:41 time, right? And so if you’re looking at the end time, you want it right close to that. So it’s on the right hand side, right? But I don’t know of any library that does that by default has it on the right hand side. They’re all on the left hand side, right? So it’s like you go through this process of like recreating these things and hopefully as you’re doing that you start you know thinking about things in a different way. Um one of the things I when I wrote my first book I I got a book that’s called the elements of typographic elements of typography I think is the name of the book. Anyway, it talks about like fonts and how books are laid out.
38:16 It’s kind of really nerdy. But one of the things that I didn’t ever pay attention to was like kerning, which is how how close letters are spaced out. And it’s like, okay, like like you would think that like letters just have, you know, you just put them next to each other, but it’s like actually if you have certain letters, they can like scoot in and out. And so a common one is like F and I. So F in a lot of fonts if it’s followed by I, the dot of the I is actually part of the F. Okay. And I hadn’t really ever paid attention to that before, you know, like I went through like 30 years of my life without like ever noticing that. And then after it was pointed out to me, I’m like, “Oh, wow.” And you see that all over the
39:02 place. But if if you never if you never paid if you’re never like exposed to that, then you don’t like think about that. So I think deliberate practice is a great way just to like force yourself to like do things and expose you to those things. You know, one thing that would be nice is, you know, if if you had access to like a professional designer, right? Get that feedback from a professional designer because a lot of us programmer data types aren’t aren’t designers, right? And and so if you can get some of that feedback from a professional designer where they might, you know, give you some advice around maybe typography or colors or something like that, that can be useful. Also, if you go to like a lot of these websites for like the designers, they have like style guides. It’s like this is the font
39:49 size that we use for the header. This is the font that we use. This is if it’s bold or if it’s not bold. These are the colors we use. These are the grid, the widths of the grid. I mean, they go down to like the details of like how many pixels or points things are and you know what padding looks like and and so again you can kind of dig into these things but a lot of people just aren’t again they’re they’re just focus on this is how you make a line plot here is a line plot right but a pro will have will sort of look at things from a different way and can often give you feedback in that way you know and I don’t think AI is there right now right I mean maybe maybe in the future it might be able to say
40:26 like you might consider doing I it. You could probably feed something in and ask it to do it. I don’t know how good the advice would be on that right now, but maybe that’s something that in a future release of some of these LLMs, they’ll have capabil capabilities to give better feedback and advice on something like that. Yeah. Feed feed in the image of the graph and be like, “What do you think the point of this is?” And if they get it wrong, you’re like, “Okay, you’re a product manager. You’re an engineer.
40:54 What do you think the point is?” And it’s like, okay, the engineer gets it, but the PM’s not getting this graph yet. Yeah. Again, this is this is just a general pro practice. But I I think, you know, practice, but getting that feedback from e either someone who has the ability to give you good feedback or or have some constraints that can help guide you and force you to think about things slightly different way is is a great way to to start being able to self- evvaluate. Totally. I feel like we had a pretty good um uh kind of process on that high when we worked together where it was like I would like share it with you and then we would share it with like a few other data scientists then we share with like someone like from product who was like
41:39 closer in and knew it wasn’t like widely spread before we’re like okay we can like share this out and have some higher confidence that okay understand what it’s going to say. Yeah I I really like that. I really like your approach, Matt, of uh uh you know, like practice a bunch, look at a bunch of stuff, ask it questions why it looks good or it doesn’t look good. I think um like and then get a designer. That’s that’s that’s that’s great. I mean, I’ve been roasted by designers before. I I thought my chart was great and then like a designer would come in like, I don’t understand this. And I’m like, it’s a line chart. Yeah. But that actually tells you something. So, I feel like that’s that’s a that’s a great tip. What um are there anything any like very
42:22 common mistakes you see that people like pretty much like everyone makes these or like businesses often like overuse this thing or that thing? I mean general mistakes just like histograms using default style of histograms data that has outliers. You know oftent times if you have out like if you have an outline in a histogram you’re going to have like a few blocks down here and then it will just be like flat. You won’t see anything and then it’s like why does it look like that? Well, there’s an outlier, right? Which is actually useful information, right? To know that there’s an outlier, but you know, doesn’t necessarily make that plot effective as a plot. Some other things that in just the like a lot of people will make a a line plot and just use like the default colors of the lines and it’s like it
43:09 just looks like a mess. You can’t really read it. So, you kind of need to figure out like, okay, how what story am I trying to tell, right? You know, for example, a common one is is like this plot that plots like the GDP versus the health of like countries and it shows like the US spends a ton and doesn’t have a better outcome and all the other countries don’t spend as much and have a better outcome, right? And so if if you if you do a line plot of that and you just do every color, you just see like all these things go all over the place, right? But if the the popular version of this is done by our world and data and what they’ve done is they’ve gone back to that technique of like okay what are we trying to tell
43:49 we’re trying to say that like the US really overspends like something’s going on there and it’s not getting a better outcome right so we want to focus the story on the US so they include the other data but it’s just like very light gray and the point is like this is where all the other data is it really doesn’t matter what the country is or what’s going on but the US is like way over here not even close to anyone else. So, you know, and that tells the story. You, you know, there are a bunch of countries there and you see the countries, but it doesn’t really matter that they’re different colors, right? They don’t need to be separated because that’s not the focus of the story. That’s a common one with scatter plots. A common issue that I see is that, you know, people will
44:32 just throw on scatter plots and use like the default alpha or opacity, which is to be completely opaque. like if I put a dot on, it’s just you can’t see through it. Um, which seems to be fine, but then if you have a lot of dots, what you see is just like a splotch of color, right? And so, um, often times, like I’ve I I actually think scatter plots can reveal a ton about our information, but you need to be careful about how you use them, right? And so one of the things I like to do is like I like sweep through values of sizes and opacities to kind of as I’m doing that I can see like okay when I when I change the opacity you might see different clumps or clusters of the data that you can’t see when
45:14 everything’s completely opaque right and so you know tweaking those things that are like not included in the box uh tend to tend to help us tell a better story or understand the data a little bit. And I get it. hard like it’s hard to have like what do you set the default values for for like a histogram, right? And so yeah, you know, Matt Plat’s like, well, we’re just going to choose 10. And that’s probably not the right answer for most things unless you have like a 10point scale on something, right? Yeah.
45:44 With with bar plots, a common thing that that for me is is kind of a challenge is just, you know, most people who are making plots these days using tabular data are using pandas. And I like, you know, I wrote a book on pandas. I use pandas all the time. Pandas is like the lingua frana of data science and people are using it for feeding machine learning models with data. Mhm. But like when you do a bar plot with pandas and it’s it has time series data, pandas actually changes the times to categoricals. So you get this weird thing where you know you have the time series data but then for the labels on that they’re not dates, they’re categoricals. And so Matt Plot just treats them as we’re going to print out every date as like the whole date. And
46:30 so that that can be problematic. It’s interesting. It’s like a lot of work goes into trying to make the plot as simple as possible. It’s like you’re trying to I don’t know. It’s like there’s a lot of complexity to making something not complex. Yeah. And if you if you look at the amount of lines of code to make something simple, it’s a lot it’s a lot of lines of code. Yeah. Right. which which is probably another reason why a lot of people aren’t well I mean I I think there might be be a few reasons one is like map plot li the API is kind of can be weird and there often times there’s like three ways to do things and they’re all kind of different and and so that can be confusing or a challenge for folks another is that like
47:10 the defaults aren’t great you know how do you make like to have defaults that please everyone is I think impossible so you need to like tweak things to that to some degree And then another one is just sort of like I think a lot of people feel like inadequacy with like artistic type things, right? And and so I think if you can have some constraints that like sort of like teach you some best practices or some things to um you know even though you’re not you might not consider yourself an artist, but if you follow these steps, they’ll the end result is is probably going to be a lot better or closer to to something that’s ideal. Yeah. Here’s a business idea here and for our audience feel free to take it is we make an agent that uh that
47:56 effectively is like the teacher of effective visualizations like that integrates with your workflow that tells you like hey your plot sucks you should consider doing X Y and Z hey you’re missing this. Yeah, I I don’t I mean like all the def to your point, Matt, like all the defaults are kind of nonsensical, right? Like for for the most part and so, you know, why are they not AI in the near future? And probably like very few people are even thinking about it. Yeah. Yeah. I think that’s another thing like people, you know, people are are like, I’m I’m not a visualization people person or they might feel inadequate or, you know, programmers are like what’s the minimum I can do to get this out there? And and so there’s probably a lot of things that contribute to that. And you know AI
48:41 again right now at least my experience is that AI can sort of help you but it’s it’s not fully automated. And even some of the map plot lip things if you try and do them with AI it sometimes can not work or it’s like it doesn’t really know how to do a lot of these things at least the AIS that I’m using. So that that sort of makes me wonder. I mean, I I kind of have this idea of like I think a lot of folks to me there there’s an interesting quote the other day that I read on LinkedIn. It was like tabular data is the data that makes money and like unstructured data is for things being viral, right? like like deep learning is is sexy and um interesting and and you know makes whatever jibli images and that sort of thing but not
49:26 necessarily but like you know people who are you have like some Excel spreadsheet or some database they have their crown jewels of their company in it and they’re using like XG boost to make a really cool model to like whatever do churn or predictions for their customers or their company or whatnot and I I think very few of that like if you’re crown jewel like if you’ve got a model around your crown jewels that’s not going in. It’s not training data for AI, right? And I think there’s a pretty big disparity of like what AI is getting trained on and like what’s actually useful if that makes sense. Like there’s a lot of what I would say like newbie naive beginner level stuff where the AI is getting trained on that and then like there’s like this huge chasm of like you
50:09 can ask the AI to do it but it’s like a wasteland because it’s like I don’t have any training data on that. And that’s just my experience like consulting with a lot of companies like making XG boost models and that sort of thing of like they’re like we want we want to do this and I think the same thing is kind of true with with visualizations where there’s a lot of like here’s 20 things you can do with map plot right there’s a lot of these types of posts that go out there but there’s there’s not a lot of like professional people who are using maybe professionals don’t use map plot maybe they’re using ggplot or maybe they’re using excel or maybe they’re using you know Illustrator or something to do this right but there’s There’s not there’s like a der of training examples
50:46 for like how you do some of these other things like the AIs just don’t know about them, right? Because Yeah. Yeah. There’s no training data for it. To that point, I think back to like when Hi and I were at Next Door and I would say one of the most impactful dashboards was a Google sheet that was just like week over week, year-over-year numbers of some metrics and they’re red or green. Uhhuh. And it was so useful that there were there were other graphs that were like good line charts in Looker and we’re like, “Hey, can we pull this into Google Sheets?” Like it’s just like it’s so it’s like the simplest thing. Yeah.
51:23 And it was like that like got done. I don’t know. Yeah. Yeah. There there’s a lot of you know I think people are often chasing chasing something fancy or something that they see, but like there’s you know simple basic stuff can be super powerful. Yeah. Yeah. So your view on AI, I mean one of our questions is around using LMS to generate charts and stuff like in this new era of the AI revolution. You still you you probably you think that’s uh pretty far away in terms of it being effective, right? So I I I see a few problems right now. One one is just that like I think for a lot of these what I call professional plots or whatever like that they are sort of manual and so they require some back and forth and I don’t know that AI can is
52:13 smart enough to do that right now at least not the AIs that I use. Maybe some other people have some fancier agents or something. But I mean I I feel like I try and track this stuff and are trying to use like whenever a new model comes out I’m like using trying the latest stuff. But like even so I don’t know and again that might go back to like a lack of training data for that. Again, there there’s a lot of content around here’s 20 things to do with map plot, but not necessarily like here’s uh the process for going through and like cleaning up a book or clean cleaning up a a chart, right? And and so u the AIS don’t really know how to do a lot of that stuff. So, you know, could could it get there? I
53:01 Yeah, it could. I think some of these, you know, AI is coming out with larger context windows. You know, I’ve sort of thought like, oh, maybe I maybe I just feed in the content of my book as a, you know, into the context window. And there you go. Use that. But I I see this I again sample size one, but I I see this I see this with visualization. I see this with like pandas, polars. I see this with xg boost, which you know my my focus tends to be the tabular python side. Yeah. And so I’m I’m not I’m I’m seeing that the AIS currently can do the basic stuff. They’re fine with doing the basic stuff, but once you sort of go beyond the basic stuff, I’m seeing a lot of hallucinations or just can’t can’t do it or giving you garbage as a result.
53:52 Yeah, I see that agents will just like go off the rails sometimes where I’ll be like, can you like change this to XYZ? And then it just like finds some other like bug in the code and just start going off and I’m like what the hell is it doing? Like how did we go from like 30 lines of code to 120? Like wait and then and then then you just like can’t even trust like what it is. So I think we’re still safe for a little while. Yeah, I think we’re safe for a little while. I mean, you know, it’s possible that we have like some of these specialized AIs and maybe that’s, you know, where we sort of say like, okay, I’m going to like have a very opinionated AI and and maybe we’re going to use a, you know, these larger context
54:32 windows to like feed in like I want you to write M plot lip code in this style, right? Or I want you to write XG boost using these tools and techniques or pandas or polars, right? and and not do it in in the way that you’re sort of trained to do it. That could be interesting. Right now, I’m not I’m not afraid of that. I mean, again, like the these these AI mod. So, you know, people ask me as like an educator, am I am I afraid of AI? And it’s like, yeah, I’m not really afraid of it right now because I think, you know, people want that opinionated path. Um, I mean, you you could ask AI to generate an opinionated path, but I think, you know, whether that’s actually good or not, um, and I feel like you want
55:22 someone, at least for me, you want someone who’s going to like say, “Hey, watch out for this, right?” and like take you on this on this course which you know pos possibly AI can do that in in the future but yeah right now it’s it’s not really capable of doing that. Cool. Awesome. I mean we’ll we’ll have you for a part two in maybe like a year or so. Maybe I’ll ask you the same question. Yeah. Or your AI deep fake that you’ll have, you know, trained on your books by then. Yeah. Actually, I’m not talking to you. I’m I’m an AI.
55:53 That’s awesome. Cool. We just passed an hour in our recording so I think this is a good place to wrap. Thank you so much Matt. One last question for you that we ask every guest which is and maybe there’s a bias here already. What is the number one is it underrated skill that a data professional should learn or should have? Yeah. Um again I do think it’s communication especially with AI these days a lot of you know yeah AI can do basic things for you right but you want to a understand the business and then b be able to communicate that back and there are ways to do that that are useful and there are ways that are not useful and your boss I mean the reason why your boss hires you is to summarize and communicate these results to them
56:43 right that you would you would think that your boss has the capabilities of doing what you want or has your skills. Often maybe maybe they’re better at managing, but oftent times your boss is in a position they are because they have shown excellence in these skills and now they’re sort of like helping other people. And so part of their job is to say, “Okay, I want you to answer these questions for me. I want you to do the work for me.” And you know, if if your boss already knows how to do it and they can get AI to do it for them, then that that’s kind of a sad proposition for you, right? So, so, so, but I do think like the communication is is super important, whether that’s, you know, with a machine learning model or communicating the value proposition of
57:29 that or or, you know, telling a story with data and making change in a company that that could be extremely useful. Awesome. Mic drop. Yeah, I think you just got us to our I think we’re at if not 100% we’re at like a 99% hit rate of communication is the most underrated skills. Thank you for adding to our eventual compilation of everyone saying communication in some future video. Okay, cool. You want me to close out? Hi. Yeah, go ahead. Cool. Well, Matt, super helpful conversation, I think, especially for anyone who’s like invested a bunch of time and in their like analysis just to release some chart and like wondering why no one cares about what they’re sharing out. That’s definitely happened to me before. Um, yeah. Before we close, any anything in terms of like where people can follow your work, learn more about effective
58:20 visualization or like all the other things you teach about? Sure. Yeah, I I’m on a lot of social platforms. Uh LinkedIn probably most appropriate for this discussion, but uh also my website is metastasnake.com. Uh and uh I’ve got a mailing list there where I occasionally share nuggets, but you can stay in contact with me there as well. Cool. Great. We’ll drop those in the uh show notes below. Awesome. Thanks so much. Yeah. Thanks so much for joining. Thank you, Matt. Oh, and don’t forget to like and subscribe and comment and all that other YouTube stuff. See you everyone. Okay, bye everybody. Bye.