Skip to content

Instantly share code, notes, and snippets.

View bobhaffner's full-sized avatar

Bob Haffner bobhaffner

View GitHub Profile
@bobhaffner
bobhaffner / ipynb
Created May 16, 2022 12:51
ipyleaflet on_interaction example
from ipywidgets import Label
from ipyleaflet import Map
m = Map(center=[42,-90], zoom=4)
label = Label()
display(label)
def handle_interaction(**kwargs):
if kwargs.get('type') == 'click':
<!DOCTYPE html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<script>L_PREFER_CANVAS = false; L_NO_TOUCH = false; L_DISABLE_3D = false;</script>
<script src="https://unpkg.com/leaflet@1.0.1/dist/leaflet.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/1.0.0/leaflet.markercluster-src.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/1.0.0/leaflet.markercluster.js"></script>
@bobhaffner
bobhaffner / folium.ipynb
Last active July 28, 2017 00:39
folium_basics
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bobhaffner
bobhaffner / pandas_io_performance.ipynb
Last active June 2, 2024 13:48
Pandas io performance
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.