‫So to start up a Jupyter Notebook, we type in Jupyter Notebook and don't worry if you're not sure what
‫a Jupyter Notebook is, we'll have a section on that which goes through how you can use Jupyter notebooks.
‫All you need to know for now is that a Jupyter Notebook is somewhere where you can write Python code,
‫especially machine learning and data science code, and write text around it and share your work with
‫others.
‫It's kind of like a big work pad that you can use and just pass it around.
‫Online will have plenty of experience with that as we go on.
‫We'll hit Enter.
‫Now what?
‫The Jupiter command not found.
‫Why is that?
‫Well, we go over here.
‫When we ran the command before for Conde to create, we had mapped plot lib pandas numpy cyclone.
‫But we missed out on the Jupyter package.
‫Hold on, let's go up.
‫Did we install the Jupiter package?
‫We didn't map plot lib numpy pandas.
‫Cyclone?
‫No, Jupiter.
‫So that's why it's come back.
‫Jupiter command not found.
‫So how do we fix this?
‫Well, again, we can use our personal assistant, conda.
‫Conda install.
‫Now install is a command where it's like, okay, I'm missing a package and I want to use it in package.
‫I want missing a tool and I need to use it.
‫So I'm going to say, Conda, install this tool for me.
‫In our case we want the Jupiter tool.
‫So Conda install Jupiter.
‫Now of course we could have type this up here before, but I've missed out Jupiter on purpose so I could
‫show you this Conda install.
‫We could have put Jupiter here on the end after cyclone.
‫But we're going to run it here into now again this is going to go on is going to it's going to tell
‫Conda we want Jupiter, it's going to query the Internet and is like, okay, the following new packages
‫to use Jupiter.
‫I'm going to install all of these for you.
‫We're going to hit.
‫Yes.
‫Thank you, Conda.
‫This is going to take a few seconds again.
‫Now I know this is this is getting to be a long process, but once we've gone through this, we'll be
‫able to to automate this to almost just one line of code.
‫So in the future for future projects, once you understand that the concept of creating a project folder,
‫creating an environment, we'll just be able to make it nice and simple and do it in one step.
‫For now, we're just going through it step by step so we can get the concepts as well as get a baseline
‫environment set up for our future projects.
‫And trust me, it took me a long time to get these concepts.
‫So don't go thinking, Oh, Daniel is entering these codes and he knows what to do is well, it's only
‫because I've had a little bit of practice with this or I'm and I know this setting up environments is
‫one of the biggest problems that we ran into working on a team of machine learning engineers.
‫So once you get this down pad, everything else becomes a breeze.
‫Not really, but.
‫But yeah, you'll see.
‫Okay, so what did we just do then?
‫We ran the command.
‫Conda Install Jupyter Now we're not going to run that again, but what do you think this is done?
‫We go back here, we go to our project folder, we go to our environment folder.
‫Now, if we had my get rid of this one because that's not we're going to install now we've got this
‫in our environment.
‫That was Cat first, but we'll see that we don't need that for what we're doing now.
‫We can use that in another project.
‫So what have we done?
‫We've got now an environment that we've created with Jupyter Map, plot, lib pandas, cyclone and Num
‫Pi.
‫Now what you need to know is that we're going to use Jupyter Notebooks and we're going to use these
‫tools for the majority of our data analysis steps.
‫So this is kind of what we've just set up.
‫We've set up an environment with these tools, but there's no use just talking about it.
‫Let's see it.
‫What can we actually do now?
‫Now we've got Jupyter.
‫Can we run the Jupyter Notebook?
‫Come on.
‫We try to perform Jupyter Notebook.
‫If we've done this right, this should load up the Jupyter interface.
‫Beautiful.
‫And we're going to go through this in a future lecture.
‫But for now, what you need to know is what we can see here is that MB folder.
‫Why can we see that?
‫Well, if we go here, the MB folder, this is what we're seeing.
‫Let's click on this one.
‫So let's go to all these things Bin Condor, Meta Doc, etc..
‫Same thing.
‫Ben, condom meta doc, etc..
‫Beautiful.
‫We don't have to worry about that.
‫Condoms taking care of that.
‫This is our environment with all our tools in it.
‫What we care about for making Jupiter in Jupiter's interface is creating a new Jupiter notebook.
‫You can do that over here for Python three.
‫Let's try it out.
‫So this is going to create a new Jupyter Notebook.
‫And look, this is our workspace.
‫You're going to get very used to using this beautiful interface.
‫I actually really love Jupyter Notebooks.
‫So you can write code.
‫It's Python code, right?
‫So you can do one plus one.
‫You can do print.
‫Hello, hello world.
‫So you can do a few things in it.
‫You can even write full functions.
‫We're not going to do that because we're just focusing on seeing if our environment is set up.
‫Now, there's a few more steps that we can do or one more step really we can do to check it.
‫Now remember, we've installed Matt plot lib pandas, cyclone and numpy into our environment and we've
‫ticked off Jupyter because this is a Jupyter Notebook, so we've ticked that off.
‫Now I want to check if these are available.
‫How do we do that?
‫Well, we can import them and but import is saying, hey, python, go and grab these tools so I can
‫use them in my notebook.
‫Import pandas as PD.
‫Now pandas get shortened to PD because it saves us typing out pandas a lot.
‫So just just know that pandas whenever you see PD, it probably means pandas import numpy.
‫As MP non-po I get shortened to MP import map plot lib dot or book dot pi plot as PLT.
‫Now the plots we want to make are from the PI plot module of map plot lib and that gets shortened to
‫plt import src line.
‫Which is short for psychic loan.
‫All these all these little acronyms.
‫Don't worry about knowing them.
‫Too much of my heart.
‫For now, you can just copy, copy and paste this sort of stuff.
‫I'll make sure there's a demo notebook in the in the resources section.
‫But to test this, we're going to hit shift and enter.
‫Shift and enter is how you run a cell and Jupiter.
‫Watch as that number goes up on the left.
‫Three, four, four, five.
‫We do another one.
‫Escape B creates a new cell.
‫You will.
‫We'll learn all these in Jupiter.
‫So print.
‫Hello, beautiful.
‫That's going to be cell six because that's how many cells we've run.
‫So this one should be seven if we hit shift and enter.
‫Excellent.
‫Now, why did this work?
‫Well, remember the code that we ran?
‫We're not going to run it in terminal again, but it's going to be conduct, create prefix.
‫This line of code is what helped us set this up.
‫Prefix pandas num pi map plot lib cyclone.
‫What we've done is we've created a conda environment in our sample project folder and we've installed
‫pandas num py map plot lib cyclone.
‫But then we tried to run Jupyter but we couldn't.
‫So we used Conda, installed Jupyter, and then we could access this Jupyter Notebook.
‫So that's the workflow.
‫We have our computer, we downloaded many Conda which came along with Python and Conda came along with
‫Mini Conda.
‫And so then we came into this one and what we did on our computer was we created a project folder and
‫then within that project folder we used Conda to create an environment which now contains these tools.
‫So what does that mean?
‫Well, that means that we can now use this environment to work with our data and start to build machine
‫learning models, start to analyze data.
‫And because we've done it with Conda, if we wanted to share our environment with someone in the future,
‫we can.
‫But don't take my word for it.
‫Let's go back over to to find her.
‫If we look in the sample project folder, we've got M and Untitled IP and B that stands for AI Python
‫Notebook, which is the old name for Jupyter Notebooks.
‫So now our notebook with all of this code that we've just done, is also within our project folder.
‫And you're starting to see the value of having everything in one place.
‫So now we could just go, Hey, friend or colleague or anyone else that you want to share your work
‫with, send them this folder and make sure the folder contains our environment, which are the tools
‫we use so our workbench and the code we're going to write.
‫Well, we don't have much code, but it'll send, it'll send this across to our, to our colleague or
‫teammate.
‫Now there's one more thing before we finish up and that's closing an environment and exiting.
‫Jupyter So when you start a Jupyter Notebook, we're back in terminal here, it'll have all these come
‫up in in your terminal.
‫Now to get out of it, to close your Jupyter Notebook down, you might do this at the end of your day
‫or whenever you're finished work and you want to start a new project or work on another project.
‫We're going to hit control and see at the same time that control and see whenever you're in terminal
‫or something like that is like saying, Hey, kill the current running process.
‫So we're going to do that.
‫Control C shut down this notebook server.
‫Yes, we're going to hit.
‫Yes.
‫Or maybe we timed out for that.
‫We'll try again.
‫So we've shutting it down.
‫Now we're going to see a connection failed here because we're no longer connected to our Jupyter Notebook,
‫which makes sense because we just shut it down.
‫That's okay.
‫But you see, we're still back in our environment.
‫We've got our environment active now.
‫Say, for example, we wanted to change to another project.
‫So another project of this in a different environment.
‫We want to exit the one we're currently in to go to another one so we can go.
‫Conda To deactivate environment you type conda deactivate which is telling Conda Hey exit me out of
‫the environment I'm currently in because I want to go into another one.
‫So we'll do that.
‫Conda Deactivate.
‫Now look, we're back to base.
‫So if we go to Conda End List, that will tell us the list of violence we have.
‫We have base.
‫Now, when we downloaded Mini Condor, remember how I said it comes with the bare essentials?
‫What do you think would happen if we tried to run a Jupyter Notebook from the base environment?
‫Let's try.
‫Jupiter command not found.
‫Why is that?
‫Well, because remember, when we created this environment, we installed Jupiter base doesn't have
‫that.
‫It has the bare necessities.
‫We had to create our own custom move before we could access Jupiter.
‫Now, how would we get back into this?
‫Back into working on our project?
‫Now, these steps I'll include in the resources section, but this is what you'll probably get most
‫used to when working on different projects.
‫Alright, so we go here to activate, remember Conda?
‫We wrote this one down earlier.
‫Conda Activate which is saying Conda, hey, activate my environment called this one.
‫We're going to type that out users yours might be different.
‫Remember this is custom depending on what you've labeled your your projects or your environments.
‫The standard name is mvo so that might not change.
‫This project will folder might change depending on what project we're working on and this user might
‫change depending on on your actual user and you might not even have it on the desktop.
‫So remember this line of code will be custom depending on your own settings.
‫We're going to hit enter.
‫So see how we've just changed from base back to this.
‫So now we're active in our M so if we type in Jupyter Notebook, remember this is the workflow Jupyter
‫Notebook we come back we're going to see.
‫This is the Jupiter interface, and this is the notebook we created 5 minutes ago.
‫And we come in here.
‫Now, whenever you come back to a Jupyter Notebook, these cells are going to reset.
‫So one, two, that was just five.
‫That was six.
‫Now it's going to be three.
‫This will be four.
‫And again, we're going to have a whole section on Jupiter notebooks.
‫But this is the main thing we need to remember for now.
‫Beautiful.
‫We're back in our environment, back working.
‫Let's just do a quick recap of what we've actually done.
‫Have our computer.
‫That's all we started with.
‫We downloaded many conduct which came along with conduct, and we come into this one.
‫We wanted to set up an environment to work on our heart disease project.
‫So what did we do?
‫We had our computer.
‫We created a project folder on our desktop called Sample Project.
‫And then we used Conda to create an environment and installed these tools.
‫Jupyter Map Plot Lib NumPy Pandas cyclone into our environment and what we were left with we come back
‫to Finder is we've got an environment folder within our sample project folder and a Jupyter notebook
‫with some template code.
‫Now you'll see in the future projects that these lines here are going to form the basis of many future
‫projects.
‫These these four tools themselves are fundamental to machine learning and data analysis as a whole.
‫So you'll probably get very familiar or you will get very familiar if you go through this course, importing
‫them and using them.
‫But that's enough for now, remember?
‫If you get stuck, check the resources section.
‫Don't forget to look at something like this flow chart.
‫There's also a blog post that goes along with it, but that'll all be in the resources section.