Skip to content

Commit c204105

Browse files
author
Nathaniel Henry
committed
Render close_map() output as HTML in the docs build and map both commutes in the home search.
1 parent f3e2286 commit c204105

5 files changed

Lines changed: 24 additions & 0 deletions

File tree

docs/getting_started.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ A short tour of the client. The tutorials go further.
1616
:tags: [remove-cell]
1717
import os
1818
from closecity import Client, close_map
19+
import plotly.io as pio
20+
21+
# Emit self-contained HTML for each map so myst-nb renders it in the docs build.
22+
pio.renderers.default = "notebook_connected"
1923
close = Client(os.environ.get("CLOSECITY_KEY"))
2024
```
2125

docs/tutorials/amenity_basket.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ here applied to Richmond, Virginia.
2323
:tags: [remove-cell]
2424
import os
2525
from closecity import Client, close_map
26+
import plotly.io as pio
27+
28+
# Emit self-contained HTML for each map so myst-nb renders it in the docs build.
29+
pio.renderers.default = "notebook_connected"
2630
close = Client(os.environ.get("CLOSECITY_KEY"))
2731
```
2832

docs/tutorials/competitor_walksheds.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ city is Providence, Rhode Island.
2121
:tags: [remove-cell]
2222
import os
2323
from closecity import Client, close_map
24+
import plotly.io as pio
25+
26+
# Emit self-contained HTML for each map so myst-nb renders it in the docs build.
27+
pio.renderers.default = "notebook_connected"
2428
close = Client(os.environ.get("CLOSECITY_KEY"))
2529
```
2630

docs/tutorials/first_map.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ city is Providence, Rhode Island.
2020
:tags: [remove-cell]
2121
import os
2222
from closecity import Client, close_map
23+
import plotly.io as pio
24+
25+
# Emit self-contained HTML for each map so myst-nb renders it in the docs build.
26+
pio.renderers.default = "notebook_connected"
2327
close = Client(os.environ.get("CLOSECITY_KEY"))
2428
```
2529

docs/tutorials/home_search.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ import os
2424
import pandas as pd
2525
import geopandas as gpd
2626
from closecity import Client, close_map
27+
import plotly.io as pio
28+
29+
# Emit self-contained HTML for each map so myst-nb renders it in the docs build.
30+
pio.renderers.default = "notebook_connected"
2731
close = Client(os.environ.get("CLOSECITY_KEY"))
2832
```
2933

@@ -124,6 +128,10 @@ work_b = close.isochrone(lon = -71.0589, lat = 42.3555, mode = "transit",
124128
close_map(work_a, color = "#058040")
125129
```
126130

131+
```{code-cell} python
132+
close_map(work_b, color = "#f36e21")
133+
```
134+
127135
Keep the qualifying blocks that also sit inside both commutes. That short list is
128136
where to look.
129137

0 commit comments

Comments
 (0)