title
Matplotlib Tutorial (Part 6): Histograms

description
In this video, we will be learning how to create histograms in Matplotlib. This video is sponsored by Brilliant. Go to https://brilliant.org/cms to sign up for free. Be one of the first 200 people to sign up with this link and get 20% off your premium subscription. In this Python Programming video, we will be learning how to create histograms in Matplotlib. Histograms are great for breaking your data into bins and seeing where your data falls based on those bins. Let's get started... The code from this video (with added logging) can be found at: http://bit.ly/Matplotlib-06 ✅ Support My Channel Through Patreon: https://www.patreon.com/coreyms ✅ Become a Channel Member: https://www.youtube.com/channel/UCCezIgC97PvUuR4_gbFUs5g/join ✅ One-Time Contribution Through PayPal: https://goo.gl/649HFY ✅ Cryptocurrency Donations: Bitcoin Wallet - 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3 Ethereum Wallet - 0x151649418616068fB46C3598083817101d3bCD33 Litecoin Wallet - MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot ✅ Corey's Public Amazon Wishlist http://a.co/inIyro1 ✅ Equipment I Use and Books I Recommend: https://www.amazon.com/shop/coreyschafer ▶️ You Can Find Me On: My Website - http://coreyms.com/ My Second Channel - https://www.youtube.com/c/coreymschafer Facebook - https://www.facebook.com/CoreyMSchafer Twitter - https://twitter.com/CoreyMSchafer Instagram - https://www.instagram.com/coreymschafer/ #Python #Matplotlib

detail
{'title': 'Matplotlib Tutorial (Part 6): Histograms', 'heatmap': [{'end': 241.127, 'start': 216.531, 'weight': 0.893}, {'end': 274.817, 'start': 257.753, 'weight': 0.849}, {'end': 609.65, 'start': 587.333, 'weight': 0.741}, {'end': 691.717, 'start': 653.325, 'weight': 0.746}, {'end': 779.014, 'start': 755.622, 'weight': 0.825}], 'summary': 'This tutorial covers the process of plotting histograms in python, visualizing age and survey data, and analyzing age distribution from the 2019 stack overflow developer survey, revealing insights such as 40,000 respondents between 20-30 years old and the median age being 29.', 'chapters': [{'end': 34.175, 'segs': [{'end': 34.175, 'src': 'embed', 'start': 0.229, 'weight': 0, 'content': [{'end': 4.432, 'text': "Hey there, how's it going everybody? In this video we're going to be learning how to plot histograms.", 'start': 0.229, 'duration': 4.203}, {'end': 10.235, 'text': 'Histograms are great for visualizing the distribution of data where the data falls within certain boundaries.', 'start': 4.532, 'duration': 5.703}, {'end': 17.28, 'text': "It's a lot like a bar graph, but a histogram groups the data up into bins instead of plotting each individual value.", 'start': 10.616, 'duration': 6.664}, {'end': 21.163, 'text': 'So the best way to see what this looks like is to just take a look at some examples.', 'start': 17.68, 'duration': 3.483}, {'end': 26.308, 'text': 'Now I would like to mention that we do have a sponsor for this series of videos, and that is Brilliant.org.', 'start': 21.584, 'duration': 4.724}, {'end': 34.175, 'text': 'So I really want to thank Brilliant for sponsoring this series and it would be great if you all could check them out using the link in the description section below and support the sponsors.', 'start': 26.628, 'duration': 7.547}], 'summary': 'Learn to plot histograms for data distribution. sponsored by brilliant.org.', 'duration': 33.946, 'max_score': 0.229, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XDv6T4a0RNc/pics/XDv6T4a0RNc229.jpg'}], 'start': 0.229, 'title': 'Plotting histograms tutorial', 'summary': 'Discusses the process of plotting histograms, effective for visualizing data distribution within specific boundaries and grouping data into bins, and mentions brilliant.org as the sponsor.', 'chapters': [{'end': 34.175, 'start': 0.229, 'title': 'Plotting histograms tutorial', 'summary': 'Discusses the process of plotting histograms, which are effective for visualizing the distribution of data within specific boundaries and groups data into bins instead of individual values, and also mentions brilliant.org as the sponsor for the series of videos.', 'duration': 33.946, 'highlights': ['Histograms are effective for visualizing the distribution of data within specific boundaries and groups data into bins instead of individual values.', 'Brilliant.org is mentioned as the sponsor for the series of videos.']}], 'duration': 33.946, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XDv6T4a0RNc/pics/XDv6T4a0RNc229.jpg', 'highlights': ['Histograms visualize data distribution within specific boundaries and group data into bins.', 'Brilliant.org is mentioned as the sponsor for the series of videos.']}, {'end': 497.866, 'segs': [{'end': 113.286, 'src': 'embed', 'start': 53.204, 'weight': 2, 'content': [{'end': 56.204, 'text': "I'm also importing a pie plot from matplotlib.", 'start': 53.204, 'duration': 3}, {'end': 61.626, 'text': "I'm using the 538 style, uh, for, uh, just to make our plots look a little nicer.", 'start': 56.605, 'duration': 5.021}, {'end': 66.387, 'text': "Uh, and here is the data that I'm going to be using for this video right now.", 'start': 61.646, 'duration': 4.741}, {'end': 69.788, 'text': 'I just have a list of ages here between 18 and 55.', 'start': 66.447, 'duration': 3.341}, {'end': 73.049, 'text': "Here's some data that I have commented out in a CSV file,", 'start': 69.788, 'duration': 3.261}, {'end': 79.232, 'text': "and we'll look at this once we get further along in the video and see how to plot out more data than just this small list.", 'start': 73.049, 'duration': 6.183}, {'end': 83.574, 'text': 'Okay, so down here at the bottom we are also creating a title for our plot.', 'start': 79.672, 'duration': 3.902}, {'end': 86.635, 'text': 'We have X and Y axis labels.', 'start': 83.934, 'duration': 2.701}, {'end': 96.239, 'text': 'We have a tight layout which just gives our plot some padding and also we are doing plot.show which will actually show our plot.', 'start': 87.395, 'duration': 8.844}, {'end': 100.841, 'text': "Now, as usual, if you'd like to follow along, then I will have this code available on my GitHub.", 'start': 96.579, 'duration': 4.262}, {'end': 103.642, 'text': "And there's a link to that in the description section below.", 'start': 101.141, 'duration': 2.501}, {'end': 108.744, 'text': 'if you want to go there and copy and paste this into your editor so that you can follow along with this exact data.', 'start': 103.642, 'duration': 5.102}, {'end': 113.286, 'text': "And I'm also going to have the data.csv file that I'm using in this video as well.", 'start': 109.044, 'duration': 4.242}], 'summary': 'Importing matplotlib pie plot, using 538 style, and plotting ages 18-55 with potential for more data.', 'duration': 60.082, 'max_score': 53.204, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XDv6T4a0RNc/pics/XDv6T4a0RNc53204.jpg'}, {'end': 185.572, 'src': 'embed', 'start': 154.12, 'weight': 4, 'content': [{'end': 161.067, 'text': "So if you plotted out how many responses we got from each age, then that would mean you'd have almost a hundred different columns,", 'start': 154.12, 'duration': 6.947}, {'end': 162.368, 'text': "which definitely isn't useful.", 'start': 161.067, 'duration': 1.301}, {'end': 164.711, 'text': 'So this is where histograms come in.', 'start': 162.849, 'duration': 1.862}, {'end': 172.038, 'text': 'histograms allow us to create bins for our data and plot how many values fall into those bins.', 'start': 165.512, 'duration': 6.526}, {'end': 176.923, 'text': "so to see this, let's create a histogram of this list of ages that we have here.", 'start': 172.038, 'duration': 4.885}, {'end': 185.572, 'text': 'so to do this, I can simply say PLT, dot hist, and we will plot out those ages.', 'start': 176.923, 'duration': 8.649}], 'summary': 'Histograms organize data into bins for easy visualization.', 'duration': 31.452, 'max_score': 154.12, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XDv6T4a0RNc/pics/XDv6T4a0RNc154120.jpg'}, {'end': 241.127, 'src': 'heatmap', 'start': 216.531, 'weight': 0.893, 'content': [{'end': 224.397, 'text': 'then this will divide all of these ages up into five different bins and then tell us how many people fell into those age ranges.', 'start': 216.531, 'duration': 7.866}, {'end': 229.902, 'text': 'So if we run this, then we can see that we get a pretty simple histogram here.', 'start': 224.778, 'duration': 5.124}, {'end': 232.524, 'text': 'And what this is, is a distribution here.', 'start': 230.262, 'duration': 2.262}, {'end': 238.806, 'text': "Now, I personally find it a bit difficult to read these sometimes if we don't have edge colors for each bin,", 'start': 232.964, 'duration': 5.842}, {'end': 241.127, 'text': 'because they all just kind of run together here.', 'start': 238.806, 'duration': 2.321}], 'summary': 'Data divided into 5 age bins, generating histogram distribution.', 'duration': 24.596, 'max_score': 216.531, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XDv6T4a0RNc/pics/XDv6T4a0RNc216531.jpg'}, {'end': 292.222, 'src': 'heatmap', 'start': 257.753, 'weight': 0.849, 'content': [{'end': 261.553, 'text': "so edge color is equal to, I'll just say, black.", 'start': 257.753, 'duration': 3.8}, {'end': 266.575, 'text': "so now let's run this, and now we can see those bins a bit more clearly.", 'start': 261.553, 'duration': 5.022}, {'end': 274.817, 'text': 'so let me make this a little larger and also to where you can see the ages up here at the top, and let me explain what this is actually doing.', 'start': 266.575, 'duration': 8.242}, {'end': 280.579, 'text': 'so we said that we wanted our data plotted on a histogram and we wanted that broken up into five different bins.', 'start': 274.817, 'duration': 5.762}, {'end': 282.98, 'text': 'So it calculated those ages for us.', 'start': 280.939, 'duration': 2.041}, {'end': 292.222, 'text': "So this looks like it's between, let's see, 18 and like 26 maybe, and then 26 to like 33 and so on.", 'start': 283.32, 'duration': 8.902}], 'summary': 'Data plotted on a histogram with five bins, showing age ranges like 18-26 and 26-33.', 'duration': 34.469, 'max_score': 257.753, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XDv6T4a0RNc/pics/XDv6T4a0RNc257753.jpg'}, {'end': 344.853, 'src': 'embed', 'start': 315.192, 'weight': 0, 'content': [{'end': 320.175, 'text': 'But we can also pass in our own list of values, and those values will be the bins.', 'start': 315.192, 'duration': 4.983}, {'end': 326.04, 'text': 'And I like passing in a list of bins for this kind of data because you have more control over the exact values.', 'start': 320.616, 'duration': 5.424}, {'end': 332.705, 'text': "So for example, Let's say that I wanted to plot the ages broken up into groups of 10-year differences.", 'start': 326.4, 'duration': 6.305}, {'end': 344.853, 'text': "So I could say right here, above my plot, I'm going to say bins is equal to, and I'm just going to say that we want to bin for 10,, 20,, 30,, 40, 50,", 'start': 333.065, 'duration': 11.788}], 'summary': 'Data can be grouped into 10-year bins for better control and visualization.', 'duration': 29.661, 'max_score': 315.192, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XDv6T4a0RNc/pics/XDv6T4a0RNc315192.jpg'}, {'end': 425.334, 'src': 'embed', 'start': 397.563, 'weight': 1, 'content': [{'end': 404.99, 'text': 'There were four people from 20 to 33 from 30 to 41 from 40 to 50 and one from 50 to 60.', 'start': 397.563, 'duration': 7.427}, {'end': 407.891, 'text': "So that's how you plot and read a histogram.", 'start': 404.99, 'duration': 2.901}, {'end': 413.952, 'text': "And we can even exclude some data if we don't want to add those ranges to our bins.", 'start': 408.251, 'duration': 5.701}, {'end': 420.953, 'text': "So for example, let's say that we didn't want to include the ages between 10 to 20 in my results.", 'start': 414.492, 'duration': 6.461}, {'end': 425.334, 'text': 'Well, to do that, we can just simply remove 10 from the bin.', 'start': 421.333, 'duration': 4.001}], 'summary': 'Data from 20 to 60 plotted in histogram, with option to exclude ranges.', 'duration': 27.771, 'max_score': 397.563, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XDv6T4a0RNc/pics/XDv6T4a0RNc397563.jpg'}], 'start': 34.536, 'title': 'Plotting age data and histograms in python', 'summary': 'Introduces plotting age data using pandas and matplotlib, sharing the code on github. it also explains plotting histograms in python using sample data and data from a csv file, demonstrating the use of bins and data exclusion.', 'chapters': [{'end': 113.286, 'start': 34.536, 'title': 'Plotting age data with pandas and matplotlib', 'summary': "Introduces the process of plotting age data using python's pandas and matplotlib, including importing libraries, creating a plot, and sharing the code on github.", 'duration': 78.75, 'highlights': ['Importing pandas and matplotlib libraries to plot age data.', 'Using 538 style to improve the appearance of the plots.', 'Providing code access on GitHub for viewers to follow along with the exact data used in the video.', 'Creating a title, X and Y axis labels, and tight layout for the plot.']}, {'end': 497.866, 'start': 113.626, 'title': 'Plotting histograms in python', 'summary': 'Explains how to plot histograms in python using a list of sample data and then a real-world example with data loaded from a csv file, demonstrating the use of bins and exclusion of data in creating histograms.', 'duration': 384.24, 'highlights': ['The chapter explains how to plot histograms using a list of sample data and a real-world example with data loaded from a CSV file.', 'Demonstrates the use of bins to divide data and plot how many values fall into those bins, with examples using both integers and a custom list of values.', 'Illustrates the exclusion of specific data ranges from the histogram by removing values from the bins, showcasing the ability to customize the plotted data.']}], 'duration': 463.33, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XDv6T4a0RNc/pics/XDv6T4a0RNc34536.jpg', 'highlights': ['Demonstrates the use of bins to divide data and plot how many values fall into those bins, with examples using both integers and a custom list of values.', 'Illustrates the exclusion of specific data ranges from the histogram by removing values from the bins, showcasing the ability to customize the plotted data.', 'Creating a title, X and Y axis labels, and tight layout for the plot.', 'Using 538 style to improve the appearance of the plots.', 'The chapter explains how to plot histograms using a list of sample data and a real-world example with data loaded from a CSV file.', 'Importing pandas and matplotlib libraries to plot age data.', 'Providing code access on GitHub for viewers to follow along with the exact data used in the video.']}, {'end': 983.452, 'segs': [{'end': 546.961, 'src': 'embed', 'start': 498.266, 'weight': 3, 'content': [{'end': 501.308, 'text': 'So let me explain what this survey data is.', 'start': 498.266, 'duration': 3.042}, {'end': 506.891, 'text': 'So we have these responder IDs and this is just an ID for each person who responded to the survey.', 'start': 501.688, 'duration': 5.203}, {'end': 508.672, 'text': 'So this is one person here.', 'start': 507.311, 'duration': 1.361}, {'end': 510.573, 'text': 'This is another person here, another person here.', 'start': 508.832, 'duration': 1.741}, {'end': 515.917, 'text': 'And then our age column here is just the age for the people who responded to this survey.', 'start': 510.993, 'duration': 4.924}, {'end': 520.541, 'text': 'So this person was 14, this person was 19, 28, 22, and so on.', 'start': 516.217, 'duration': 4.324}, {'end': 529.508, 'text': "So back here, we have our IDs variable, and we're setting that equal to data, and then we are passing in this responder ID key.", 'start': 521.041, 'duration': 8.467}, {'end': 537.155, 'text': 'So what that does is it sets those IDs equal to all of these IDs here that are in this responder ID column.', 'start': 529.909, 'duration': 7.246}, {'end': 540.437, 'text': "And here we're saying ages is equal to data age.", 'start': 537.535, 'duration': 2.902}, {'end': 546.961, 'text': 'And that is setting that ages variable there equal to this entire column here for our ages.', 'start': 540.837, 'duration': 6.124}], 'summary': 'Survey data includes responder ids and ages of 14, 19, 28, 22, and more.', 'duration': 48.695, 'max_score': 498.266, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XDv6T4a0RNc/pics/XDv6T4a0RNc498266.jpg'}, {'end': 627.149, 'src': 'heatmap', 'start': 587.333, 'weight': 0, 'content': [{'end': 593.695, 'text': "Now, since we called this ages variable here the same thing that we had before, we don't even need to change our histogram plot,", 'start': 587.333, 'duration': 6.362}, {'end': 595.796, 'text': 'because that is still just ages there.', 'start': 593.695, 'duration': 2.101}, {'end': 603.758, 'text': 'So now I should be able to run this and get some real data here from this or some results here from that data.', 'start': 596.196, 'duration': 7.562}, {'end': 609.65, 'text': 'So we can see here that, based on this plot, that almost 40, 000 of the respondents were between the ages of 20 and 30 and almost 25,', 'start': 604.058, 'duration': 5.592}, {'end': 617.442, 'text': '000 were between the ages of 30 and 40..', 'start': 609.65, 'duration': 7.792}, {'end': 627.149, 'text': "Now it might not look like we have data for 70 to 80 and 80 to 90, but it's likely because there just weren't many responses with those ages.", 'start': 617.442, 'duration': 9.707}], 'summary': 'Histogram plot shows 40,000 respondents aged 20-30, 25,000 aged 30-40.', 'duration': 39.816, 'max_score': 587.333, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XDv6T4a0RNc/pics/XDv6T4a0RNc587333.jpg'}, {'end': 691.717, 'src': 'heatmap', 'start': 643.499, 'weight': 2, 'content': [{'end': 649.362, 'text': "So there are some responses there, but they're just being dwarfed by these numbers over here.", 'start': 643.499, 'duration': 5.863}, {'end': 653.325, 'text': 'Now, when you have certain values that are a lot more than your other values,', 'start': 649.763, 'duration': 3.562}, {'end': 658.688, 'text': 'then you can plot this on a logarithmic scale to not make this look so extreme.', 'start': 653.325, 'duration': 5.363}, {'end': 665.533, 'text': 'So to do this we can add an argument of log equals true to our plot.', 'start': 659.048, 'duration': 6.485}, {'end': 670.718, 'text': "so within our hist method, i'm just going to say log is equal to true.", 'start': 665.533, 'duration': 5.185}, {'end': 679.766, 'text': 'and now, if i run this, then this is plotting this on a logarithmic scale and we can see that now we do have that data visible for 70 to 80,', 'start': 670.718, 'duration': 9.048}, {'end': 682.549, 'text': '80 to 90 and 90 to 100..', 'start': 679.766, 'duration': 2.783}, {'end': 691.717, 'text': 'So we actually had more people who responded to the survey that they were between the ages of 90 to 100 than the people who were between 80 and 90.', 'start': 682.549, 'duration': 9.168}], 'summary': 'Plot data on a logarithmic scale to visualize extreme values, revealing more responses in the 90-100 age range than 80-90.', 'duration': 27.219, 'max_score': 643.499, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XDv6T4a0RNc/pics/XDv6T4a0RNc643499.jpg'}, {'end': 742.598, 'src': 'embed', 'start': 716.832, 'weight': 1, 'content': [{'end': 722.633, 'text': "So let me uncomment out this median age, and also I'm going to uncomment this color and this legend as well.", 'start': 716.832, 'duration': 5.801}, {'end': 728.815, 'text': 'So I went through and I calculated the median age of all of the respondents, and it was 29 years old.', 'start': 722.993, 'duration': 5.822}, {'end': 735.236, 'text': "So now let's plot a vertical line on our existing plot with that age.", 'start': 729.235, 'duration': 6.001}, {'end': 742.598, 'text': "So to do that, just above our legend here, I'm going to say plt.axvline.", 'start': 735.556, 'duration': 7.042}], 'summary': 'Median age of respondents: 29 years old.', 'duration': 25.766, 'max_score': 716.832, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XDv6T4a0RNc/pics/XDv6T4a0RNc716832.jpg'}, {'end': 787.823, 'src': 'heatmap', 'start': 755.622, 'weight': 0.825, 'content': [{'end': 758.583, 'text': "And the custom color I'm going to add as this.", 'start': 755.622, 'duration': 2.961}, {'end': 760.843, 'text': 'I think this is just a red color that I grabbed.', 'start': 758.643, 'duration': 2.2}, {'end': 765.345, 'text': "And also let's put in a label so that we know what this line represents.", 'start': 761.243, 'duration': 4.102}, {'end': 767.385, 'text': "And I'm just going to say age median.", 'start': 765.645, 'duration': 1.74}, {'end': 769.346, 'text': "So now let's run this.", 'start': 767.725, 'duration': 1.621}, {'end': 776.872, 'text': 'And now we can see that within our histogram, we now have this vertical line here, which is the age median.', 'start': 770.106, 'duration': 6.766}, {'end': 779.014, 'text': 'So this plot tells us a lot of things.', 'start': 777.193, 'duration': 1.821}, {'end': 787.823, 'text': 'It tells us how many people are falling within which age groups who answered the survey and also where the median is for those survey results.', 'start': 779.075, 'duration': 8.748}], 'summary': 'Added custom red color and labeled age median on histogram.', 'duration': 32.201, 'max_score': 755.622, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XDv6T4a0RNc/pics/XDv6T4a0RNc755622.jpg'}], 'start': 498.266, 'title': 'Analyzing survey data', 'summary': 'Explains survey data with responder ids and ages, including examples of 14, 19, 28, 22, and more, and demonstrates analyzing age distribution using a histogram plot based on the 2019 stack overflow developer survey data, revealing almost 40,000 respondents between 20-30 years old and the median age was 29, with additional insights on plotting data on a logarithmic scale and customizing plot features.', 'chapters': [{'end': 546.961, 'start': 498.266, 'title': 'Survey data explanation', 'summary': 'Explains survey data with responder ids and ages, with examples of 14, 19, 28, 22, and more, and how variables are set equal to the data.', 'duration': 48.695, 'highlights': ['The chapter explains the concept of responder IDs and age in survey data, providing examples of ages such as 14, 19, 28, 22, and more.', 'It describes the process of setting the IDs variable equal to the responder ID key and the ages variable equal to the entire age column in the data.']}, {'end': 983.452, 'start': 547.401, 'title': 'Analyzing stack overflow developer survey', 'summary': 'Demonstrates how to analyze age distribution using a histogram plot based on the 2019 stack overflow developer survey data, revealing that almost 40,000 respondents were between 20-30 years old and the median age was 29, with additional insights on plotting data on a logarithmic scale and customizing plot features.', 'duration': 436.051, 'highlights': ['The histogram plot showed that almost 40,000 respondents were between the ages of 20 and 30 and almost 25,000 were between the ages of 30 and 40, based on the 2019 Stack Overflow Developer Survey data.', 'The median age of all the respondents was calculated to be 29 years old, and a vertical line representing this median age was plotted on the histogram, providing a clear visualization of the age distribution.', 'The tutorial also introduced the concept of plotting data on a logarithmic scale to handle extreme differences in values, which allowed for better visibility of data for older age groups (70-80, 80-90, and 90-100) within the survey responses.']}], 'duration': 485.186, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/XDv6T4a0RNc/pics/XDv6T4a0RNc498266.jpg', 'highlights': ['The histogram plot revealed almost 40,000 respondents between 20-30 years old.', 'The median age of respondents was 29 years old, visualized with a vertical line on the histogram.', 'The tutorial demonstrated plotting data on a logarithmic scale for better visibility of older age groups.', 'The chapter explains the concept of responder IDs and age in survey data, providing examples of ages such as 14, 19, 28, 22, and more.', 'The process of setting the IDs variable equal to the responder ID key and the ages variable equal to the entire age column in the data was described.', 'Almost 25,000 respondents were between the ages of 30 and 40 based on the 2019 Stack Overflow Developer Survey data.']}], 'highlights': ['Almost 40,000 respondents between 20-30 years old', 'Median age of respondents was 29 years old', 'Almost 25,000 respondents were between the ages of 30 and 40', 'Histograms visualize data distribution within specific boundaries and group data into bins', 'Demonstrates the use of bins to divide data and plot how many values fall into those bins', 'Illustrates the exclusion of specific data ranges from the histogram by removing values from the bins', 'Creating a title, X and Y axis labels, and tight layout for the plot', 'Using 538 style to improve the appearance of the plots', 'Demonstrated plotting data on a logarithmic scale for better visibility of older age groups', 'Importing pandas and matplotlib libraries to plot age data', 'Providing code access on GitHub for viewers to follow along with the exact data used in the video', 'Brilliant.org is mentioned as the sponsor for the series of videos', 'The process of setting the IDs variable equal to the responder ID key and the ages variable equal to the entire age column in the data was described', 'The tutorial demonstrated plotting data on a logarithmic scale for better visibility of older age groups', 'The chapter explains the concept of responder IDs and age in survey data, providing examples of ages such as 14, 19, 28, 22, and more']}