Skip to content

Templates

Templates provide pre-packaged artifacts for common data-related workflows. Whether you are doing business planning, user research, devops, or running remote meetings and ice-breakers, templates can help you more quickly create expressive, interactive documents with your own data.

This page describes how you can use existing templates to avoid starting your work from scratch, and how to make your own custom templates for reuse by you and your team.

Observable templates

Observable provides a number of pre-made templates for common data-related tasks like boilerplates for basic charts and maps, starters to access APIs or connect to Google sheets, and templates for common analyses for business planning and product insights.

To use an existing template:

  1. Open a template from our pre-made templates page:
Screenshot of the Templates page in Observable, showing several different template options to create a scatterplot, histogram, and more, with a banner at the top instructing users to Fork a template to get started, Upload your data, then Edit any part to customize.
Choose from template options to get started.
  1. In the top right of the template, click 'Fork to get started' to make your own copy of the template:
Green banner atop a notebook that alerts a user it is a template. To the right end of the banner is a button that says 'Fork'.
Fork the template to make your own copy.
  1. In your fork, attach or connect to your own data (e.g. see File attachments).

  2. Replace the template contents with your own data, and make any edits to customize your notebook. Underneath the pre-packaged Templates there is limitless flexibility. The code and data are right there, so you can customize, extend, and re-write any or all of it, as you see fit.

Custom templates

NotebooksLearn about notebooks vs. projects

Observable offers the ability to create your own custom templates that can be tailored to exactly suit your working methods. You will be able to create new notebooks even faster because the template is customized to save you from repetitive steps.

Once created, custom templates appear as a choice whenever anyone chooses to create a new notebook.

Custom templates are shown as options to choose from after a user chooses to create a new notebook
Your custom templates appear in the New notebook dialog box.

A few notes on custom templates:

  • Any editor can create a custom template.
  • Custom templates are in addition to the standard set of pre-defined Observable templates.
  • You can group custom templates to match your work projects or work groups.

How to create a custom template

  1. In your account, create a new collection named Templates. (See How to create a new collection).
  2. Create the new custom template in a notebook, either from scratch, or by forking one of the pre-defined Observable Templates.
  3. Add the new custom template to the Templates collection by clicking Add to collection from the notebook menu ().

Note

If a notebook is already in a collection, you will see In collections rather than Add to collection. Either choice brings up the Add to collection modal.

That's it! Your custom templates will now appear as options to choose from when you create a new notebook. You can put as many custom templates in the collection as you wish.

Grouping templates in sub-collections

If you want to add more organization to your custom templates, you can create sub-collections within your templates collection:

  1. Create another collection for each group.
  2. Add that collection to your Templates collection.
  3. Add notebooks to the collection for each group. (Notebooks can be in more than one collection.)

Note

You can place one or more collections inside your Templates collection, but sub-collections cannot have sub-collections themselves. Sub-collections for templates are limited to one level of nesting.

Hints for using custom templates

  • Give your sub-collections useful titles and descriptions to make it easier to find the best templates for a given task.
  • When a new notebook is created from a template, it is simply created as a fork of a notebook in the templates collection. If you look at the template notebook, you can see the forks, assuming it has been shared with you.
  • Notebooks in the templates collection need to be visible to the user who is creating a new notebook to show up.
  • If you want to prevent other users from accidentally modifying the templates, you can share them as View only.