O'Reilly logo

IPython Interactive Computing and Visualization Cookbook - Second Edition by Cyrille Rossant

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Discovering interactive visualization libraries in the Notebook

Several libraries provide interactive visualization of 2D or 3D data in the Notebook, using the capabilities of Jupyter widgets. We give basic examples using four of these libraries: ipyleaflet, bqplot, pythreejs, and ipyvolume.

Getting started

To install the libraries, type conda install -c conda-forge ipyleaflet bqplot pythreejs ipyvolume in a Terminal.

How to do it...

  1. First, we show a simple example of ipyleaflet, which offers a Python interface to use the Leaflet.js interactive mapping library (similar to Google Maps, but based on the open source project OpenStreetMaps):
    >>> from ipyleaflet import Map, Marker
  2. We create a map around a given position specified in GPS coordinates:
    >>> pos ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required