Python for Decision Makers and Business Leaders Transcripts
Chapter: Data science in Python
Lecture: Getting started with JupyterLab demo
0:00 It's one thing to hear about Jupyter.
0:01 And Jupyter notebooks but to see them in action
0:03 well that's something entirely different.
0:06 So the next demo that we're going to do
0:08 in this course, may be the very last one actually
0:10 is going to be working through a small analysis
0:13 of real data out on the internet using Jupyter.
0:17 Over here, I've already set up
0:18 an isolated environment with Jupyter.
0:21 All I have to do over here is type jupyterlab
0:22 after installing those things.
0:24 Just going to get started and launch a browser here.
0:27 The browser's going to log my into my Jupyter server.
0:31 So what I want to do is I want to create
0:32 a new notebook, and I have these different environments
0:35 this is the one that I've set up for this course.
0:37 And it's all ready to go.
0:39 Click here, it creates this not named, which
0:42 is kind of annoying so we're going to call this
0:46 reference counter, something like that.
0:48 Now, what is this thing that we're in here?
0:50 So, what we can do is we can type in different
0:52 types. We can either type out raw stuff
0:55 we can type in markdown, which is a way
0:57 to write in formatted text.
0:59 If we go over here I can type something like this
1:01 and what were going to do is, we're going to go to
1:03 a site and were going to analyze
1:05 what is the relative reference counter
1:08 or authority of other sites, according to this one?
1:12 What I mean by that is let's take all the links
1:14 to the site and figure out where it's looking
1:16 out to in the world. Figure out the domain names.
1:19 Maybe Github or Twitter, or Python.org.
1:23 How many times do each of those appear
1:25 and then draw a graph, say we'll this one
1:26 is the most popular, so it has the most authority.
1:29 We refer back to it the most.
1:32 So we can type markdown, that's in markdown.
1:34 We can type a little title here.
1:37 We're going to use a place called Python Bytes.
1:38 So, hit a button to execute that markdown
1:42 and over here, on Python Bytes
1:44 this is one of the podcasts that I run.
1:45 You maybe remember that from the beginning.
1:47 And what we do, is we have a whole bunch
1:49 of episodes here. And if you go into them
1:51 you can see that we refer back to many things
1:54 this one's referring to Real Python.
1:56 And if we go down this one's referring over to
1:59 docs.python.org, and so on.
2:02 If you look across all these episodes
2:04 we have an RSS feed here at the bottom.
2:06 You can pull that out, which is in XML format.
2:09 And basically this is what the podcast players use
2:11 to subscribe to the show, get the show notes
2:13 and all that kind of stuff.
2:15 So we're going to use that as an easy way
2:16 to get all of these show notes
2:18 across all of the different episodes.
2:20 Instead of trying to go to each page separately.
2:24 So over here, we can, see that, we can add a new
2:27 markdown section and say
2:30 we will download the RSS feed, analyze all the lengths
2:34 and extract the domain names and plot them by popularity.
2:37 Let's fix that spelling, also.
2:40 Here we go, so the next thing now
2:41 this is a little bit of a description, we could
2:42 have pictures and whatever, but the next thing
2:44 we want to do is add some code.
2:46 So over here I could just come up with some variables.
2:52 If I run it, you can see, it executes this code.
2:54 X and Y, if we add them together and don't assign it
2:57 it'll just print out the value, like this.
2:59 Obviously, that's useless to us.
3:01 But that's what this Jupyter Lab is all about.
3:03 We're going to write a little bit
3:04 of Python, a little bit of a description.
3:06 Little bit of Python, little bit of a picture.
3:09 Little bit of Python and as you go through it
3:11 you can poke at the data, you can look at it
3:13 this way and that way and transform it.
3:15 And it's a very exploratory type of experience
3:17 that we're going to have.