Title of the Notebook
Overview
Include a code block above the Title of the Notebook which contains the licensing information. Provide a brief overview of the notebook's content and its objectives. Explain what the reader will learn and any prerequisites they need to understand. If possible, provide links to prerequisite learning material. Inlcude a list of measureable learning objectives using action verbs:
Apply
someFunction
to solve some problemWrite a function that takes two numbers and returns their sum
Use and interpret new notation and terminology
Experiment with different parameters to examine their effect on the solution
Benchmark
someMethod
againstanotherMethod
Visualize the convergence of the model
Ideally, the exercises in the notebook should address all of the learning objectives.
Introduction
Introduce the topic in more detail. Provide background information and context to help the reader understand the importance of the topic. If the notebook is lengthy, provide a short outline or table of contents to help the reader navigate the material.
Setup
Include any necessary setup instructions here, such as:
Installing libraries
Downloading datasets
Setting up configurations
Code, not intended for immediate execution, should be included with three back ticks and the descriptor python
as part of a markdown block:
Code intended for the reader to execute should be included in separate python blocks:
Main Content
This section should contain the core content of the notebook. Use descriptive headers to organize the content. The main content can be distributed over multiple level two headers if it is lengthy. The main content can include:
Theoretical explanations
Examples and demonstrations
Visualizations
Code snippets
Video explanations
If using a data set, add a section to handle the data including:
Loading the data
Displaying the first few rows
Summarizing the dataset
Preprocessing the data
While creating content, please keep the guidelines below in mind.
Style guidelines for Markdown
Use the following guidelines for styling the Markdown:
When they appear inline with the text; directive names, clauses, function or subroutine names, variable names, file names, commands and command-line arguments should appear between two back ticks.
Emphasis, including quotes made for emphasis and introduction of new terms should be highlighted between a single pair of asterisks.
A level 1 heading should appear at the top of the notebook as the title of the notebook.
A horizontal rule should appear between sections that begin with a level 2 heading.
Guidelines for Media
All images should be stored in a separate folder titled images
. For screen readers, add descriptive text to any visual content.
Code Documentation Guidelines
To ensure that the code in the notebooks is easy to understand and maintain, please follow these documentation guidelines:
Use Comments: Add comments to explain the purpose of the code, especially for complex logic. Use inline comments for small explanations and block comments for larger sections.
Docstrings: Use docstrings to describe functions, classes, and methods. Include information about parameters, return values, and any exceptions raised.
Descriptive Variable Names: Use clear and descriptive variable names that convey the purpose of the variable.
Section Headers: Use markdown headers to organize the notebook into sections. This helps readers navigate through the content easily.
Explain Outputs: After displaying outputs (e.g., plots, tables), add markdown cells to explain what the output shows and its significance.
The histogram above shows the distribution of values in the 'column_name' column. It indicates that most values are concentrated around the mean.
Guidelines for Exercises
Exercises for students are an important feature to include. They can be included within the narrative and/or in a separate section at the end of the notebook.
Clearly label exercises with a heading, such as
## Exercise
.Provide a brief description or question for the exercise.
If applicable, include starter code in a code block.
Use comments in the starter code to guide students on what to do.
Provide signposts for the portions of the code that the student should edit (i.e.,
# Edit code above/below this line
,TODO
,FIXME
, etc.).Provide solutions to exercises in a separate notebook stored in a solutions directory. Alternatively, contact the site administrator for instructions on contributing autograded code.
Example:
Conclusion
Summarize the key takeaways from the notebook. Provide any final thoughts or next steps for further exploration, including additional notebooks in the repository.
References
List any references or resources used in the notebook. Follow these formatting guidelines for consistency:
Books: Author(s), "Title of the Book," Edition (if applicable), Publisher, Year.
Example: John Doe, "Data Science Fundamentals," 2nd Edition, Data Science Press, 2021.
Journal Articles: Author(s), "Title of the Article," Journal Name, Volume(Issue), Page numbers, Year.
Example: Jane Smith, "A Study on Machine Learning Algorithms," Journal of Machine Learning, 15(3), 123-145, 2020.
Websites: Author(s) (if available), "Title of the Webpage," Website Name, URL, Accessed: Date.
Example: John Doe, "Introduction to Python," Python.org, https://www.python.org/about/gettingstarted/, Accessed: October 15, 2023.
Datasets: Dataset Title, Provider, URL (if available), Accessed: Date.
Example: "UCI Machine Learning Repository: Iris Data Set," UCI Machine Learning Repository, https://archive.ics.uci.edu/ml/datasets/iris, Accessed: October 15, 2023.
By following these guidelines, you will help ensure that the notebooks are clear, informative, and easy to understand for all users.
Thank you for contributing!