title
Matplotlib Tutorial (Part 7): Scatter Plots
description
In this video, we will be learning how to create scatter plots 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 scatter plots in Matplotlib. Scatter plots are great for determining whether two sets of data are correlated. If there is a correlation, scatter plots allow us to spot these trends. Let's get started...
The code from this video (with added logging) can be found at:
http://bit.ly/Matplotlib-07
Matplotlib Marker Styles - http://bit.ly/Matplotlib-Fmt-Str
Matplotlib Colormaps - https://matplotlib.org/3.1.0/tutorials/colors/colormaps.html
✅ 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 7): Scatter Plots', 'heatmap': [{'end': 1246.482, 'start': 1226.5, 'weight': 1}], 'summary': 'This tutorial covers understanding scatter plots, their usage in python, customizing scatter plots, and utilizing color maps in python charts for data visualization, including plotting youtube video views and likes, with a mention of sponsorship by brilliant.org.', 'chapters': [{'end': 51.003, 'segs': [{'end': 51.003, 'src': 'embed', 'start': 0.229, 'weight': 0, 'content': [{'end': 3.771, 'text': "Hey there, how's it going everybody? In this video, we're going to be going over scatter plots.", 'start': 0.229, 'duration': 3.542}, {'end': 10.034, 'text': 'So scatter plots are great when you want to show the relationship between two sets of values and see if they are correlated.', 'start': 4.111, 'duration': 5.923}, {'end': 16.636, 'text': "So first, we're going to look at a basic example of a scatter plot using some data within our Python script here.", 'start': 10.494, 'duration': 6.142}, {'end': 20.778, 'text': "And then we'll look at some real world data that I have within a CSV file.", 'start': 17.077, 'duration': 3.701}, {'end': 28.602, 'text': 'And the data within the CSV file are the views and likes of YouTube videos on the trending page the day that I made this video.', 'start': 21.199, 'duration': 7.403}, {'end': 30.844, 'text': 'So that might be interesting to plot out.', 'start': 29.182, 'duration': 1.662}, {'end': 35.748, 'text': 'Now, I would like to mention that we have a sponsor for this series of videos, and that is Brilliant.org.', 'start': 31.164, 'duration': 4.584}, {'end': 38.511, 'text': 'So I really want to thank Brilliant for sponsoring this series.', 'start': 36.029, 'duration': 2.482}, {'end': 43.516, 'text': 'And it would be great if you all could go check them out using the link in the description section below to support the sponsors.', 'start': 38.771, 'duration': 4.745}, {'end': 46.098, 'text': "And I'll talk more about their services in just a bit.", 'start': 43.916, 'duration': 2.182}, {'end': 48.04, 'text': "So with that said, let's go ahead and get started.", 'start': 46.438, 'duration': 1.602}, {'end': 51.003, 'text': "Okay, so I've got some sample code pulled up here in my script.", 'start': 48.36, 'duration': 2.643}], 'summary': 'This video covers scatter plots to show the relationship between values, including youtube video views and likes.', 'duration': 50.774, 'max_score': 0.229, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/zZZ_RCwp49g/pics/zZZ_RCwp49g229.jpg'}], 'start': 0.229, 'title': 'Understanding scatter plots', 'summary': 'Discusses the use of scatter plots to show the relationship between two sets of values and showcases how to plot youtube video views and likes using python, with a mention of sponsorship by brilliant.org.', 'chapters': [{'end': 51.003, 'start': 0.229, 'title': 'Understanding scatter plots', 'summary': 'Discusses the use of scatter plots to show the relationship between two sets of values and showcases how to plot youtube video views and likes using python, with a mention of sponsorship by brilliant.org.', 'duration': 50.774, 'highlights': ['The chapter discusses the use of scatter plots to show the relationship between two sets of values and see if they are correlated, using Python script and real-world data from a CSV file.', 'The data within the CSV file are the views and likes of YouTube videos on the trending page at the time of the video creation.', 'The chapter mentions sponsorship by Brilliant.org for the video series.']}], 'duration': 50.774, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/zZZ_RCwp49g/pics/zZZ_RCwp49g229.jpg', 'highlights': ['Discusses the use of scatter plots to show the relationship between two sets of values using Python script and real-world data from a CSV file.', 'The data within the CSV file are the views and likes of YouTube videos on the trending page at the time of the video creation.', 'Mentions sponsorship by Brilliant.org for the video series.']}, {'end': 253.219, 'segs': [{'end': 78.726, 'src': 'embed', 'start': 51.423, 'weight': 0, 'content': [{'end': 57.388, 'text': "Now, first, we'll see how to use these scatter plots using this list of data directly within my script.", 'start': 51.423, 'duration': 5.965}, {'end': 61.831, 'text': "And then we'll look at a real world example with data that I'll load in from a CSV file.", 'start': 57.748, 'duration': 4.083}, {'end': 68.616, 'text': "Now, if you've been following along with the series, then you'll likely recognize the other matplotlib code that I've got here at the moment.", 'start': 62.211, 'duration': 6.405}, {'end': 72.339, 'text': 'But if not, then let me go ahead and go over this real quick.', 'start': 68.976, 'duration': 3.363}, {'end': 74.982, 'text': "So here at the top of the file, I'm importing pandas.", 'start': 72.719, 'duration': 2.263}, {'end': 78.726, 'text': "I'm also importing pyplot from the matplotlib library.", 'start': 75.322, 'duration': 3.404}], 'summary': 'Using scatter plots with data directly in script and from csv file.', 'duration': 27.303, 'max_score': 51.423, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/zZZ_RCwp49g/pics/zZZ_RCwp49g51423.jpg'}, {'end': 150.182, 'src': 'embed', 'start': 119.802, 'weight': 1, 'content': [{'end': 123.964, 'text': "Okay So now let's look at how to create a basic scatter plot.", 'start': 119.802, 'duration': 4.162}, {'end': 130.348, 'text': "Okay, so I've got a random list of values here for an x-axis and a random list of values here for a y-axis.", 'start': 124.285, 'duration': 6.063}, {'end': 132.79, 'text': 'And some of these values are repeated.', 'start': 130.829, 'duration': 1.961}, {'end': 141.096, 'text': "So to create a scatter plot out of these values, it's as simple as saying plt.scatter.", 'start': 133.171, 'duration': 7.925}, {'end': 144.878, 'text': 'And we want to do our x and our y values.', 'start': 141.676, 'duration': 3.202}, {'end': 150.182, 'text': 'So if I run this, let me make this a little larger here.', 'start': 145.179, 'duration': 5.003}], 'summary': 'Creating a basic scatter plot using random x and y values.', 'duration': 30.38, 'max_score': 119.802, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/zZZ_RCwp49g/pics/zZZ_RCwp49g119802.jpg'}, {'end': 212.119, 'src': 'embed', 'start': 185.088, 'weight': 2, 'content': [{'end': 189.71, 'text': 'So first of all, I feel like the sizes of the dots here are a bit small on this plot.', 'start': 185.088, 'duration': 4.622}, {'end': 193.452, 'text': 'And you can change that by setting the size.', 'start': 190.151, 'duration': 3.301}, {'end': 196.013, 'text': 'And that is an S argument.', 'start': 193.832, 'duration': 2.181}, {'end': 200.174, 'text': "So we'll set S equal to these sizes are always a bit weird.", 'start': 196.293, 'duration': 3.881}, {'end': 203.596, 'text': 'I have to always look up in the documentation how these are related.', 'start': 200.234, 'duration': 3.362}, {'end': 212.119, 'text': 'But if we run this, then now we can see that these dots are a little bit larger here on our scatterplot.', 'start': 204.316, 'duration': 7.803}], 'summary': "Adjusting dot sizes using the 's' argument made the dots larger in the scatterplot.", 'duration': 27.031, 'max_score': 185.088, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/zZZ_RCwp49g/pics/zZZ_RCwp49g185088.jpg'}], 'start': 51.423, 'title': 'Scatter plot usage in python', 'summary': 'Demonstrates the usage of scatter plots in python, initially with direct data and then with data loaded from a csv file, utilizing pandas and pyplot libraries, showcasing different plot styles and the display of random points between 1 and 10. it also highlights the importance of scatter plots in visualizing trends and outliers, and the indication of the lack of correlation in the current dataset. additionally, it demonstrates customizing scatterplot in python, including changing dot sizes, colors, and marker styles, with the ability to make a significant impact, such as increasing dot size to 500, and providing different marker styles.', 'chapters': [{'end': 119.401, 'start': 51.423, 'title': 'Scatter plot usage in python', 'summary': 'Demonstrates the usage of scatter plots in python, initially with direct data and then with data loaded from a csv file, utilizing pandas and pyplot libraries, and showcasing different plot styles and the display of random points between 1 and 10.', 'duration': 67.978, 'highlights': ['The chapter showcases the usage of scatter plots with direct data and from a CSV file, demonstrating the versatility of data visualization in Python.', 'The script imports pandas and pyplot from the matplotlib library, utilizing a plot style of seaborne and showcasing different plot styles.', 'The code includes X and Y data points between 1 and 10, with additional functionalities such as plot title, labels, tight layout, and the display of the plot using plt.show.']}, {'end': 184.668, 'start': 119.802, 'title': 'Creating a basic scatter plot', 'summary': 'Demonstrates how to create a basic scatter plot using random x and y values, highlighting the importance of scatter plots in visualizing trends and outliers, and the indication of the lack of correlation in the current dataset.', 'duration': 64.866, 'highlights': ['Creating a scatter plot using plt.scatter with random x and y values. Demonstrates the process of creating a scatter plot using random x and y values.', 'Significance of scatter plots in visualizing trends and outliers. Emphasizes the usefulness of scatter plots in identifying trends and outliers within data.', 'Indication of lack of correlation in the current dataset. Explains that the random scatter plot suggests no correlation between the two lists of random values.']}, {'end': 253.219, 'start': 185.088, 'title': 'Customizing scatterplot in python', 'summary': 'Demonstrates how to customize scatterplot in python, including changing dot sizes, colors, and marker styles, with the ability to make a significant impact, such as increasing dot size to 500, and providing different marker styles.', 'duration': 68.131, 'highlights': ['The chapter demonstrates how to change dot sizes in a scatterplot by setting the size using the S argument, with the ability to significantly increase the size, such as bumping it up to 500.', 'It also explains how to change the color of the scatterplot by setting the color using the C argument, with an example of setting the color to green.', 'Furthermore, the chapter illustrates how to change the marker styles in a scatterplot, providing an example of using an X symbol as a marker.']}], 'duration': 201.796, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/zZZ_RCwp49g/pics/zZZ_RCwp49g51423.jpg', 'highlights': ['The chapter showcases the usage of scatter plots with direct data and from a CSV file, demonstrating the versatility of data visualization in Python.', 'Creating a scatter plot using plt.scatter with random x and y values. Demonstrates the process of creating a scatter plot using random x and y values.', 'The chapter demonstrates how to change dot sizes in a scatterplot by setting the size using the S argument, with the ability to significantly increase the size, such as bumping it up to 500.']}, {'end': 445.87, 'segs': [{'end': 297.392, 'src': 'embed', 'start': 253.219, 'weight': 0, 'content': [{'end': 260.103, 'text': "so if we save that and we run it, Then we can see that now we have green markers and these green markers are shaped like X's.", 'start': 253.219, 'duration': 6.884}, {'end': 262.426, 'text': 'So let me close that out.', 'start': 260.444, 'duration': 1.982}, {'end': 268.471, 'text': 'Now I almost never use anything other than the default markers, but the option is available there if you want it.', 'start': 262.786, 'duration': 5.685}, {'end': 273.515, 'text': "But I'm going to remove that for now and just go back to those default circle markers.", 'start': 268.751, 'duration': 4.764}, {'end': 282.863, 'text': 'Now, another thing about scatter plots is that I think they look a lot nicer if we add edges to the circles and also give them some alpha so that we can see through them a bit.', 'start': 273.875, 'duration': 8.988}, {'end': 287.206, 'text': 'So, to show you what this looks like, let me add an edge and a color.', 'start': 283.203, 'duration': 4.003}, {'end': 290.387, 'text': "so I'll say edge color is equal to.", 'start': 287.206, 'duration': 3.181}, {'end': 291.988, 'text': "we'll just set that equal to black.", 'start': 290.387, 'duration': 1.601}, {'end': 297.392, 'text': "that's going to be the edges of the circles and for the line width.", 'start': 291.988, 'duration': 5.404}], 'summary': "Customize scatter plot markers with green x's, then revert to default circle markers. enhance with edges and alpha for a better look.", 'duration': 44.173, 'max_score': 253.219, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/zZZ_RCwp49g/pics/zZZ_RCwp49g253219.jpg'}, {'end': 365.436, 'src': 'embed', 'start': 340.868, 'weight': 2, 'content': [{'end': 348.201, 'text': 'well, having the ability to have multiple colors and sizes actually allows us to add additional data sets into our plot.', 'start': 340.868, 'duration': 7.333}, {'end': 355.988, 'text': "So for example, let's say that we have our current plot that we just looked at, but we wanted to add some additional information.", 'start': 348.581, 'duration': 7.407}, {'end': 361.554, 'text': "So, for example, let's pretend that our current plot is some survey data about a bunch of people,", 'start': 356.289, 'duration': 5.265}, {'end': 365.436, 'text': 'and we wanted to break down the data further into something more specific.', 'start': 362.034, 'duration': 3.402}], 'summary': 'Ability to use multiple colors and sizes adds flexibility to plots for incorporating additional data sets.', 'duration': 24.568, 'max_score': 340.868, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/zZZ_RCwp49g/pics/zZZ_RCwp49g340868.jpg'}, {'end': 425.013, 'src': 'embed', 'start': 381.406, 'weight': 4, 'content': [{'end': 387.13, 'text': 'and those will then give you different colors on your scatterplot, as long as you pass that into your method.', 'start': 381.406, 'duration': 5.724}, {'end': 390.592, 'text': 'So I have a colors variable commented out here.', 'start': 387.53, 'duration': 3.062}, {'end': 396.594, 'text': 'So let me uncomment this and let me move this above our scatterplot.', 'start': 391.272, 'duration': 5.322}, {'end': 399.856, 'text': 'And I think this will make a bit more sense once we plot this out.', 'start': 396.675, 'duration': 3.181}, {'end': 404.918, 'text': 'Okay, so the numbers in this colors list, these are numbers between one and 10.', 'start': 400.216, 'duration': 4.702}, {'end': 412.342, 'text': "Now, like I said before, maybe this could be a person's answer to how satisfied they are with a certain product or something like that.", 'start': 404.918, 'duration': 7.424}, {'end': 418.347, 'text': 'So each of these values will correspond to a data point in our x and y variables.', 'start': 412.882, 'duration': 5.465}, {'end': 425.013, 'text': "so now, if we pass this into our scatter method as the color argument so i'm going to say whoops,", 'start': 418.347, 'duration': 6.666}], 'summary': 'Using a color variable to represent satisfaction levels (1-10) in a scatterplot.', 'duration': 43.607, 'max_score': 381.406, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/zZZ_RCwp49g/pics/zZZ_RCwp49g381406.jpg'}], 'start': 253.219, 'title': 'Customizing scatter plots and colors', 'summary': 'Demonstrates customizing scatter plots with x markers and enhanced styling, and discusses using colors and sizes for data representation in scatterplots, allowing for more specific categorization of data.', 'chapters': [{'end': 322.084, 'start': 253.219, 'title': 'Enhancing scatter plots with custom markers and styling', 'summary': "Demonstrates customizing scatter plots by changing markers to x's and enhancing them with black edges and alpha to soften the color, resulting in a visually improved scatter plot.", 'duration': 68.865, 'highlights': ["Customizing scatter plot markers to X's and reverting back to default circle markers for visual comparison.", 'Enhancing scatter plot appearance by adding black edges to the circles and giving them an alpha value of 0.75 to soften the color, resulting in a visually improved scatter plot.']}, {'end': 381.406, 'start': 322.084, 'title': 'Customizing colors and sizes in plots', 'summary': 'Discusses customizing colors and sizes on a per mark basis in plots, allowing for the addition of multiple data sets into a plot and the breakdown of data into more specific categories, such as plotting ratings from 1 to 10 for different groups of people.', 'duration': 59.322, 'highlights': ['The ability to have multiple colors and sizes allows us to add additional data sets into our plot, such as plotting ratings from 1 to 10 for different groups of people.', 'Customizing colors and sizes on a per mark basis enables the breakdown of data into more specific categories, enhancing the visualization of survey data and other information.']}, {'end': 445.87, 'start': 381.406, 'title': 'Using colors in scatterplot', 'summary': 'Explores how to use a colors variable in a scatterplot to represent data points with different colors, with the numbers in the colors list ranging between one and 10, corresponding to data points in the x and y variables.', 'duration': 64.464, 'highlights': ['The numbers in the colors list range between one and 10, representing data points in the x and y variables.', 'Different colors on the scatterplot correspond to different data points, potentially indicating satisfaction levels with a product.', 'Using the colors variable in the scatterplot method results in different color dots for each data point.']}], 'duration': 192.651, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/zZZ_RCwp49g/pics/zZZ_RCwp49g253219.jpg', 'highlights': ["Customizing scatter plot markers to X's and reverting back to default circle markers for visual comparison.", 'Enhancing scatter plot appearance by adding black edges to the circles and giving them an alpha value of 0.75 to soften the color, resulting in a visually improved scatter plot.', 'The ability to have multiple colors and sizes allows us to add additional data sets into our plot, such as plotting ratings from 1 to 10 for different groups of people.', 'Customizing colors and sizes on a per mark basis enables the breakdown of data into more specific categories, enhancing the visualization of survey data and other information.', 'The numbers in the colors list range between one and 10, representing data points in the x and y variables.', 'Different colors on the scatterplot correspond to different data points, potentially indicating satisfaction levels with a product.', 'Using the colors variable in the scatterplot method results in different color dots for each data point.']}, {'end': 915.929, 'segs': [{'end': 516.078, 'src': 'embed', 'start': 445.87, 'weight': 0, 'content': [{'end': 454.125, 'text': '9 all of those are going to correspond to different colors here on our chart.', 'start': 445.87, 'duration': 8.255}, {'end': 456.467, 'text': "Now, I really don't like the colors that we're getting here.", 'start': 454.445, 'duration': 2.022}, {'end': 457.808, 'text': 'These are just shades of gray.', 'start': 456.527, 'duration': 1.281}, {'end': 461.27, 'text': 'We can actually change these by using a color map.', 'start': 458.388, 'duration': 2.882}, {'end': 466.294, 'text': 'And just like the marker symbols, there are a ton of built-in color maps that we can use.', 'start': 461.671, 'duration': 4.623}, {'end': 474.001, 'text': "And I'll be sure to leave a link in the description section below to all of the color map options if you'd like to play around with these as well.", 'start': 466.615, 'duration': 7.386}, {'end': 477.183, 'text': 'One that I personally like is called greens.', 'start': 474.701, 'duration': 2.482}, {'end': 483.629, 'text': 'So if I come down here after colors, and I say CMAP is that argument.', 'start': 477.624, 'duration': 6.005}, {'end': 487.974, 'text': 'CMAP is equal to and that is greens with a capital G.', 'start': 483.99, 'duration': 3.984}, {'end': 489.756, 'text': 'Be sure I put in a comma there.', 'start': 487.974, 'duration': 1.782}, {'end': 497.906, 'text': "Now let me run that and now we can see that now we're getting these different shades of green as the intensity.", 'start': 490.157, 'duration': 7.749}, {'end': 504.45, 'text': 'So I think the lighter ones are closer to zero and the dark ones are closer to 10.', 'start': 498.306, 'duration': 6.144}, {'end': 508.113, 'text': "But we really don't know based on how this is represented here.", 'start': 504.45, 'duration': 3.663}, {'end': 516.078, 'text': "So you're probably going to want to add a label for your color map too, so that people viewing our chart know what these colors represent.", 'start': 508.513, 'duration': 7.565}], 'summary': "Demonstrates how to change colors using color maps, such as 'greens', to represent different intensities in a chart.", 'duration': 70.208, 'max_score': 445.87, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/zZZ_RCwp49g/pics/zZZ_RCwp49g445870.jpg'}, {'end': 600.371, 'src': 'embed', 'start': 569.887, 'weight': 3, 'content': [{'end': 572.91, 'text': 'Now we can also change the sizes of our data points as well.', 'start': 569.887, 'duration': 3.023}, {'end': 579.037, 'text': 'So just like with the color, this can add in another way of explaining our data even further.', 'start': 573.311, 'duration': 5.726}, {'end': 583.042, 'text': 'So for example, I see a lot of scatter plots that use the size of the dot.', 'start': 579.358, 'duration': 3.684}, {'end': 586.163, 'text': 'For things like population and things like that.', 'start': 583.462, 'duration': 2.701}, {'end': 589.505, 'text': 'Or maybe even the sample size for that data point.', 'start': 586.884, 'duration': 2.621}, {'end': 594.048, 'text': "So I've got a random list of sizes commented out down here as well.", 'start': 589.845, 'duration': 4.203}, {'end': 600.371, 'text': 'So let me grab these and let me move those up underneath colors.', 'start': 594.408, 'duration': 5.963}], 'summary': 'Data points can be sized for visualization, useful for population and sample size.', 'duration': 30.484, 'max_score': 569.887, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/zZZ_RCwp49g/pics/zZZ_RCwp49g569887.jpg'}, {'end': 665.567, 'src': 'embed', 'start': 638.456, 'weight': 4, 'content': [{'end': 644.438, 'text': "let's now look at how we can plot out some real world data from a CSV file that I have here in my current directory.", 'start': 638.456, 'duration': 5.982}, {'end': 651.101, 'text': 'So, in the CSV file, I pulled down some of the data from the YouTube API,', 'start': 644.878, 'duration': 6.223}, {'end': 656.703, 'text': 'and these were the top 200 trending videos on the day that I recorded this video.', 'start': 651.101, 'duration': 5.602}, {'end': 661.365, 'text': 'And I wanted to do a scatterplot of their total views and their total likes.', 'start': 657.143, 'duration': 4.222}, {'end': 665.567, 'text': 'And I also calculated out the ratio of likes to dislikes as well.', 'start': 661.825, 'duration': 3.742}], 'summary': 'Plotting real-world youtube data with scatterplot and ratio calculation.', 'duration': 27.111, 'max_score': 638.456, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/zZZ_RCwp49g/pics/zZZ_RCwp49g638456.jpg'}], 'start': 445.87, 'title': 'Customizing color maps in python chart and using matplotlib for data visualization', 'summary': 'Explores customizing color maps in a python chart and introduces various built-in color map options. it also explains using matplotlib to create scatter plots with color and size variations and to plot real-world data from a csv file, including the top 200 trending videos on youtube with their view counts, likes, and likes-to-dislikes ratio.', 'chapters': [{'end': 489.756, 'start': 445.87, 'title': 'Customizing color maps in python chart', 'summary': "Explores how to customize color maps in a python chart, introducing various built-in color map options and providing an example of using the 'greens' color map to customize the chart colors.", 'duration': 43.886, 'highlights': ['Introducing various built-in color map options and providing a link to all the color map options.', "Demonstrating the use of the 'greens' color map to customize the chart colors."]}, {'end': 915.929, 'start': 490.157, 'title': 'Using matplotlib for data visualization', 'summary': 'Explains how to use matplotlib to create scatter plots with color and size variations, and how to plot real-world data from a csv file, including the top 200 trending videos on youtube with their view counts, likes, and likes-to-dislikes ratio.', 'duration': 425.772, 'highlights': ['Explaining the use of color bar legend to represent data intensity and adding labels to the color map for better understanding The chapter demonstrates adding a color bar legend to the scatter plot to represent data intensity, and adding labels to the color map to provide a clearer understanding of the data.', 'Utilizing different sizes of data points to convey additional information, such as population or sample sizes It explains how to change the sizes of data points in the scatter plot to convey additional information, like population or sample sizes, providing a more comprehensive understanding of the data.', 'Plotting real-world data from a CSV file, specifically the top 200 trending videos on YouTube, showcasing their view counts, likes, and likes-to-dislikes ratio The chapter discusses plotting real-world data from a CSV file, specifically the top 200 trending videos on YouTube, to analyze their view counts, likes, and likes-to-dislikes ratio, providing practical examples of data visualization.']}], 'duration': 470.059, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/zZZ_RCwp49g/pics/zZZ_RCwp49g445870.jpg', 'highlights': ['Introducing various built-in color map options and providing a link to all the color map options.', "Demonstrating the use of the 'greens' color map to customize the chart colors.", 'Explaining the use of color bar legend to represent data intensity and adding labels to the color map for better understanding.', 'Utilizing different sizes of data points to convey additional information, such as population or sample sizes.', 'Plotting real-world data from a CSV file, specifically the top 200 trending videos on YouTube, showcasing their view counts, likes, and likes-to-dislikes ratio.']}, {'end': 1271.077, 'segs': [{'end': 976.866, 'src': 'embed', 'start': 948.168, 'weight': 0, 'content': [{'end': 950.671, 'text': "So, I've got those put in there.", 'start': 948.168, 'duration': 2.503}, {'end': 952.033, 'text': 'Now, if I run this,', 'start': 951.092, 'duration': 0.941}, {'end': 964.275, 'text': "then now that it's using a log scale instead of a regular scale now we can see that those outliers don't skew the data so much and that we can kind of see the correlation better here.", 'start': 952.964, 'duration': 11.311}, {'end': 971.141, 'text': 'so the correlation between how many views a video has and how many likes it has really stands out here in this plot.', 'start': 964.275, 'duration': 6.866}, {'end': 976.866, 'text': "so now let's also use the ratio of likes and dislikes in this plot.", 'start': 971.141, 'duration': 5.725}], 'summary': 'Using a log scale reduces outlier impact, revealing strong correlation between views and likes in the plot.', 'duration': 28.698, 'max_score': 948.168, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/zZZ_RCwp49g/pics/zZZ_RCwp49g948168.jpg'}, {'end': 1102.484, 'src': 'embed', 'start': 1075.228, 'weight': 1, 'content': [{'end': 1086.074, 'text': 'we can see now that we get those colors representing the like to dislike ratio and we have our color bar here telling us what these numbers actually represent.', 'start': 1075.228, 'duration': 10.846}, {'end': 1091.057, 'text': 'so the ones that are more bluish green have, you know, performed less well?', 'start': 1086.074, 'duration': 4.983}, {'end': 1093.838, 'text': 'The ones that are bright yellow performed better.', 'start': 1091.417, 'duration': 2.421}, {'end': 1102.484, 'text': 'So the bright ones are up in the 90s and the ones that are a little darker and bluish green are kind of down in the 50s and 60s,', 'start': 1094.099, 'duration': 8.385}], 'summary': 'The brighter colors represent higher performance, with 90s for bright yellow and 50s-60s for bluish green.', 'duration': 27.256, 'max_score': 1075.228, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/zZZ_RCwp49g/pics/zZZ_RCwp49g1075228.jpg'}, {'end': 1187.975, 'src': 'embed', 'start': 1156.452, 'weight': 3, 'content': [{'end': 1159.874, 'text': 'They have some excellent courses covering the fundamentals of statistics,', 'start': 1156.452, 'duration': 3.422}, {'end': 1164.037, 'text': 'and these lessons do a deep dive on how to think about and analyze data correctly.', 'start': 1159.874, 'duration': 4.163}, {'end': 1170.241, 'text': 'They even use Python in their statistics courses and will quiz you on how to correctly analyze the data within the language.', 'start': 1164.397, 'duration': 5.844}, {'end': 1175.986, 'text': 'Their guided lessons will challenge you, but you also have the ability to get hints or even solutions if you need them.', 'start': 1170.561, 'duration': 5.425}, {'end': 1178.868, 'text': "It's really tailored towards understanding the material.", 'start': 1176.366, 'duration': 2.502}, {'end': 1182.511, 'text': "They've also recently released a programming with Python course,", 'start': 1179.188, 'duration': 3.323}, {'end': 1187.975, 'text': 'and they even have a coding environment built into their website so that you can run code directly in the browser.', 'start': 1182.511, 'duration': 5.464}], 'summary': 'Excellent statistics courses with python integration and guided lessons for understanding the material.', 'duration': 31.523, 'max_score': 1156.452, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/zZZ_RCwp49g/pics/zZZ_RCwp49g1156452.jpg'}, {'end': 1251.568, 'src': 'heatmap', 'start': 1220.094, 'weight': 2, 'content': [{'end': 1226.099, 'text': 'I hope you feel like you got a good understanding of how to use scatter plots and the kind of data that this type of plot is good for.', 'start': 1220.094, 'duration': 6.005}, {'end': 1232.846, 'text': "Now, like I said, it's really nice for seeing these correlations in the data, like how the views and likes were related for the trending pages.", 'start': 1226.5, 'duration': 6.346}, {'end': 1237.251, 'text': "Now in the next video, we'll be going over time series plots.", 'start': 1233.587, 'duration': 3.664}, {'end': 1244.5, 'text': "And these are very similar to the line plots that we saw before, but they're focused on data over a certain amount of time instead.", 'start': 1237.692, 'duration': 6.808}, {'end': 1246.482, 'text': 'So definitely be sure to check that out.', 'start': 1244.82, 'duration': 1.662}, {'end': 1251.568, 'text': 'But if anyone has any questions about what we covered in this video, then feel free to ask in the comment section below,', 'start': 1246.783, 'duration': 4.785}], 'summary': 'Understanding scatter plots for data correlations. next: time series plots.', 'duration': 31.474, 'max_score': 1220.094, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/zZZ_RCwp49g/pics/zZZ_RCwp49g1220094.jpg'}], 'start': 915.929, 'title': 'Using log scale, color mapping, and scatter plots in python', 'summary': 'Explains using log scale to reduce skewness in scatterplot, color mapping for like to dislike ratio, and discusses scatter plots for visualizing correlations in python. it also introduces brilliant.org as a resource for learning python and statistics.', 'chapters': [{'end': 1113.81, 'start': 915.929, 'title': 'Using log scale and color mapping in scatterplot', 'summary': 'Explains how to use a log scale to reduce skewness caused by outliers in a scatterplot, and how to represent the like to dislike ratio using color mapping, with brighter colors indicating better performance.', 'duration': 197.881, 'highlights': ['Using a log scale for the axes reduces the skewness caused by outliers in the scatterplot, allowing for better visualization of the correlation between video views and likes. Reduction of skewness in scatterplot, visualization of correlation between video views and likes.', 'Representing like to dislike ratio using color mapping in the scatterplot, with brighter colors indicating better performance and darker colors indicating lower performance. Color mapping to represent like to dislike ratio, interpretation of colors in the scatterplot.']}, {'end': 1271.077, 'start': 1113.91, 'title': 'Understanding scatter plots in python', 'summary': 'Discusses the usage of scatter plots for visualizing correlations in data and introduces brilliant.org as a resource for learning python and statistics, with interactive courses and a coding environment.', 'duration': 157.167, 'highlights': ['Brilliant.org offers interactive courses covering statistics and Python programming, with guided lessons and a coding environment on their website.', 'Scatter plots are useful for visualizing correlations in data, such as the relationship between views and likes on trending pages.', 'Introduction to time series plots is teased as the topic for the next video, focusing on data over a specific time period.', 'The video ends with a call to action, encouraging viewers to like, share, and subscribe, as well as support through Patreon.', 'Scatter plots are highlighted as a great way to visualize correlations in data, particularly for the relationship between views and likes on trending pages.']}], 'duration': 355.148, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/zZZ_RCwp49g/pics/zZZ_RCwp49g915929.jpg', 'highlights': ['Using a log scale for the axes reduces the skewness caused by outliers in the scatterplot, allowing for better visualization of the correlation between video views and likes.', 'Color mapping to represent like to dislike ratio, interpretation of colors in the scatterplot.', 'Scatter plots are useful for visualizing correlations in data, such as the relationship between views and likes on trending pages.', 'Brilliant.org offers interactive courses covering statistics and Python programming, with guided lessons and a coding environment on their website.']}], 'highlights': ['Plotting real-world data from a CSV file, specifically the top 200 trending videos on YouTube, showcasing their view counts, likes, and likes-to-dislikes ratio.', 'Using a log scale for the axes reduces the skewness caused by outliers in the scatterplot, allowing for better visualization of the correlation between video views and likes.', 'The chapter demonstrates how to change dot sizes in a scatterplot by setting the size using the S argument, with the ability to significantly increase the size, such as bumping it up to 500.', "Customizing scatter plot markers to X's and reverting back to default circle markers for visual comparison.", 'Enhancing scatter plot appearance by adding black edges to the circles and giving them an alpha value of 0.75 to soften the color, resulting in a visually improved scatter plot.']}