Students work in a Jupyter Notebook in a live DataCamp project. Let's call this one the student notebook. The student notebook is different than the notebook instructors use for authoring - let's call this one the project notebook. The reason for using a Jupyter Notebook as the authoring format is that the project can be developed locally but still have a similar appearance to the final live project.
For the project to be successfully built on datacamp.com, the project notebook needs to follow a specific format.
To be recognized by DataCamp's build system, the project notebook has to be named
project.ipynb . This file contains a variety of tagged cells, both of the code and Markdown variety. Tags are in the top left corner of cells. Here's an example of a tag:
These tagged cells are processed by software written by our talented DataCamp engineers, and a DataCamp project is the product.
Instructors will have access to a template notebook with all of the tagged cells and guidelines for each pre-populated cell.
The first cell in a project notebook should be a Markdown cell with the project title written as a one-line H1 (#) header. The title should be, at most, 41 characters long. For example:
# The Title of The Project
After that follows 8 - 12 tasks that the student is to complete, where each task consists of the following tagged cells (tag names in bold) in the following order:
type:NotebookTask: Markdown cell. The title of the task. It should be an H2 header (##), and it should be numbered. This will be displayed in the student notebook. <= 55 characters
@context: Markdown cell. The context (or narrative/storyline/etc.) for the task. This will be displayed in the student notebook. For task 1, <= 1200 characters. For task 2 onward, <= 800 characters.
@instructions: Markdown cell. The instructions for the task in bullet point-form. This will be displayed in the sidebar. <= 600 characters and <= 4 bullet points.
@hint: Markdown cell. A hint to help students who are stuck. This will be displayed at the bottom of the sidebar.
@sample_code: Code cell. The code scaffolding that the student will fill in to complete the task. This cell is the
@solutioncell with a few lines (or parts of lines) of code removed. This will be displayed in the student notebook. <= 10 lines of code.
@solution: Code cell. The solution to the task. This will not be displayed in the student notebook. <= 10 lines of code.
@tests: Code cell. Tests to see if the student's code has produced the desired output. This will not be displayed in the student notebook.
In the final live project this is where these cells end up:
Note that this image does not show the
@tests cells as these are never revealed to the student.
Instructors are free to include any other cells in a project notebook (for example, to store scratch you're not using) but all extra cells will be filtered away and will not be part of the live project.
Perhaps the easiest way of understanding the format of a DataCamp project's Jupyter Notebook is to inspect a real one. You can download this GitHub repo and compare it to this live project for a Python project. Or you can download GitHub repo and live project for an R project.