Skip to content

Commit 7937c49

Browse files
authored
feat: Move TripsLayer and ArcLayer out of experimental (#983)
Sadly this diff is kinda big from moving things around 🙈 ### Change list - Split the big `layers.py` file into separate files with one layer per file - Split the big `traits.py` file into separate files - Move `TripsLayer` and `ArcLayer` out of the `experimental` module Closes #938
1 parent 83af0fc commit 7937c49

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+4670
-4155
lines changed

docs/api/layers/arc-layer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55
> Screen recording from [U.S. County-to-County Migration example](../../../examples/migration/).
66
7-
::: lonboard.experimental.ArcLayer
7+
::: lonboard.ArcLayer
88
options:
99
inherited_members: true

docs/api/layers/trips-layer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
> Screenshot from Air Traffic Control example.
66
7-
::: lonboard.experimental.TripsLayer
7+
::: lonboard.TripsLayer
88
options:
99
filters:
1010
- "!^_"

docs/api/traits.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# lonboard.traits
22

3+
::: lonboard.traits.ArrowTableTrait
34
::: lonboard.traits.ColorAccessor
45
::: lonboard.traits.DashArrayAccessor
5-
::: lonboard.traits.FloatAccessor
66
::: lonboard.traits.FilterValueAccessor
7+
::: lonboard.traits.FloatAccessor
78
::: lonboard.traits.NormalAccessor
89
::: lonboard.traits.PointAccessor
9-
::: lonboard.traits.ArrowTableTrait
10-
::: lonboard.experimental.traits.TimestampAccessor
10+
::: lonboard.traits.TimestampAccessor
11+
::: lonboard.traits.ViewStateTrait

examples/air-traffic-control.ipynb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"uvx juv run examples/air-traffic-control.ipynb\n",
4747
"```\n",
4848
"\n",
49-
"(The `uvx` command is included when installing `uv`)."
49+
"(The `uvx` command is included when installing `uv`).\n"
5050
]
5151
},
5252
{
@@ -68,8 +68,7 @@
6868
"import requests\n",
6969
"from arro3.io import read_parquet\n",
7070
"\n",
71-
"from lonboard import Map\n",
72-
"from lonboard.experimental import TripsLayer"
71+
"from lonboard import Map, TripsLayer"
7372
]
7473
},
7574
{

examples/ais-movingpandas.ipynb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"uvx juv run examples/ais-movingpandas.ipynb\n",
5757
"```\n",
5858
"\n",
59-
"(The `uvx` command is included when installing `uv`)."
59+
"(The `uvx` command is included when installing `uv`).\n"
6060
]
6161
},
6262
{
@@ -81,9 +81,8 @@
8181
"import pandas as pd\n",
8282
"import pyarrow as pa\n",
8383
"\n",
84-
"from lonboard import Map, PathLayer, viz\n",
85-
"from lonboard.colormap import apply_categorical_cmap\n",
86-
"from lonboard.experimental import TripsLayer"
84+
"from lonboard import Map, PathLayer, TripsLayer, viz\n",
85+
"from lonboard.colormap import apply_categorical_cmap"
8786
]
8887
},
8988
{

examples/marimo/nyc_taxi_trips.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,8 @@ from matplotlib.colors import Normalize
4747
from palettable.colorbrewer.diverging import BrBG_10
4848
from tqdm.notebook import tqdm
4949

50-
from lonboard import Map, ScatterplotLayer
50+
from lonboard import ArcLayer, Map, ScatterplotLayer
5151
from lonboard.colormap import apply_continuous_cmap
52-
from lonboard.experimental import ArcLayer
5352
from lonboard.layer_extension import BrushingExtension
5453
```
5554

examples/marimo/nyc_taxi_trips.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ def _():
5656
from palettable.colorbrewer.diverging import BrBG_10
5757
from tqdm.notebook import tqdm
5858

59-
from lonboard import Map, ScatterplotLayer
59+
from lonboard import ArcLayer, Map, ScatterplotLayer
6060
from lonboard.colormap import apply_continuous_cmap
61-
from lonboard.experimental import ArcLayer
6261
from lonboard.layer_extension import BrushingExtension
62+
6363
return (
6464
ArcLayer,
6565
BrBG_10,

examples/migration.ipynb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
},
6767
{
6868
"cell_type": "code",
69-
"execution_count": 1,
69+
"execution_count": null,
7070
"id": "e92e7476-4f7d-4e50-b006-2c0b2428bd4f",
7171
"metadata": {},
7272
"outputs": [],
@@ -79,8 +79,7 @@
7979
"import shapely\n",
8080
"from matplotlib.colors import Normalize\n",
8181
"\n",
82-
"from lonboard import Map, ScatterplotLayer\n",
83-
"from lonboard.experimental import ArcLayer\n",
82+
"from lonboard import ArcLayer, Map, ScatterplotLayer\n",
8483
"from lonboard.layer_extension import BrushingExtension"
8584
]
8685
},

lonboard/__init__.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
"""Python library for fast, interactive geospatial vector data visualization in Jupyter."""
22

33
from . import colormap, controls, experimental, layer_extension, traits
4-
from ._layer import (
4+
from ._map import Map
5+
from ._version import __version__
6+
from ._viz import viz
7+
from .layer import (
8+
ArcLayer,
59
BaseArrowLayer,
610
BaseLayer,
711
BitmapLayer,
@@ -13,12 +17,11 @@
1317
PolygonLayer,
1418
ScatterplotLayer,
1519
SolidPolygonLayer,
20+
TripsLayer,
1621
)
17-
from ._map import Map
18-
from ._version import __version__
19-
from ._viz import viz
2022

2123
__all__ = [
24+
"ArcLayer",
2225
"BaseArrowLayer",
2326
"BaseLayer",
2427
"BitmapLayer",
@@ -31,6 +34,7 @@
3134
"PolygonLayer",
3235
"ScatterplotLayer",
3336
"SolidPolygonLayer",
37+
"TripsLayer",
3438
"__version__",
3539
"colormap",
3640
"controls",

0 commit comments

Comments
 (0)