{ "cells": [ { "cell_type": "markdown", "id": "f62220b8-2190-452e-9fd5-66c1641580f7", "metadata": { "slideshow": { "slide_type": "skip" }, "tags": [] }, "source": [ "**NOTE: GitHub doesn't render all of the images in this notebook. Use nbviewer to render without full interactivity. View this locally for best results.**\n", "\n", "[](https://nbviewer.jupyter.org/github/stefmolin/python-data-viz-workshop/blob/main/slides/3-interactivity.ipynb) [](https://mybinder.org/v2/gh/stefmolin/python-data-viz-workshop/main?urlpath=lab/tree/slides/3-interactivity.ipynb) [](https://stefaniemolin.com/python-data-viz-workshop/#/section-3)\n", "\n", "---" ] }, { "cell_type": "markdown", "id": "d4395d25-c867-4bda-a311-06db3c6b11d7", "metadata": { "slideshow": { "slide_type": "slide" }, "tags": [ "id_section-3" ] }, "source": [ "# Section 3: Building Interactive Visualizations for Data Exploration\n", "\n", "When exploring our data, interactive visualizations can provide the most value. Without having to create multiple iterations of the same plot, we can use mouse actions (e.g., click, hover, zoom, etc.) to explore different aspects and subsets of the data. In this section, we will learn how to use a few of the libraries in the HoloViz ecosystem to create interactive visualizations for exploring our data utilizing the Bokeh backend.\n", "\n", "
| \n", " | mag | \n", "place | \n", "time | \n", "tsunami | \n", "magType | \n", "geometry | \n", "month | \n", "
|---|---|---|---|---|---|---|---|
| 0 | \n", "2.75 | \n", "80 km N of Isabela, Puerto Rico | \n", "2020-01-01 00:01:56.590 | \n", "0 | \n", "md | \n", "POINT Z (-67.1275 19.2175 12) | \n", "1 | \n", "
| 1 | \n", "2.55 | \n", "64 km N of Isabela, Puerto Rico | \n", "2020-01-01 00:03:38.210 | \n", "0 | \n", "md | \n", "POINT Z (-67.0901 19.0766 6) | \n", "1 | \n", "
| 2 | \n", "1.81 | \n", "12 km SSE of Maria Antonia, Puerto Rico | \n", "2020-01-01 00:05:09.440 | \n", "0 | \n", "md | \n", "POINT Z (-66.8541 17.8705 6) | \n", "1 | \n", "
| 3 | \n", "1.84 | \n", "9 km SSE of Maria Antonia, Puerto Rico | \n", "2020-01-01 00:05:36.930 | \n", "0 | \n", "md | \n", "POINT Z (-66.8636 17.8993 8) | \n", "1 | \n", "
| 4 | \n", "1.64 | \n", "8 km SSE of Maria Antonia, Puerto Rico | \n", "2020-01-01 00:09:20.060 | \n", "0 | \n", "md | \n", "POINT Z (-66.8685 17.9066 8) | \n", "1 | \n", "