|
28 | 28 | "source": [ |
29 | 29 | "### Learning Objectives\n", |
30 | 30 | "\n", |
31 | | - "This tutorial, together with tutorial `08a_Interactive_Image_Visualization` introduces three open-source Python libraries that enable powerful interactive visualization of images and catalogs.\n", |
| 31 | + "This tutorial, together with tutorial `08a_Interactive_Image_Visualization`, introduces three open-source Python libraries that enable powerful interactive visualization of images and catalogs.\n", |
32 | 32 | " 1. [**HoloViews**](http://holoviews.org): Produce high-quality interactive visualizations easily by annotating plots and images rather than using direct calls to a plotting library\n", |
33 | 33 | " 2. [**Bokeh**](https://bokeh.org): A powerful data visualization library that provides interactive tools including brushing and linking between multiple plots. `Holoviews` + `Bokeh`\n", |
34 | 34 | " 3. [**Datashader**](https://datashader.org): Accurately render very large datasets quickly and flexibly.\n", |
|
146 | 146 | "source": [ |
147 | 147 | "### 1. Data preparation\n", |
148 | 148 | "\n", |
149 | | - "The basis for any data visualization is the underlying data. In this tutorial we will work with both tabular data and images. " |
| 149 | + "The basis for any data visualization is the underlying data. In this tutorial we will work with tabular data." |
150 | 150 | ] |
151 | 151 | }, |
152 | 152 | { |
|
408 | 408 | "metadata": {}, |
409 | 409 | "source": [ |
410 | 410 | "Instead of subsetting a dataset to choose which columns to plot, Holoviews allows us to specifiy the dimensionality directly. \n", |
411 | | - "`kdims` are the key dimensions or the independent variable(s) and `vdims` are the value dimensions or the dependenent variable(s) " |
| 411 | + "`kdims` are the key dimensions or the independent variable(s) and `vdims` are the value dimensions or the dependenent variable(s). " |
412 | 412 | ] |
413 | 413 | }, |
414 | 414 | { |
|
438 | 438 | "cell_type": "markdown", |
439 | 439 | "metadata": {}, |
440 | 440 | "source": [ |
441 | | - "Dimensions can be specified as strings above but they are in fact rich objects. Dimension objects support a long descriptive label, which complements the short programmer-friendly name. Let's look at color-color diagram of the stars in the dataset. " |
| 441 | + "The dimensions have be specified as strings above, but they are in fact rich objects. Dimension objects support a long descriptive label, which complements the short programmer-friendly name. Let's look at color-color diagram of the stars in the dataset." |
442 | 442 | ] |
443 | 443 | }, |
444 | 444 | { |
|
494 | 494 | "cell_type": "markdown", |
495 | 495 | "metadata": {}, |
496 | 496 | "source": [ |
497 | | - "The techniques to apply customizations in the cells above use standard python syntax and are the recommended way to customize your visualizations in HoloViews. Holoviews also supports IPython magic commands. Magics are a much older approach that is not standard python and is specific to notebooks. [Holoviews notebook magic](https://holoviews.org/user_guide/Notebook_Magics.html) supports both line and cell magics. Here is an example of using magics to plot the same spatial distribution of `Objects` as above." |
| 497 | + "The techniques to apply customizations in the cells above use standard Python syntax and are the recommended way to customize your visualizations in HoloViews. HoloViews also supports IPython magic commands. Magics are a much older approach that is not standard Python and is specific to notebooks. [HoloViews notebook magic](https://holoviews.org/user_guide/Notebook_Magics.html) supports both line and cell magics. Here is an example of using magics to plot the same spatial distribution of `Objects` as above." |
498 | 498 | ] |
499 | 499 | }, |
500 | 500 | { |
|
558 | 558 | "source": [ |
559 | 559 | "### 3.0 Linked plots and data brushing with Bokeh\n", |
560 | 560 | "\n", |
561 | | - "A very useful feature of `Bokeh` is the ability to add connected interactivity between plots that show different atttributes of the same data. This is called `linking`. With linked plots, we can carry out data `brushing`, whereby we select and maniplulate data synchronously across multiple linked plots. For example, if we link a skyplot with a colour-magnitude diagram of the same dataset, we can interactively explore the relationship between the positions of objects in each plot. \n", |
| 561 | + "A very useful feature of `Bokeh` is the ability to add connected interactivity between plots that show different attributes of the same data. This is called `linking`. With linked plots, we can carry out data `brushing`, whereby we select and maniplulate data synchronously across multiple linked plots. For example, if we link a skyplot with a colour-magnitude diagram of the same dataset, we can interactively explore the relationship between the positions of objects in each plot. \n", |
562 | 562 | "\n", |
563 | 563 | "We will now look at the Bokeh plotting library directly to demonstrate how to set up brushing and linking between two panels showing different repsentations of the same dataset. A selection applied to either panel will highlight the selected points in the other panel.\n", |
564 | 564 | "\n", |
565 | | - "Based on [Bokeh linked brushing](http://bokeh.pydata.org/en/latest/docs/user_guide/interaction/linking.html#linked-brushing)" |
| 565 | + "This section is based on [Bokeh linked brushing](http://bokeh.pydata.org/en/latest/docs/user_guide/interaction/linking.html#linked-brushing)." |
566 | 566 | ] |
567 | 567 | }, |
568 | 568 | { |
|
616 | 616 | "source": [ |
617 | 617 | "#### 3.2 Colour-Magnitude Diagram linked to a Skyplot\n", |
618 | 618 | "\n", |
619 | | - "We will use bokeh to plot a color-magnitude (g vs. g-i) diagram making use of the cModel magnitudes and a skyplot and link link the two" |
| 619 | + "We will use bokeh to plot a color-magnitude (g vs. g-i) diagram making use of the cModel magnitudes and a skyplot and then link the two." |
620 | 620 | ] |
621 | 621 | }, |
622 | 622 | { |
|
690 | 690 | "cell_type": "markdown", |
691 | 691 | "metadata": {}, |
692 | 692 | "source": [ |
693 | | - "Use the hover tool to see information about individual datapoints (e.g., the objectd). This information should appear automatically as you hover the mouse over the datapoints. Notice the data points highlighted in red on one panel with the hover tool are also highlighted on the other panel.\n", |
| 693 | + "Use the hover tool to see information about individual datapoints (e.g., the `ObjectId`). This information should appear automatically as you hover the mouse over the datapoints. Notice the data points highlighted in red on one panel with the hover tool are also highlighted on the other panel.\n", |
694 | 694 | "\n", |
695 | 695 | "Next, click on the selection box icon (with a \"+\" sign) or the selection lasso icon found in the upper right corner of the figure. Use the selection box and selection lasso to make various selections in either panel by clicking and dragging on either panel. The selected data points will be displayed in the other panel." |
696 | 696 | ] |
|
0 commit comments