This is a quick example notebook to show how to use the ColumnLayer
.
This is derived from @cboettig
's example in this issue.
pip install lonboard geopandas pyarrow
import geopandas as gpd
from lonboard import Map, ColumnLayer
DATA_URL = 'https://data.source.coop/cboettig/conservation-policy/Inflation_Reduction_Act_Projects.geojson'
df = gpd.read_file(DATA_URL, use_arrow=True)
layer = ColumnLayer.from_geopandas(
df,
get_elevation=df["FUNDING_NUMERIC"],
get_fill_color = [255, 255, 0, 140],
elevation_scale=.01,
radius=10000,
pickable=True,
auto_highlight=True,
)
m = Map(
layer,
view_state={"longitude": -100, "latitude": 35, "zoom": 4, "pitch": 45, "bearing": 0},
)
m