Get help from the marimo community

Updated 2 months ago

lonboard map display

At a glance

The community member is trying to display a map using Lonboard, but they are not getting any errors but also not seeing the map display. They understand that Lonboard uses Anywidget to output a Jupyter widget, but they are unsure about the process. Other community members have asked for a minimal example and a full runnable example to help troubleshoot the issue. One community member has provided a code snippet that creates a table, queries the data, and attempts to display the map using Anywidget, but it is unclear if this is a complete solution. There is no explicitly marked answer in the comments.

Useful resources
trying to display a map using lonboard. I don't get an error, but also don't get a map display. Does anyone have any experience with this? My understanding is that lonboard uses anywidget to output a jupyter widget, but I don't know.
M
b
6 comments
can you share a minimal example?
^ what is the best way for sharing an example?
if you have a code snippet or marimo notebook, thanks!
Here is a snippet:
Plain Text
ddb.sql("create or replace table ncmap as select County,FIPS,County_ID,ST_Transform(geom,'EPSG:2264','EPSG:4326') as geometry from ST_Read('map/NC_State_County_Boundary_NCGS_2017.shp')")

sql = "SELECT County,FIPS,County_ID,ST_FlipCoordinates(geometry) as geometry FROM ncmap;"
query = ddb.sql(sql)
layer = PolygonLayer.from_duckdb(
    query,
    crs='EPSG:4326',
    get_fill_color=[255, 255, 0],
)
m = Map(layer,_height=200)
type(layer)
mo.ui.anywidget(m)

This is what it looks like in VSCode
Attachment
image.png
Do you have a full runnable example?
Add a reply
Sign up and join the conversation on Discord