import geopandas as gpd
import palettable.colorbrewer.diverging
from lonboard import Map, PathLayer
from lonboard.colormap import apply_continuous_cmap
= "/home/rstudio/source.coop/avikertesz/004/eel_flow.geojson"
filepath = gpd.read_file(filepath, engine="pyogrio", use_arrow=True)
gdf
# select columns we want for our visualization/mouse-over tooltip
= ["StreamOrde", "StreamCalc", "Permanent_Identifier", "Slope", "MaxElevRaw", "geometry"]
cols = gdf[cols] gdf
= PathLayer.from_geopandas(gdf, width_min_pixels=0.5)
layer = gdf["StreamOrde"] * 20
layer.get_width = [20, 0, 200]
layer.get_color = 0.5
layer.opacity = Map(layers=[layer])
map_ map_
/opt/venv/lib/python3.10/site-packages/lonboard/_geoarrow/ops/reproject.py:97: UserWarning: Input being reprojected to EPSG:4326 CRS
warnings.warn("Input being reprojected to EPSG:4326 CRS")
"lonboard.html") map_.to_html(