 So here we are in our first video. We're going to look at Google Colab, the place that we're going to do all our analysis in. Now it's part of Google Drive. So if you've got a Google account, fantastic. If you haven't got one sign up, it's all free of charge. You don't have to install anything. You don't have to do anything. I'm thinking most of you have seen a Google Doc before and it's as easy as using a Google Doc. So go to your Google account, go to your Google Drive. I'll see you there. Google Drive Most of us are familiar with Google Drive. So I'm using my Chrome browser here, and I've logged into my Google Drive. If you've never seen it before, you click on new. You can start a new Google Doc, a new sheet, a new slide. But if you go down to more, I see here Google Colab. I'm going to say Colab because there are various pronunciations for this full name. We'll just refer to this Google Colab. Now Google Colab is a Python development environment using or at least based on Jupyter Notebooks. I'm going to show you exactly what a notebook is. A notebook is going to allow us to write normal English sentences, write our code, do our analysis, create our plots and graphs. A wonderful environment. You don't have to install anything at all. So let me show you my first notebook. At the top here, you can see I'm in my Drive. That's where you're going to be when you start your Google Drive. Coursera is a folder I created. So it was just new folder. Inside of that, another new folder, Understanding Clinical Research. And inside of that, I've got week one data. And these are the files that are already in there. And you can see they're all Google Colab files. But let's open this first one, which is here. If I right click on it, I can say Open With. And Google is going to recognize that this is a Colab file. So it's going to open that Colab file for me. And here we go. A Google Colab Notebook. If I click on the top here, I can actually just rename it anything I want. I can give it a name. And I've given it a name 01, our first Colab Notebook. And you see the file extension there? All computer files have a file extension. It's .ipynb. That's done automatically by Google. Nothing for us to worry about. And just I'm just scrolling up and down this document. Have a look at it. I can make comments on the top just as you would do for Google Doc. On the left hand side, I have a table of contents. And as I start creating this document, it's going to create this table of contents for me. I don't have to worry about that at all. There's also some other stuff up here that we'll get to later. But on the right hand side, or the main part of the screen, we just see my document. Right at the top, there seems to be a title. And if I click on this little triangle, I can just open and close this little section. And I come to a next little section that I can open and close. And let's double click on this. And you see it's actually just this cell. We call this whole thing here cell. And I can write normal English sentence there. I can decide how big I want this to be, just like you do in a Word document. You can decide how large you want the title to be. And what we do under these circumstances, if we want to know, if we want to tell Colab how big we want the sticks to be, we just use a number of pound symbols, or I think we'll call them hashtags these days. So one hashtag means the largest possible text you can. We usually use those for titles. And if I go to two hashtags, it'll mean it's slightly smaller. You can see a jump to something smaller. Three hashtags, it's even smaller. So it's nice way for you just to control how large you want your titles and subtitles to be. So I've just written the word clinical research there. I can do bold, italics. I can insert a picture here, all sorts of things, bullet points, numbered bullet points. It's like a Word document, nothing other than a Word document. And if I'm inside the cell and I hold down shift and I hit enter or return on a Mac, it's going to execute the cell. And it's just displaying to me to the screen exactly what I wanted. I wanted the title, the largest possible size, and I wanted to say clinical research as simple as that. Now I've put some of these little files here that display for me the logo there, another logo, another logo to remind you this is brought to you by my research group at the University of Cape Town and really in support of my course on course zero on understanding clinical research. We're going to use Python and we're going to do some coding analysis. We're going to follow the same chapters as we do in the course. But really, if you haven't done the course zero course on understanding clinical research, explaining to you what a P value is, what confidence intervals are, etc., you don't have to. You can just follow along here on YouTube and we can look at how to use Python to do some clinical data analysis, some biostatistics, if you want to call it that. Now to do these logos, I'm just going to double click on the cell quickly and you're going to see the code that I've written for this. It looks a bit difficult, but it really isn't. It's copy and paste and we're going to get to how exactly to do that. If you look closer, though, you see these little tags here, a diff tag and image tag. This is just HTML. HTML is the language that is used to create web pages. So I can even just write normal HTML. Again, don't worry about this. This is really, I didn't type all of this. This is copy and paste stuff and I'll show you where to copy and paste it and how to copy and paste it. If you want these beautiful logos, your own logos, your own images to appear, you've stored them on your Google Drive, you can just have them display right here inside of your notebook. The next cell we have, and by the way, look at the right hand side. When I'm on a cell, I get some things to do. I can move the cell one cell up if I want to rearrange the cells and I can link to the cell from other places. That's a bit advanced. I can add a comment to this. If I'm sharing this document with someone else, I can edit the cell and that's exactly what we want to do. I can also just double click on it. Remember when we were up here, I double clicked on the cell and to execute that cell is to shift and enter, shift and return. So I'm inside of the cell. Let's click on it. Let's try to edit it. By the way, there's also deleting it. And look what I've written here. Load Colab to your Google Drive. And it's just a sentence that I've written and I've put a URL there, a link, and I can just write it. HTTPS, slash, whatever you want, and it's just going to appear as a hyperlink automatically. And there you go. And the reason why I put it there is you're going to start using Colab. You're going to go back here and you're going to say new, more, and Colab might not be there for you automatically. To have that just appear for you as if by magic, go to this website, colab.research.google.com. So that's what I've put in there, colab.research.google.com. If you go there, this little page is going to open for you. You can check out any of these Google notebooks, but you can also click off of it. And it's going to tell you all sorts of things about Colab that you can read on your own, see those beautiful plots there. We're going to make ones that look even better and that are interactive and some hyperlinks there, et cetera. So this is Google telling you what Colab's all about. But what I want you to do is click right there, copy to Drive. And that's going to copy this notebook, Google's notebook, onto your Google Drive. And once it's on your Google Drive, Google Colab's also on your Drive. So if you don't see Google Colab under New, More and Google Colab, go to this website, colab.research.google.com and just copy this to your Drive. And now suddenly Colab would be available to you. But let's get on with our notebook here. There's another title. So how did I just add these? You might wonder, well, it's beautiful to see all of these, but how do you add this? Well, there's two ways. If I hover in between two cells, look at that, it says I can add a new cell, see the plus there, in which I can write code or I can click on this one if I want to add a new cell into which I want to add text or these logos or pictures or whatever, I'll click on text. And wherever I am, I can also come up here, click on plus code there or plus text there, depending on what I want to add. So best place is just to hover between two cells right in the middle here and just decide what you want to add. Remember, you can always rearrange things later. I can move it down, I can move it up. Anyway, remember how to do this, single hashtag, space, title, hold down shift, hit enter. And there it is, beautiful subheading. I wrote the word subheading there, but I put two hashtags and you can clearly see the difference in the size of the text. So do whatever you like. This is an artistic board, almost design your documents, whichever way you want. What I did here though, is to add a code cell. So in this cell, we're going to write some actual code. Now don't worry about the code at all. I'm going to show you how to do all of this. Let's just look at these two lines of code. Now you're going to see a little hashtag there as well. Inside of a code cell, that hashtag has a completely different meaning. It's actually Python code. And it is Python code for please ignore this whole line of code. So it tells the Python interpreter, that's the inside of Python, which is just going to execute your code. It says ignore this line please. So why is it there? Well, it is there because it's always good practice to make comments on your own code. You're going to view your code months from now. And you won't remember what you're trying to achieve in that cell. Or you might share your document with others. And you want to let them know what your idea was behind this code. So leave comments for yourself and for others. And you prepend a comment by a hashtag, that hashtag space and then write. So it's only on that line. Once you hit enter, return to go into a new line, you can't just keep on typing. All of that has to be on one line. And Python is just going to ignore that line. And the next line of code, I've used the print function. Now, I call it a function print. It's one of a keyword. It's a keyword inside of Python. And Python has many keywords like all other computer languages. And those are reserved words. And they actually execute something. They do something. You give it something and some input and it outputs something. And we're going to look at many, many functions. This is the print function. And it's just going to print stuff to the screen. And what I give to it, the input that I give to functions, we call arguments. And arguments go inside of these set of parentheses. So all functions in Python three and above, especially the print function, they have these parentheses. And you pass some input called an argument to the function. And it's going to output something. The print function outputs something to the screen. And you can already see, I've already run this line of code. It's just going to execute that. What you also see is a little arrow, a little run button here on the left hand side. So instead of holding shift and enter, I can also click on that button. And that's going to run that cell. Look what's happened at the top here quickly though. It says connecting. And that means we are connecting to the servers at Google. And they're going to spin up for us an instance of Python so that we can run Python. Now, depending on where you are connecting from, how busy the network is, et cetera, it might take a little bit of time. But there we go. We can see how much RAM is available to us and how much we're using and how much disk space Google is giving us, all free of charge, by the way, and how much we're using at the moment. And now it's connected and this line of code is executed. And you can see it prints there. This is a line of code, exactly as I typed here. We're going to learn in the next section just some simple arithmetic. So there's my line of comment. Simple arithmetic. And I wrote two space plus space two. You don't have to put those spaces, but it just looks nice if there are spaces. And if I hold down shift and enter, shift return, or I hit that little play button, it's going to execute that two plus two is four as simple as that. So this is right there own line of code. Four minus two, shift enter. Four minus two is two. And behold, it's two. It looks like it takes a long time, but it really doesn't. We can do much bigger stuff and it'll take exactly the same time. This is sending it to Google and it has to send it back to you. That's the delay, the actual calculation is very, very quick. So I've got some exercises for you. Remember, how did we do this? If I double click on it, it's just one, two, three hashtags. That means it's level heading three, three in HTML parlance. So it's a bit smaller. And I want you to do the following. Now, before you do it, let's just double click on here and see how that was created. I just typed one dot space, my line of code next line two dot space. And if I had shift enter, and well, it's just a numbered list there. Just as easy as that to create a numbered list. I want you to then create a title named arithmetic, create a subtitle named multiplication, write a line of code, following an appropriate comment always to multiply three and four, and then write a line of code following an appropriate comment to print this is easy to the screen, and write the same sentence as in four, but put it in a text cell. And so pause the video here, spin up your own instance of Google Collab on your drive, and do this exercise. Okay, I hope you've done all of that. It wasn't too difficult. Of course, if you have any problems, you can leave some comments down below. I'll answer those for you, even if it means making another video, perhaps someone else in the community can help you as well. But that's the solution file I've already created it. So I'm going to right click on it, open with Google Collab. Let's look at the solution to those exercise questions. So it's going to load a page, you'll see the connect there at the top, you can also click on connect. So before you start executing code, that first line of code that's already connected, and so really spun up. But you can see arithmetic there as a h1 header or title multiplication looks slightly smaller on the screen. So there was two hashtags, we've done our multiplication, we've printed something to the screen, and we've used a code cell to do that. What I'm going to do for you here is just redo all of this at the bottom here. So right at the top, if this was now blank page for you, you could just start at the top, and I'm going to start down here and just recreate all of those. So that first code cell that I want is actually not a code cell, but a text cell. So I'm going to hit on text, I can click in there and just start typing. By the way, I can also repeatedly click on this, the toggle heading 12345123, it goes to, but you can type up to six if you wanted to. So let's just do it ourselves. I'm going to use one hashtag and I'm going to write arithmetic. And I'm going to hold shift and hit enter. This is a PC, but you can hit shift and return on your Mac. And there we go. You can see it automatically made a new cell for us, and it is always going to be a code cell. So no matter, we want another text cell. So we're just going to hover there and put a text cell in there. Remember this time we want two hashtags. We want a slightly smaller multiplication, shift enter, shift return, it's there. Now, as I said, the next line, it's going to add a new cell for you. And it's automatically going to be code. So we can just start writing it. We're going to leave a comment for ourselves. So hashtag again, multiply three and four, enter. Nothing's going to happen when you do enter. It's just a new line of code. I'm going to say three times four. Now, we all know on a keyboard, there's no such thing as a multiplication symbol. So in most computer languages, that is shift star. So that's shift eight on my keyboard. So three times four. And shift enter or hit that little run button and three times four indeed is 12. The next was also a line of code. And we wanted to print something to the screen. And I'm going to say printing, printing a, let's correct that printing a string to the screen. The print function as always. And remember what I said, we have to put the argument, the input inside of parentheses directly after the print function. But you can see a little, a little tool tip appeared for me there. It said, well, we recognize what you're trying to do here. So if I click on that, it knows what we're talking about. If I hold down shift and the open my first parentheses, see it already did the closing one for me. I didn't have to do the closing one. But look at that. It gives me information about this Python keyword, this Python function print. It says prints the value values to a stream or to sys standard out by default, optional keyword arguments, files, separator, end, flush, all sorts of other arguments we can pass. We're not interested in that. We're going to pass a string to it. Now we're going to, we're going to tell you what a string is for now. A string is a character or a sentence, something that you want to say. And that those always have to go inside of a set of single quotes or double quotes. Now Python leans towards the single quotes, but I'll show you sometimes you have to mix single and double quotes. For instance, if you want to print something that has an apostrophe in it, like the word won't, and you want that apostrophe, but you're going to use single quotes for that. So you can't use single quotes and single quotes. And then we'll get around that by using double quotes and single quotes. Python has a way to solve every problem. But I'm going to say this is easy, full stop. But it is a string indicated to Python by the fact that I've put it inside of quotes. As I say, don't worry about all of this now. I'll show you, show you what all of this, what, what it's all about. So this is easy, no problem there. And the next thing I want to print, this is easy, but I want it in a text cell. So I'm going to open a text cell. And now I can just type, this is easy, because this is just normal English, I can just type like a normal Word document in there and shift and enter. And that is it. Now it's also printed to the screen, but not as code, just as normal, like a normal Word document, no problem at all. So that was your brief introduction to what a notebook looks like a co lab notebook. It is based on something called Jupiter notebooks. So if you install Python to your own system, and you don't use co lab on the internet, then you are going to see exactly the same thing in Python. And that's called a Jupiter notebook. So this Google co lab is this modeled on on those Jupiter notebooks. Jupiter notebooks are fantastic if you install it on your own system, because you can use other languages as well. But we can use Python, one of the most recognized and used computer languages for data analysis, for statistics for healthcare, medical biosciences, all the statistics involved with that. Well, any kind of statistic really, there's no limit to this, but we obviously going to look at healthcare statistics. Python is just probably the most used language together with R in this field, it's free of charge, even if you install in your own system, you're never going to pay for this. And right here on Google co lab, you're running it off of Google's computer, which is, I know, a bit more powerful than my own computer, I can tell you that. And you can just do this, you don't have to install anything. And I mean, just just look at it. If I click on the left hand side, it's going to open this table of contents for me. It's going to populate that no problem. And it just looks beautiful. And in the end, you're going to see we're going to create these beautiful research documents that we can share with each other, because we can write normal English, normal paragraphs, put in photos, whatever we want, and the code, and the analysis of that code, all our p values, all our standard deviations, etc. And we can even create plots. It's a beautiful, beautiful document that we are going to create. Just look at that for me. This is really, this is something special and fantastic. And it's so easy for us to do you just launch your browser, and sign into your Google Drive and off you go. No problem whatsoever. So I hope to see you in the next video. Please play around with Colab. If you have any problems, put it down in the comments, let me know, and we'll solve the problems as we go. Don't be worried about the code that you've seen here. This is not what this first section is about. I'm going to teach you everything about writing Python. The reason why Python is so popular is because it's so easy. It's almost like just writing an English sentence. You'll just see how easy it is, how easy it is to pick up, and it's going to love using it. It contains almost everything you need to do data science, healthcare statistics, even the new kid on the block, the favorite kid on the block, deep learning, part of artificial intelligence. So easy to do right here. See you in the next video.