{ "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", "[![Nbviewer](https://img.shields.io/badge/render-nbviewer-lightgrey?logo=jupyter)](https://nbviewer.jupyter.org/github/stefmolin/python-data-viz-workshop/blob/main/slides/3-interactivity.ipynb) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/stefmolin/python-data-viz-workshop/main?urlpath=lab/tree/slides/3-interactivity.ipynb) [![View slides in browser](https://img.shields.io/badge/view-slides-orange?logo=reveal.js&logoColor=white)](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.12750 19.21750 12.00000) | \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.09010 19.07660 6.00000) | \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.85410 17.87050 6.00000) | \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.86360 17.89930 8.00000) | \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.86850 17.90660 8.00000) | \n", "1 | \n", "