-
Notifications
You must be signed in to change notification settings - Fork 39
Closed
Description
from geodatafusion import register_all
from datafusion import SessionContext
from geoarrow.rust.core import GeoChunkedArray
from lonboard import viz
from arro3.core import Table
import numpy as np
import pyarrow as pa
import requests
from lonboard import Map, ScatterplotLayer
from lonboard.experimental import ArcLayer
from lonboard.layer_extension import BrushingExtension
def create_context():
ctx = SessionContext()
register_all(ctx)
ctx.register_parquet(
"trips",
"yellow_tripdata_2010-01_geo.parquet",
skip_metadata=False,
)
return ctx
ctx = create_context()
sql = "SELECT * FROM trips LIMIT 100000;"
table = Table.from_arrow(ctx.sql(sql))
non_geo_table = table.select([col for col in table.column_names if col not in ["pickup", "dropoff"]] )
layer = ArcLayer(
table=non_geo_table,
get_source_position=table["pickup"],
get_target_position=table["dropoff"],
get_source_color=[166, 3, 3],
get_target_color = [35, 181, 184],
get_width=200,
width_min_pixels=50,
)
view_state = dict(longitude=-73.95305330000001, latitude=40.742175399999994, zoom=10, pitch=0, bearing=0)
m = Map([layer], view_state=view_state)
m
Error loading child models or setting bounds: RuntimeError: unreachable
at parquet_wasm_bg.wasm:0x364e78
at parquet_wasm_bg.wasm:0x3f3bf1
at parquet_wasm_bg.wasm:0x94b69
at parquet_wasm_bg.wasm:0x16a0e6
at parquet_wasm_bg.wasm:0x15dcb2
at parquet_wasm_bg.wasm:0x29dd1b
at parquet_wasm_bg.wasm:0x35b55c
at parquet_wasm_bg.wasm:0x384331
at Yae (fd98ff29-36e3-46b7-8c4b-100f918bc846:2228:755)
at gLe (fd98ff29-36e3-46b7-8c4b-100f918bc846:2237:48404)
(anonymous) @ fd98ff29-36e3-46b7-8c4b-100f918bc846:4057
Metadata
Metadata
Assignees
Labels
No labels