Python for Decision Makers and Business Leaders Transcripts
Chapter: Data science in Python
Lecture: Graphing the top 25 domains

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Finally now that we have these top 25 let's just do a quick graph. Now I'm just going to copy some stuff over because the graph is kind nitpicky
0:08 and the details are not important. So what we're going to do is we're going to put in an import to use matplotlib and numpy
0:15 and then we'll just do the graph like this and I just set the figure size. Come up to Values, and I'm going to create a histogram bar chart here.
0:23 We hit it, and look at that. We are done. We have GitHub and Twitter and Python Bytes and now you can really tell what is important and what isn't.
0:32 And with that long tail, it tails off quickly, doesn't it? So we've done it. We've gone through winter Python Bytes
0:39 downloaded the RSS feed, 2.5 megs of it. We've pulled it apart to just get the description and then we kind of made a note to ourselves
0:48 and then for each one of those, we said let's parse that HTML and just get the links From the links, we're going to get the domains
0:54 and once you have the domains you just do a quick count and boom here you go. Throw that at the graph in matplotlib. Done. Besides the graphepart
1:03 I don't think there's anything that's super complicated. Maybe not everything you're familiar with but I hope you were able to follow along
1:08 and I hope this experience really showed you the power of Jupyter, Python for understanding data and just going out to, not just some local data source
1:18 but going to the internet and grabbing that data and then turning it into insight within just a couple of minutes, beautiful.


Talk Python's Mastodon Michael Kennedy's Mastodon