Skip to content

Commit

Permalink
Changed name to Linked_Brushing
Browse files Browse the repository at this point in the history
  • Loading branch information
jbednar committed Feb 27, 2020
1 parent fbd83e9 commit 3ac49f7
Showing 1 changed file with 11 additions and 11 deletions.
Expand Up @@ -23,9 +23,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### JavaScript-based brushing and linking\n",
"### JavaScript-based linked brushing\n",
"\n",
"Datasets very often have more dimensions than can be shown in a single plot, which is why HoloViews offers so many ways to show the data from each of these dimensions at once (via layouts, overlays, grids, holomaps, etc.). However, even once the data has been displayed, it can be difficult to relate data points between the various plots that are laid out together. For instance, \"is the outlier I can see in this x,y plot the same datapoint that stands out in this w,z plot\"? \"Are the datapoints with high x values in this plot also the ones with high w values in this other plot?\" Since points are not usually visibly connected between plots, answering such questions can be difficult and tedious, making it difficult to understand multidimensional datasets. [Brushing and linking](https://infovis-wiki.net/wiki/Linking_and_Brushing) offers an easy way to understand how data points and groups of them relate across different plots. Here \"brushing\" refers to selecting data points or ranges in one plot, with \"linking\" then showing those points or ranges in other plots derived from the same data.\n",
"Datasets very often have more dimensions than can be shown in a single plot, which is why HoloViews offers so many ways to show the data from each of these dimensions at once (via layouts, overlays, grids, holomaps, etc.). However, even once the data has been displayed, it can be difficult to relate data points between the various plots that are laid out together. For instance, \"is the outlier I can see in this x,y plot the same datapoint that stands out in this w,z plot\"? \"Are the datapoints with high x values in this plot also the ones with high w values in this other plot?\" Since points are not usually visibly connected between plots, answering such questions can be difficult and tedious, making it difficult to understand multidimensional datasets. [Linked brushing](https://infovis-wiki.net/wiki/Linking_and_Brushing) (also called \"brushing and linking\") offers an easy way to understand how data points and groups of them relate across different plots. Here \"brushing\" refers to selecting data points or ranges in one plot, with \"linking\" then highlighting those same points or ranges in other plots derived from the same data.\n",
"\n",
"As an example, consider the standard \"autompg\" dataset:"
]
Expand Down Expand Up @@ -66,7 +66,7 @@
"source": [
"These plots show all sorts of interesting relationships already, such as that weight and horsepower are highly positively correlated (locate _weight_ along one axis and _hp_ along the other, and you can see that car models with high weight almost always have high horsepower and vice versa).\n",
"\n",
"What if we want to focus specifically on the subset of cars that have 4 cylinders (*cyl*)? You can do that by pre-filtering the dataframe in Python, but questions like that can be answered immediately using brushing and linking, which is automatically supported by `gridmatrix` plots like this one. First, make sure the \"box select\" or \"lasso select\" tool is selected in the toolbar: <img src=\"https://bokeh.pydata.org/en/latest/_images/BoxSelect.png\"><img src=\"https://bokeh.pydata.org/en/latest/_images/LassoSelect.png\">\n",
"What if we want to focus specifically on the subset of cars that have 4 cylinders (*cyl*)? You can do that by pre-filtering the dataframe in Python, but questions like that can be answered immediately using linked brushing, which is automatically supported by `gridmatrix` plots like this one. First, make sure the \"box select\" or \"lasso select\" tool is selected in the toolbar: <img src=\"https://bokeh.pydata.org/en/latest/_images/BoxSelect.png\"><img src=\"https://bokeh.pydata.org/en/latest/_images/LassoSelect.png\">\n",
"\n",
"Then pick one of the points plots labeled _cyl_ and use the selection tool to select all the values where _cyl_ is 4. All of those points in each plot should remain blue, while the points where _cyl_ is not 4 become more transparent: "
]
Expand All @@ -89,11 +89,11 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Python-based brushing and linking\n",
"# Python-based linked brushing\n",
"\n",
"The above example illustrates brushing and linking using the automatic JavaScript-based selection linking support provided by `gridmatrix`. It also illustrates the limitations of such support, because showing _every_ relationship in a grid like that will often be confusing and impractical. Even eight numerical dimensions is unwieldy with a complete grid, and datastets can have arbitrarily many dimensions. \n",
"The above example illustrates linked brushing using the automatic JavaScript-based selection linking support provided by `gridmatrix`. It also illustrates the limitations of such support, because showing _every_ relationship in a grid like that will often be confusing and impractical. Even eight numerical dimensions is unwieldy with a complete grid, and datastets can have arbitrarily many dimensions. \n",
"\n",
"Instead, it is likely that you will want to select specific dimensions to pull out into specific plots with appropriate options for each one. HoloViews provides a Python-based implementation of brushing and linking that lets you fully customize what elements are used and how linking behaves, as long as you have a live Python process available (unlike the JavaScript linking in the `gridmatrix` plot above). Here, let's make a custom Layout displaying some Scatter plots for just a few of the available dimensions:"
"Instead, it is likely that you will want to select specific dimensions to pull out into specific plots with appropriate options for each one. HoloViews provides a Python-based implementation of linked brushing that lets you fully customize what elements are used and how linking behaves, as long as you have a live Python process available (unlike the JavaScript linking in the `gridmatrix` plot above). Here, let's make a custom Layout displaying some Scatter plots for just a few of the available dimensions:"
]
},
{
Expand All @@ -113,7 +113,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Now that we have a layout we can simply apply the `link_selections` operation to support brushing and linking, automatically linking the selections across an arbitrary collection of plots that are derived from the same dataset:"
"Now that we have a layout we can simply apply the `link_selections` operation to support linked brushing, automatically linking the selections across an arbitrary collection of plots that are derived from the same dataset:"
]
},
{
Expand Down Expand Up @@ -205,7 +205,7 @@
"\n",
"Additional selections in other plots add to this list of filters if enabled, while additional selections within the same plot are combined with an operator that depends on the `selection_mode`.\n",
"\n",
"To better understand how to configure brushing and linking, let's create a [Panel](https://panel.holoviz.org) that makes widgets for the parameters of the `linked_selection` operation and lets us explore their effect interactively. Play around with different `cross_filter_mode` and `selection_mode` settings and observe their effects (hitting reset when needed to get back to an unselected state):"
"To better understand how to configure linked brushing, let's create a [Panel](https://panel.holoviz.org) that makes widgets for the parameters of the `linked_selection` operation and lets us explore their effect interactively. Play around with different `cross_filter_mode` and `selection_mode` settings and observe their effects (hitting reset when needed to get back to an unselected state):"
]
},
{
Expand Down Expand Up @@ -296,7 +296,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"This type of brushing and linking will work even for datasets not including the latitude and longitude axes of the choropleth plot, because each selected county resolves not to a geographic region but to a county name, which can then be used to index into any other dataset that includes the county name for each data point."
"This type of linked brushing will work even for datasets not including the latitude and longitude axes of the choropleth plot, because each selected county resolves not to a geographic region but to a county name, which can then be used to index into any other dataset that includes the county name for each data point."
]
},
{
Expand All @@ -323,7 +323,7 @@
"source": [
"### Plotly support\n",
"\n",
"Brushing and linking also works with the Plotly backend, which, unlike Bokeh, has support for rendering 3D plots:"
"Linked brushing also works with the Plotly backend, which, unlike Bokeh, has support for rendering 3D plots:"
]
},
{
Expand Down Expand Up @@ -411,7 +411,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.5"
"version": "3.7.4"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 3ac49f7

Please sign in to comment.