Quickstart

Create your first notebook, run some code, and publish a brief.

This guide walks you through the core Margin workflow: create a notebook, run code, and share your findings in a brief.

Step 1: Create a Notebook

  1. From your dashboard, click Notebooks in the sidebar
  2. Click New notebook
  3. Choose Blank notebook or upload an existing .ipynb file

You'll see a fresh notebook with one empty code cell.

Step 2: The Kernel Connects Automatically

The Python kernel connects automatically when you open a notebook. Watch the toolbar—the status shows:

  • Connecting... → Establishing the connection
  • Warming up... → Loading Python packages
  • Kernel ready (green) → Ready to execute code
You can start running cells immediately. If the kernel isn't ready yet, your cells queue up and execute as soon as it connects.

Step 3: Write and Run Code

Type some Python in the first cell:

import pandas as pd

# Create sample data
data = {
    'Month': ['Jan', 'Feb', 'Mar', 'Apr'],
    'Revenue': [12000, 15000, 13500, 18000]
}
df = pd.DataFrame(data)
df

Run the cell with Shift + Enter (or click the play button). You'll see the DataFrame rendered below the cell.

Add More Cells

  • Press B to add a cell below (or A for above)
  • Press M to convert a cell to Markdown
  • Press Y to convert back to code

Keyboard Shortcuts

Margin notebooks support Jupyter‑style shortcuts:

KeyAction
Shift+EnterRun cell and advance
Ctrl/Cmd+EnterRun all cells
BInsert cell below
AInsert cell above
DDDelete cell
MChange to Markdown
YChange to code
J/K or arrowsNavigate cells

Step 4: Save Your Notebook

Margin auto‑saves as you work. The status indicator in the navbar shows:

  • Unsaved – Changes pending
  • Syncing... – Save in progress
  • Synced – All changes saved

You can also press Ctrl/Cmd + S to save immediately.

Step 5: Create a Brief

Now let's share your findings:

  1. Click Briefs in the sidebar
  2. Click New brief
  3. Give it a title (e.g., "Q1 Revenue Summary")
  4. Optionally, link it to your notebook (this enables artifact embedding)
  5. Click Create brief

You'll land in the brief editor—a rich text editor for writing your narrative.

Step 6: Add Artifacts

If your brief is linked to a notebook, you can embed outputs directly:

  1. Click Insert Artifact in the toolbar (or type / and select "Artifact from Notebook")
  2. Choose a cell output (chart, table, or image)
  3. The artifact appears in your brief, linked to its source
Artifacts stay connected. If you update the notebook and re‑run, viewers will see fresh results.

Step 7: Share Your Brief

Ready to publish?

  1. Click the Share button in the brief editor
  2. Toggle Public to on
  3. Set a URL slug (e.g., q1-revenue)
  4. Copy the public link

Your brief is now live at marginfordata.com/@username/briefs/q1-revenue.

Viewers see your narrative and embedded outputs—but not your raw data or notebook code.

What's Next?