Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added assets/kontur-h3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 21 additions & 5 deletions examples/clicked-point.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"id": "3371497b",
"metadata": {
"jupyter": {
Expand Down Expand Up @@ -49,18 +49,26 @@
{
"cell_type": "code",
"execution_count": null,
"id": "f986a64e-269f-4966-93b0-cfa5bf1ba882",
"id": "87de8097-4bb9-4180-a3ca-c82c826c38d6",
"metadata": {},
"outputs": [],
"source": [
"from typing import Tuple\n",
"\n",
"import ipywidgets as widgets\n",
"\n",
"from lonboard import Map\n",
"\n",
"from lonboard import Map"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f986a64e-269f-4966-93b0-cfa5bf1ba882",
"metadata": {},
"outputs": [],
"source": [
"## Create a Lonboard map and two widgets to display the coordinate\n",
"m = Map(layers=[])\n",
"m = Map(layers=[], view_state={\"zoom\": 1.5}, height=600)\n",
"clicked_x_display = widgets.FloatText(description=\"last clicked x:\")\n",
"clicked_y_display = widgets.FloatText(description=\"last clicked y:\")\n",
"\n",
Expand All @@ -82,6 +90,14 @@
" ],\n",
")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "05a0e681-899e-4a89-bf86-db55cdbef608",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
21 changes: 17 additions & 4 deletions examples/data-filter-extension.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
"import shapely\n",
"from ipywidgets import FloatRangeSlider, jsdlink\n",
"from palettable.colorbrewer.diverging import BrBG_10\n",
"from sidecar import Sidecar\n",
"\n",
"from lonboard import Map, ScatterplotLayer\n",
"from lonboard.colormap import apply_continuous_cmap\n",
Expand Down Expand Up @@ -228,6 +229,15 @@
"Next we create a `ScatterplotLayer` with our desired attributes. Keep in mind that you must pass the `DataFilterExtension` instance to the `extensions` parameter in order to activate its functionality on the layer.\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"sidecar = Sidecar(anchor=\"split-right\")"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -245,7 +255,8 @@
" radius_min_pixels=0.1,\n",
")\n",
"m = Map(layer)\n",
"m"
"with sidecar:\n",
" display(m)"
]
},
{
Expand Down Expand Up @@ -285,6 +296,10 @@
" description=\"Latency: \",\n",
")\n",
"multi_slider = MultiRangeSlider([download_slider, upload_slider, latency_slider])\n",
"\n",
"# Important: call jsdlink to link the widgets\n",
"jsdlink((multi_slider, \"value\"), (layer, \"filter_range\"))\n",
"\n",
"multi_slider"
]
},
Expand All @@ -300,9 +315,7 @@
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"_ = jsdlink((multi_slider, \"value\"), (layer, \"filter_range\"))"
]
"source": []
},
{
"cell_type": "code",
Expand Down
12 changes: 7 additions & 5 deletions examples/duckdb.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"source": [
"import duckdb\n",
"\n",
"from lonboard import Map, ScatterplotLayer"
"from lonboard import HeatmapLayer, Map"
]
},
{
Expand Down Expand Up @@ -149,7 +149,9 @@
"cell_type": "code",
"execution_count": null,
"id": "732bbfd3-b3da-4a38-a539-7a96200b5533",
"metadata": {},
"metadata": {
"scrolled": true
},
"outputs": [],
"source": [
"con.table(\"rides\")"
Expand All @@ -170,7 +172,7 @@
"metadata": {},
"outputs": [],
"source": [
"layer = ScatterplotLayer.from_duckdb(con.table(\"rides\"), con)"
"layer = HeatmapLayer.from_duckdb(con.table(\"rides\"), con)"
]
},
{
Expand All @@ -180,7 +182,7 @@
"metadata": {},
"outputs": [],
"source": [
"m = Map(layer)\n",
"m = Map(layer, height=700)\n",
"m"
]
},
Expand Down Expand Up @@ -218,7 +220,7 @@
"```\n",
"\n",
"Note that the heatmap around airports such as LaGuardia is now darker. There are fewer total rides dropping off at the airport, but each one is expensive!\n",
"-->"
"-->\n"
]
}
],
Expand Down
2 changes: 1 addition & 1 deletion examples/internet-speeds.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
"metadata": {},
"outputs": [],
"source": [
"sidecar = Sidecar()"
"sidecar = Sidecar(anchor=\"split-right\")"
]
},
{
Expand Down
231 changes: 231 additions & 0 deletions examples/kontur_pop.ipynb

Large diffs are not rendered by default.