Skip to main content
All CollectionsProjectsCreating Your Project
Setting up your sample DataLab for a DataLab Project at DataCamp
Setting up your sample DataLab for a DataLab Project at DataCamp
George Boorman avatar
Written by George Boorman
Updated over 7 months ago

DataLab projects are authored using a combination of DataCamp's DataLab and Teach Editor products.

This article focuses on how to create a sample DataLab for your project, which is what learners will see when they open your project for the first time. It should contain:

  • A notebook.ipynb file, within which there should be:

    • A markdown cell at the top, known as "Context", which provides information about the project such as a scenario learners are working in, an overview of the data, and any other relevant information. See this article for an overview of a DataLab project's anatomy.

    • A code cell with sample code, such as the import of required libraries and/or code comments.

  • The dataset saved as a relevant file type e.g., csv, xlsx, JSON, etc.

  • Any images or other files that are required for the project.

For an overview of the Teach Editor for DataLab projects please refer to this article.

Setting up an integration

If your project involves the use of a SQL database, please contact the Content team for support in setting this up.

Developing a DataLab

To develop a DataLab, you need to navigate to https://app.datacamp.com/datalab/overview.

Once here, you can create a new Workbook using the green "New Workbook" button on the left hand-side:

This will open a pop-up window, in which you can add a DataLab name, which should be the name of your project. You should set DataLab Visibility set to "Private" and Language set to "Python + SQL" if creating a Python or SQL project, or "R + SQL" if creating a R project. If you are using an existing integration such as a SQL database, you can select it from the Integration dropdown menu. Lastly, select the Create DataLab button.

This will create a new Workbook where you can author the project. You need to complete the following steps:

Upload files

  • Select the "Browse and upload files" tab on the left-hand side.

  • Either select the browse files link or drag and drop your file(s) into the area below.

  • (Optional) If you plan to display an image in your notebook then please also upload the file during this step.

Add Context

  • Select the Add Text button.

  • Select the Move Up button to the right of the text cell to move it above the code cell.

  • Author your Context to describe and motivate the project using Markdown.

Add Sample Code

  • Add code to the existing code cell. This will appear when learners start the project, so typically imports required libraries and possibly reads in data as a variable.

Exporting your DataLab

  • Once you have finished authoring your DataLab, click on File in the top-left, then "Download".

  • This will download a zipped folder containing your notebook and all uploaded files.

    • Please note that your DataLab must contain code in a notebook rather than a script.

  • Rename the zipped folder to template.zip.

Uploading your DataLab to GitHub

Your project lives in a GitHub repo that will be created by the Content team. During development, all edits you make to your project will be in the development branch.

  • To add your DataLab into the Teach Editor you need to navigate to your project's GitHub repo and ensure you are in the development branch.

  • Once there, select Add file then choose Upload files from the dropdown menu.

  • Either click on "choose your files" or drag and drop template.zip into the selected area.

  • Add a commit message.

  • Commit changes.

Did this answer your question?