# Get started

## TOC

* [Start Server](#start-server)
* [Edit Your First Notebook](#eidt-your-first-notebook)

## Start Server

Start ElixirNote using:

```shell
elixir-lab --allow-root --ip=0.0.0.0
```

ElixirNote will open automatically in your browser.

If your notebook files are not in the current directory, you can pass your working directory path as an argument when starting ElixirNote.&#x20;

```shell
elixir-lab --allow-root --ip=0.0.0.0 --notebook-dir=~/myNotebooks
```

ElixirNote runs on top of Elixir Server, so see the [server section](https://github.com/ElixirNote/elixirserver) if necessary.

## Edit Your First Notebook

Copy below content into cell:

```python
import altair as alt
from vega_datasets import data

boroughs = alt.topo_feature(data.londonBoroughs.url, 'boroughs')
tubelines = alt.topo_feature(data.londonTubeLines.url, 'line')
centroids = data.londonCentroids.url

background = alt.Chart(boroughs).mark_geoshape(
    stroke='white',
    strokeWidth=2
).encode(
    color=alt.value('#eee'),
).properties(
    width=1200,
    height=700
)

labels = alt.Chart(centroids).mark_text().encode(
    longitude='cx:Q',
    latitude='cy:Q',
    text='bLabel:N',
    size=alt.value(8),
    opacity=alt.value(0.6)
).transform_calculate(
    "bLabel", "indexof (datum.name,' ') > 0  ? substring(datum.name,0,indexof(datum.name, ' ')) : datum.name"
)

line_scale = alt.Scale(domain=["Bakerloo", "Central", "Circle", "District", "DLR",
                               "Hammersmith & City", "Jubilee", "Metropolitan", "Northern",
                               "Piccadilly", "Victoria", "Waterloo & City"],
                       range=["rgb(137,78,36)", "rgb(220,36,30)", "rgb(255,206,0)",
                              "rgb(1,114,41)", "rgb(0,175,173)", "rgb(215,153,175)",
                              "rgb(106,114,120)", "rgb(114,17,84)", "rgb(0,0,0)",
                              "rgb(0,24,168)", "rgb(0,160,226)", "rgb(106,187,170)"])

lines = alt.Chart(tubelines).mark_geoshape(
    filled=False,
    strokeWidth=2
).encode(
    alt.Color(
        'id:N',
        legend=alt.Legend(
            title=None,
            orient='bottom-right',
            offset=0
        ),
        scale=line_scale
    )
)

background + labels + lines
```

Output like this:

<figure><img src="https://1227622466-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAAHwGJ9b98DtetNs3LBY%2Fuploads%2F5XkDMmD2uqMjuQuY36W9%2FScreen%20Shot%202023-03-04%20at%2017.27.07.png?alt=media&#x26;token=dc966557-7956-4816-9a91-6849a26f97de" alt=""><figcaption></figcaption></figure>
