9:59:59.000,9:59:59.000 1[br]00:00:08,280 --> 00:00:13,300[br]Hello again. And this video, I want to talk about organizing notebooks as I've promised. 9:59:59.000,9:59:59.000 2[br]00:00:13,300 --> 00:00:18,210[br]So we've talked about how do we make charts? That's been a lot of what we've been talking about here. 9:59:59.000,9:59:59.000 3[br]00:00:18,210 --> 00:00:25,260[br]But I wanted to talk about how do we actually put together a notebook that's presenting these charts and presenting our conclusions from them. 9:59:59.000,9:59:59.000 4[br]00:00:25,260 --> 00:00:33,040[br]So learning outcomes for this video are for you to be able to use markdown document structure to organize a notebook, to use the Jupiter, 9:59:59.000,9:59:59.000 5[br]00:00:33,040 --> 00:00:40,350[br]a markdown features to format text in a notebook to create a notebook that clearly tells the story of a data analysis. 9:59:59.000,9:59:59.000 6[br]00:00:40,350 --> 00:00:47,610[br]First thing to understand is that a notebook is a document. It is a convenient way to run Python code and to see the results of it. 9:59:59.000,9:59:59.000 7[br]00:00:47,610 --> 00:00:52,950[br]But the notebook structure is first and foremost a document. It's meant to be read. 9:59:59.000,9:59:59.000 8[br]00:00:52,950 --> 00:01:00,300[br]And there's some structure imposed in the document because it has to read in the same order as the code is going to execute. 9:59:59.000,9:59:59.000 9[br]00:01:00,300 --> 00:01:08,420[br]But. We want to be able to actually read it and understand what's going on as we walk through the notebook. 9:59:59.000,9:59:59.000 10[br]00:01:08,420 --> 00:01:12,830[br]So we also want to factor particularly complex computations out of the notebook. 9:59:59.000,9:59:59.000 11[br]00:01:12,830 --> 00:01:15,410[br]So far, nothing. We've been doing a super complex. 9:59:59.000,9:59:59.000 12[br]00:01:15,410 --> 00:01:22,220[br]But if I have a large, complicated data processing operation, training and an extensive set of machine learning models or something, 9:59:59.000,9:59:59.000 13[br]00:01:22,220 --> 00:01:33,200[br]I'll put those out of the notebook and other scripts and other modules and leave the notebook for communicating the results of my data analysis. 9:59:59.000,9:59:59.000 14[br]00:01:33,200 --> 00:01:38,570[br]So a notebook has two primary types of cells. We have code cells, which you've seen a lot. 9:59:59.000,9:59:59.000 15[br]00:01:38,570 --> 00:01:44,720[br]The Python code and its output. And we have marked down cells that contain formatted text. 9:59:59.000,9:59:59.000 16[br]00:01:44,720 --> 00:01:48,260[br]Could keep you. I recommend keeping your code cells relatively short. 9:59:59.000,9:59:59.000 17[br]00:01:48,260 --> 00:01:57,050[br]One, a few lines. One function definition. If you're defining an entire class and it's taking 100 lines within a code cell. 9:59:59.000,9:59:59.000 18[br]00:01:57,050 --> 00:02:01,580[br]That's a good sign you to pull that out into a python module of some kind. 9:59:59.000,9:59:59.000 19[br]00:02:01,580 --> 00:02:06,440[br]If helpful, show results after the cell. I do this a lot, particularly in development. 9:59:59.000,9:59:59.000 20[br]00:02:06,440 --> 00:02:11,450[br]But if you have too much of it, it can make it hard to read the final notebook because you have all of these outputs. 9:59:59.000,9:59:59.000 21[br]00:02:11,450 --> 00:02:15,440[br]And the notebook wins it being a sea of charts and tables. 9:59:59.000,9:59:59.000 22[br]00:02:15,440 --> 00:02:20,600[br]And it's difficult to find your way through the notebook and find the pieces that you need to look at. 9:59:59.000,9:59:59.000 23[br]00:02:20,600 --> 00:02:27,020[br]So go ahead. Do a lot of them, especially while you're debugging in your prototyping before you submit. 9:59:59.000,9:59:59.000 24[br]00:02:27,020 --> 00:02:32,750[br]Maybe go through and clean up, remove things that were just there for you to test how something worked and leave the cells in 9:59:59.000,9:59:59.000 25[br]00:02:32,750 --> 00:02:37,940[br]your notebook being the ones that help the reader understand the results of what you're doing. 9:59:59.000,9:59:59.000 26[br]00:02:37,940 --> 00:02:45,790[br]Remember, the purpose of the presentation is to show the reader what you learned and how you know it's true. 9:59:59.000,9:59:59.000 27[br]00:02:45,790 --> 00:02:54,040[br]Cells that didn't help you do that. Maybe you can consider removing, though, or that don't help you do that. 9:59:59.000,9:59:59.000 28[br]00:02:54,040 --> 00:02:58,720[br]At the end of the day, they might have helped you figure out how to do that. 9:59:59.000,9:59:59.000 29[br]00:02:58,720 --> 00:03:02,650[br]You can save up a copy of your notebook before doing the cleanup so you don't lose them. 9:59:59.000,9:59:59.000 30[br]00:03:02,650 --> 00:03:07,210[br]You can have a supplementary notebook that has maybe Pazz, you went down. 9:59:59.000,9:59:59.000 31[br]00:03:07,210 --> 00:03:11,170[br]That didn't work out. Another thing you can consider doing is having an appendix. 9:59:59.000,9:59:59.000 32[br]00:03:11,170 --> 00:03:17,020[br]So you've got all of the main content, the notebook. And then down at the end, you have a big heading appendix. 9:59:59.000,9:59:59.000 33[br]00:03:17,020 --> 00:03:20,770[br]And there you have extra things. You want to make sure you can still run from top to bottom. 9:59:59.000,9:59:59.000 34[br]00:03:20,770 --> 00:03:27,490[br]But there you have some of the other things that maybe dove into more details about the building blocks of some of your computations. 9:59:59.000,9:59:59.000 35[br]00:03:27,490 --> 00:03:32,650[br]But it is good to show the results after loading data and after doing a complex manipulation, 9:59:59.000,9:59:59.000 36[br]00:03:32,650 --> 00:03:38,910[br]especially one that significantly changes the shape of the data that you're working with. 9:59:59.000,9:59:59.000 37[br]00:03:38,910 --> 00:03:41,790[br]And they talk mostly in this video, though, about markdown sales, 9:59:59.000,9:59:59.000 38[br]00:03:41,790 --> 00:03:48,180[br]because markdown sells or what you use to build up the structure of your document and make it tell a story, 9:59:59.000,9:59:59.000 39[br]00:03:48,180 --> 00:03:52,830[br]not just be a kind of strange way to present Python code. 9:59:59.000,9:59:59.000 40[br]00:03:52,830 --> 00:04:01,710[br]So markdown is a text syntax for simple markup. I'm going to provide a link to the markdown documentation in the class notes that go with this video. 9:59:59.000,9:59:59.000 41[br]00:04:01,710 --> 00:04:06,570[br]But there's several inline formatting things. If you put two stars around some text, that'll make it bold. 9:59:59.000,9:59:59.000 42[br]00:04:06,570 --> 00:04:16,110[br]One star will make it italics. You can indicate a code using the fit, something that's going to show up as the fixed width code layout using back Tex. 9:59:59.000,9:59:59.000 43[br]00:04:16,110 --> 00:04:24,570[br]This is one that I see ignored very frequently in and writing up because it's really, 9:59:59.000,9:59:59.000 44[br]00:04:24,570 --> 00:04:27,960[br]really useful for function names, variable names, things like that. 9:59:59.000,9:59:59.000 45[br]00:04:27,960 --> 00:04:32,670[br]To be able to set apart like this is a special thing. This is a function name also. 9:59:59.000,9:59:59.000 46[br]00:04:32,670 --> 00:04:39,180[br]Then you can use tech math syntax by putting it between dollar signs in this markdown notebook. 9:59:59.000,9:59:59.000 47[br]00:04:39,180 --> 00:04:48,450[br]Pay attention to the details of what your markdown code or what your text formatted text looks like after you render it in the notebook. 9:59:59.000,9:59:59.000 48[br]00:04:48,450 --> 00:04:55,500[br]Make sure it reads well. Make sure it's clear. Ask yourself if I weren't the one who right wrote this. 9:59:59.000,9:59:59.000 49[br]00:04:55,500 --> 00:05:03,290[br]What? I like reading this and clean it up and pay attention to those details, to make it look, 9:59:59.000,9:59:59.000 50[br]00:05:03,290 --> 00:05:08,670[br]to make it look good and to make it be effective at communicating and so that the reader 9:59:59.000,9:59:59.000 51[br]00:05:08,670 --> 00:05:13,170[br]can clearly understand what the different pieces are and what needs to be emphasized, 9:59:59.000,9:59:59.000 52[br]00:05:13,170 --> 00:05:17,260[br]etc. Markdown also has a number of block elements. 9:59:59.000,9:59:59.000 53[br]00:05:17,260 --> 00:05:21,520[br]The basic one is a paragraph, paragraphs or just text separated by blank lines. 9:59:59.000,9:59:59.000 54[br]00:05:21,520 --> 00:05:26,890[br]You can also have bulleted and numbered lists. You can have code blocks for if you need to have a little. 9:59:59.000,9:59:59.000 55[br]00:05:26,890 --> 00:05:31,720[br]These aren't super common in a notebook because a lot of your code is in the code cells that you execute. 9:59:59.000,9:59:59.000 56[br]00:05:31,720 --> 00:05:34,900[br]But if you need to have a little code that you don't execute for some reason, 9:59:59.000,9:59:59.000 57[br]00:05:34,900 --> 00:05:42,970[br]you can put it in the code block and markdown and then you can also block mathematics, a line on its own that begins and ends with two dollar signs. 9:59:59.000,9:59:59.000 58[br]00:05:42,970 --> 00:05:49,170[br]And you can actually span multiple lines so long as there aren't any blanks that's going to be treated as a piece of block mathematics. 9:59:59.000,9:59:59.000 59[br]00:05:49,170 --> 00:05:54,510[br]It's not in line in a sentence, but it becomes its own block and the rendered self. 9:59:59.000,9:59:59.000 60[br]00:05:54,510 --> 00:06:00,450[br]Headings are an important one to pay attention to. So Mark Down headings are lines that start with one, two, 9:59:59.000,9:59:59.000 61[br]00:06:00,450 --> 00:06:06,510[br]three up to six hash marks and then a space in the heading text having one heading to hitting three. 9:59:59.000,9:59:59.000 62[br]00:06:06,510 --> 00:06:11,370[br]Something that's important to know is the hashes do not mean big and bold. 9:59:59.000,9:59:59.000 63[br]00:06:11,370 --> 00:06:16,890[br]That's what they look like. But that's not what they mean. What they mean is heading. 9:59:59.000,9:59:59.000 64[br]00:06:16,890 --> 00:06:23,300[br]And so you need to have an outline structure to your notebook using the headings. 9:59:59.000,9:59:59.000 65[br]00:06:23,300 --> 00:06:29,030[br]And you need to nest them properly, so within each one, you have your H 2s. 9:59:59.000,9:59:59.000 66[br]00:06:29,030 --> 00:06:32,760[br]And then you have your H threes. You don't go straight from H one to H for you. 9:59:59.000,9:59:59.000 67[br]00:06:32,760 --> 00:06:41,540[br]You have H three in the middle. Start the notebook with an H one that has the notebook title and that that will become in a lot of rendering context. 9:59:59.000,9:59:59.000 68[br]00:06:41,540 --> 00:06:46,850[br]That becomes the title at the top of your notebook. And then all your other headings are two or lower. 9:59:59.000,9:59:59.000 69[br]00:06:46,850 --> 00:06:55,670[br]Also you might if you have an appendix, you might have Appendix B, another H1, but also the section headers should be short, not sentences. 9:59:59.000,9:59:59.000 70[br]00:06:55,670 --> 00:07:00,630[br]If you're writing an entire sentence in your section header. You're you're putting too much there. 9:59:59.000,9:59:59.000 71[br]00:07:00,630 --> 00:07:06,840[br]The section header should be a short title and then the section content comes after it. 9:59:59.000,9:59:59.000 72[br]00:07:06,840 --> 00:07:13,650[br]Now, one of the few reasons why it's important to use the section headers heading levels properly. 9:59:59.000,9:59:59.000 73[br]00:07:13,650 --> 00:07:19,710[br]One is just visually, it helps break up your notebook so we can easily see which component we're at. 9:59:59.000,9:59:59.000 74[br]00:07:19,710 --> 00:07:26,130[br]Second, there are extensions that will do things like no your headings or give you a Browsr Bowl table of contents. 9:59:59.000,9:59:59.000 75[br]00:07:26,130 --> 00:07:32,130[br]You can use to navigate the notebook by heading what? I'm rendering notebooks as a part of the course website. 9:59:59.000,9:59:59.000 76[br]00:07:32,130 --> 00:07:36,960[br]You'll see this over in the right hand side. You can jump directly to notebook headings. 9:59:59.000,9:59:59.000 77[br]00:07:36,960 --> 00:07:45,720[br]That only works because I'm consistently using the heading levels to build the structure and outline based structure of my notebook. 9:59:59.000,9:59:59.000 78[br]00:07:45,720 --> 00:07:53,160[br]Another a third reason is for accessibility. If someone's reading your notebook with an assistive technology such as a screen reader, 9:59:59.000,9:59:59.000 79[br]00:07:53,160 --> 00:08:01,500[br]the section headings are very important to help them navigate to the parts. The notebook that are both relevant to them at a given time. 9:59:59.000,9:59:59.000 80[br]00:08:01,500 --> 00:08:09,180[br]So on the section headers, one additional little rule is if your section editor has to wrap onto a second line, really rethink. 9:59:59.000,9:59:59.000 81[br]00:08:09,180 --> 00:08:13,230[br]It's almost certainly too long particularly. 9:59:59.000,9:59:59.000 82[br]00:08:13,230 --> 00:08:16,860[br]Don't put an entire question in the section. Maybe. Usually. 9:59:59.000,9:59:59.000 83[br]00:08:16,860 --> 00:08:22,890[br]Occasionally it's OK to put a whole question, but maybe put a brief like three to five word summary of the questions topic and 9:59:59.000,9:59:59.000 84[br]00:08:22,890 --> 00:08:30,750[br]then write this question itself as the first paragraph of the of the section. 9:59:59.000,9:59:59.000 85[br]00:08:30,750 --> 00:08:33,240[br]But pay attention to these different formatting features. 9:59:59.000,9:59:59.000 86[br]00:08:33,240 --> 00:08:41,460[br]You can build a well-structured notebook that communicates clearly and draws the reader's emphasis to the places where it needs to go. 9:59:59.000,9:59:59.000 87[br]00:08:41,460 --> 00:08:46,650[br]Writing the text itself. Use the document to tell a story. What's the goal of what you're doing? 9:59:59.000,9:59:59.000 88[br]00:08:46,650 --> 00:08:51,630[br]Either the whole notebook or of individual pieces of analysis. What's the data that we're doing? 9:59:59.000,9:59:59.000 89[br]00:08:51,630 --> 00:08:58,140[br]What do we know about it going in at the up at the top, either at the very top of your notebook or where you're loading the data? 9:59:59.000,9:59:59.000 90[br]00:08:58,140 --> 00:09:04,050[br]It's useful to write some, especially at the notebooks and we report you submit to somebody. 9:59:59.000,9:59:59.000 91[br]00:09:04,050 --> 00:09:07,800[br]It's useful to write there. What do you know? Where did you get the data? How was it collected? 9:59:59.000,9:59:59.000 92[br]00:09:07,800 --> 00:09:16,290[br]Not a full data sheet, but at least some summary information to help the reader understand what it is that we're going to be going and looking at. 9:59:59.000,9:59:59.000 93[br]00:09:16,290 --> 00:09:19,800[br]Why are we doing each piece of the analysis? What's the purpose here? 9:59:59.000,9:59:59.000 94[br]00:09:19,800 --> 00:09:25,260[br]How does it fit into our broader picture, into our broader goals? What approach are we using? 9:59:59.000,9:59:59.000 95[br]00:09:25,260 --> 00:09:28,200[br]We don't want to just repeat the code writing a a numbered list here. 9:59:59.000,9:59:59.000 96[br]00:09:28,200 --> 00:09:33,240[br]The steps and those steps are just a literal translation of the code doesn't help understanding. 9:59:59.000,9:59:59.000 97[br]00:09:33,240 --> 00:09:37,570[br]It creates an opportunity for a code and documentation to become mismatched. 9:59:59.000,9:59:59.000 98[br]00:09:37,570 --> 00:09:41,670[br]But explain if there's anything tricky in the code. 9:59:59.000,9:59:59.000 99[br]00:09:41,670 --> 00:09:48,600[br]Explain why that does the job. Explain the conceptual idea behind why you're approaching things the way you are. 9:59:59.000,9:59:59.000 100[br]00:09:48,600 --> 00:09:56,700[br]If you're doing a data clean up, explain why that what that cleanup's doing and why that's the right cleanup for your data. 9:59:59.000,9:59:59.000 101[br]00:09:56,700 --> 00:10:03,600[br]And then what do we learn from it? So oftentimes what I do with us, with an individual piece of it, like a chart. 9:59:59.000,9:59:59.000 102[br]00:10:03,600 --> 00:10:07,260[br]All right. What question the charge is supposed to be answering. 9:59:59.000,9:59:59.000 103[br]00:10:07,260 --> 00:10:11,010[br]Or at least the purpose of the chart that we have the code to generate the chart itself. 9:59:59.000,9:59:59.000 104[br]00:10:11,010 --> 00:10:18,450[br]And then we have a tech cell that has observations about what we learn from the chart. 9:59:59.000,9:59:59.000 105[br]00:10:18,450 --> 00:10:23,160[br]So what are we doing? How are we going to do it if that's not immediately clear code results? 9:59:59.000,9:59:59.000 106[br]00:10:23,160 --> 00:10:25,590[br]And then what do we observe from these results? 9:59:59.000,9:59:59.000 107[br]00:10:25,590 --> 00:10:33,350[br]So the over then the high level document structure that I recommend is to start start with the title and intros. 9:59:59.000,9:59:59.000 108[br]00:10:33,350 --> 00:10:37,140[br]You've got your title. You're heading one. Then what's the notebook for? 9:59:59.000,9:59:59.000 109[br]00:10:37,140 --> 00:10:41,160[br]Why does this notebook exist? Are there to include links? 9:59:59.000,9:59:59.000 110[br]00:10:41,160 --> 00:10:46,650[br]There's hyperlinks and taxes and markdown as well. Read the markdown documentation to see how to use that. 9:59:59.000,9:59:59.000 111[br]00:10:46,650 --> 00:10:50,790[br]But where does this go? Are there things we need to know? 9:59:59.000,9:59:59.000 112[br]00:10:50,790 --> 00:10:54,990[br]Background about where why this documents being created? 9:59:59.000,9:59:59.000 113[br]00:10:54,990 --> 00:11:00,360[br]Where did the data come from? If we have defined research questions, what are those research questions? 9:59:59.000,9:59:59.000 114[br]00:11:00,360 --> 00:11:03,750[br]You can write those right in the intro, the notebook. Then I have a set up. 9:59:59.000,9:59:59.000 115[br]00:11:03,750 --> 00:11:09,060[br]I almost always have a setup section that comes next. That has input. I import my python libraries. 9:59:59.000,9:59:59.000 116[br]00:11:09,060 --> 00:11:11,970[br]I've maybe defined some help or functions that I'm going to be using throughout the 9:59:59.000,9:59:59.000 117[br]00:11:11,970 --> 00:11:16,860[br]notebook helper function specific to one section I might define in that section. 9:59:59.000,9:59:59.000 118[br]00:11:16,860 --> 00:11:20,730[br]But then and then I LOEs load the data. Sometimes I load the data as a part of the setup. 9:59:59.000,9:59:59.000 119[br]00:11:20,730 --> 00:11:27,990[br]So it's OK. Important modules and then load my data. Sometimes if specially if I have more to say about the data, it's its own section. 9:59:59.000,9:59:59.000 120[br]00:11:27,990 --> 00:11:34,500[br]But then as I load each table, I just show the first few rows of it often so that I can see, OK, I've loaded this data and then it's right there. 9:59:59.000,9:59:59.000 121[br]00:11:34,500 --> 00:11:39,390[br]We can see as we're going through the rest of the notebook. What is the data just loaded look like? 9:59:59.000,9:59:59.000 122[br]00:11:39,390 --> 00:11:45,030[br]Then we perform our analysis and this might be two sections. It might be five, six, seven, eight sections. 9:59:59.000,9:59:59.000 123[br]00:11:45,030 --> 00:11:49,920[br]And then finally at the end, we can summarize and conclude this is going to be really I don't always do this in 9:59:59.000,9:59:59.000 124[br]00:11:49,920 --> 00:11:53,340[br]my research notebook because often that's the material that goes in the paper. 9:59:59.000,9:59:59.000 125[br]00:11:53,340 --> 00:11:57,150[br]But this is going to be something particularly in our assignment, and we're submitting notebooks. 9:59:59.000,9:59:59.000 126[br]00:11:57,150 --> 00:12:00,810[br]Put that at the end of the notebook. What do we learn from this? 9:59:59.000,9:59:59.000 127[br]00:12:00,810 --> 00:12:03,150[br]Sometimes they going to have specific directions for things. 9:59:59.000,9:59:59.000 128[br]00:12:03,150 --> 00:12:08,730[br]I want you to reflect on there when like an assignment one, I've broken down the different requirements. 9:59:59.000,9:59:59.000 129[br]00:12:08,730 --> 00:12:15,120[br]Those become good candidates for your age to your level. Two headings for each of those. 9:59:59.000,9:59:59.000 130[br]00:12:15,120 --> 00:12:21,730[br]So we've got, I think six require six different requirements. An assignment one. 9:59:59.000,9:59:59.000 131[br]00:12:21,730 --> 00:12:28,120[br]H2, heading a primary section of your document for each of those is a good starting point for your layout. 9:59:59.000,9:59:59.000 132[br]00:12:28,120 --> 00:12:34,460[br]In addition to you're probably gonna have another one up at the top for the setup and maybe another for the data load. 9:59:59.000,9:59:59.000 133[br]00:12:34,460 --> 00:12:38,590[br]But think about this. This the flow, your document be able to communicate. 9:59:59.000,9:59:59.000 134[br]00:12:38,590 --> 00:12:42,760[br]What are we doing? What are the prerequisites in terms of and data? 9:59:59.000,9:59:59.000 135[br]00:12:42,760 --> 00:12:47,790[br]How are we actually doing it? And then at the end, what do we learn? 9:59:59.000,9:59:59.000 136[br]00:12:47,790 --> 00:12:53,580[br]So you're going to write a lot of cells and produce a lot of outputs in your notebook while you're debugging, 9:59:59.000,9:59:59.000 137[br]00:12:53,580 --> 00:12:59,220[br]before you submit to before you share in other contexts. Spend some time cleaning up your notebook, 9:59:59.000,9:59:59.000 138[br]00:12:59,220 --> 00:13:06,780[br]remove dead ends and extraneous outputs that you included for debugging, but don't fit in the flow of the story. 9:59:59.000,9:59:59.000 139[br]00:13:06,780 --> 00:13:13,350[br]Consider putting them in a supplementary notebook. If you want to keep them around and then make sure you can rerun your notebook from top to bottom. 9:59:59.000,9:59:59.000 140[br]00:13:13,350 --> 00:13:20,300[br]So when the Jupiter interface is the kernel, when you click that and choose, restart and rerun all. 9:59:59.000,9:59:59.000 141[br]00:13:20,300 --> 00:13:26,570[br]And it will restart the python kernel that's actually running your code so all your variables disappear. 9:59:59.000,9:59:59.000 142[br]00:13:26,570 --> 00:13:31,220[br]Your data is no longer loaded. And then it starts running the notebook from top to bottom. 9:59:59.000,9:59:59.000 143[br]00:13:31,220 --> 00:13:37,220[br]You want that to succeed so that someone else working with the notebook can actually rerun and reproduce your results. 9:59:59.000,9:59:59.000 144[br]00:13:37,220 --> 00:13:43,790[br]If that doesn't succeed, then that means either you deleted something that's that's important or you're the order of 9:59:59.000,9:59:59.000 145[br]00:13:43,790 --> 00:13:48,740[br]your source in the notebook does not match the order in which it actually has to be executed. 9:59:59.000,9:59:59.000 146[br]00:13:48,740 --> 00:13:54,980[br]But make sure it succeeds and also read back to the notebook to make sure that the charts all still look right. 9:59:59.000,9:59:59.000 147[br]00:13:54,980 --> 00:14:01,100[br]The data is the conclusions are all still correct, etc. before you submit the final notebook. 9:59:59.000,9:59:59.000 148[br]00:14:01,100 --> 00:14:05,330[br]So when you're writing an up of two, you also need to know your audience and your purpose. 9:59:59.000,9:59:59.000 149[br]00:14:05,330 --> 00:14:10,550[br]For example, the notebooks I'm writing for you for teaching purposes here. 9:59:59.000,9:59:59.000 150[br]00:14:10,550 --> 00:14:17,060[br]They the things I write in them differ from what I'm going to write in a research notebook that I share with my collaborators, 9:59:59.000,9:59:59.000 151[br]00:14:17,060 --> 00:14:22,700[br]or I use my own purposes because my purpose partially in their notebooks, is to explain how they're working. 9:59:59.000,9:59:59.000 152[br]00:14:22,700 --> 00:14:28,850[br]So I'm going to say more in these notebooks about how exactly the what exactly the code is 9:59:59.000,9:59:59.000 153[br]00:14:28,850 --> 00:14:35,040[br]doing is that you can learn how the code works that I would expect in a research notebook. 9:59:59.000,9:59:59.000 154[br]00:14:35,040 --> 00:14:41,730[br]But also, you're your own internal your own personal use sharing with your adviser or your supervisor, 9:59:59.000,9:59:59.000 155[br]00:14:41,730 --> 00:14:47,970[br]sharing with the public, either the professional public working on your topic or the general public. 9:59:59.000,9:59:59.000 156[br]00:14:47,970 --> 00:14:54,180[br]These are all different audiences and they're going to need different levels of explanation and different things highlighted in your notebook. 9:59:59.000,9:59:59.000 157[br]00:14:54,180 --> 00:14:56,820[br]Also, not all audiences are well served for notebooks. 9:59:59.000,9:59:59.000 158[br]00:14:56,820 --> 00:15:04,500[br]Notebooks are fantastic for internal reports, collaboration, et cetera, sharing the results of a data analysis with colleagues or with yourself. 9:59:59.000,9:59:59.000 159[br]00:15:04,500 --> 00:15:09,090[br]But for final publication, you're often going to need a separate final report. 9:59:59.000,9:59:59.000 160[br]00:15:09,090 --> 00:15:15,930[br]I don't know that it's possible to write a research paper and Jupiter notebooks. Somebody might have tried, but. 9:59:59.000,9:59:59.000 161[br]00:15:15,930 --> 00:15:21,180[br]But I'll still have the notebook where I explain the analysis. I often make that notebook available. 9:59:59.000,9:59:59.000 162[br]00:15:21,180 --> 00:15:31,050[br]So for a lot of my a lot of my published research papers, you can download a zip file or a get repository that contains the notebooks and you 9:59:59.000,9:59:59.000 163[br]00:15:31,050 --> 00:15:36,240[br]can rerun the experiment and rerun my analysis with the notebooks in the notebook. 9:59:59.000,9:59:59.000 164[br]00:15:36,240 --> 00:15:40,370[br]Then also I write the files out to disk. And we're not going to see this quite yet. 9:59:59.000,9:59:59.000 165[br]00:15:40,370 --> 00:15:45,630[br]We're going to see it later when we start talking about workflow. Because right now I'm just having to submit notebooks. 9:59:59.000,9:59:59.000 166[br]00:15:45,630 --> 00:15:49,720[br]But the note, the figures as they show up in the notebook aren't very high resolution. 9:59:59.000,9:59:59.000 167[br]00:15:49,720 --> 00:15:55,200[br]So we're gonna want to render a higher resolution version of them to a PMG file or a PDA file or a 9:59:59.000,9:59:59.000 168[br]00:15:55,200 --> 00:16:01,110[br]postscript file that we can then include in our document and word or law tech or whatever we're writing. 9:59:59.000,9:59:59.000 169[br]00:16:01,110 --> 00:16:08,910[br]So to wrap up, your notebook is first and foremost a document that contains code to generate the results that you're trying to discuss. 9:59:59.000,9:59:59.000 170[br]00:16:08,910 --> 00:16:14,490[br]Take advantage of the document structure and use it as a store to tell the story of your analysis. 9:59:59.000,9:59:59.000 171[br]00:16:14,490 --> 00:16:19,910[br]The conclusion you come to in why we should believe them. Pay attention to the examples I'm giving you in class. 9:59:59.000,9:59:59.000 172[br]00:16:19,910 --> 00:16:36,043[br]I'm also going to be trying to give you some examples of research oriented notebooks that you can look at to see examples of good notebook practice. 9:59:59.000,9:59:59.000