A Note on Writing on Jupyter Notebook

andrew wong
Human Science AI
Published in
2 min readMar 19, 2019

In the course of 5 weeks, I have read countless Jupyter Notebook (Okay, since we are talking about data here, it is roughly about 150 Jupyter Notebook). There are some best practices that I have tried myself. Here’s some tips for you my dear reader.

First, get to know Jupyter Notebook markup at the back of your hand.
Here are some examples of the power of Juptyer Notebook

Cell Tabbing Column Configuration Header Cells Linking Automatic Section Numbering and Table of Contents Support Automatic Section Numbering Table of Contents Support Using Both Automatic Section Numbering and Table of Contents Support Keyboard Shortcuts Paragraph Breaks Line Breaks Soft-Wrapping Hard-Wrapping Headers Standard Block Quoting Nested Block Quoting Ordered Lists Bulleted Lists Reference Links Images from the Internet LaTeX Math Creating a Bibtex Database External Bibliographic Databases Internal Bibliographic Databases Hiding Your Internal Database Turning Your Jupyter Notebook into a Slideshow

Here’s the link to get the exact common on Markup (https://jupyter.brynmawr.edu/services/public/dblank/Jupyter%20Notebook%20Users%20Manual.ipynb#4.-Using-Markdown-Cells-for-Writing)

Second, guide the reader through a journey with marker.
A diagram with steps that show the reader from start to end will be a great start.

Third, be consistent to presenting your argument.
A case in point, if you have run 4 hypothesis testing with t-test or cohen’s d, it will be better to have consistent python command that produces similar formatted results (of course, the t-values will be different, in this case).

Fourth, it will be of value if we can provide a “So, what” into everyone key statement or analysis
This is important because the reader wants the linkage between your computation and analysis (seriously they really wants to know, I am one of them). Please don’t let them hanging dry.

Fifth, round things up with conclusion.
After scrolling down or spending time (hopefully, good quality time) reading through your Jupyter Notebook, you should be kind to your reader to summarize what have been discussed. Wouldn’t that will be nice?

There are many more tips, and I will add. Stay tuned.

--

--