{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "#### New to Plotly?\n", "Plotly's Python library is free and open source! [Get started](https://plot.ly/python/getting-started/) by downloading the client and [reading the primer](https://plot.ly/python/getting-started/).\n", "
You can set up Plotly to work in [online](https://plot.ly/python/getting-started/#initialization-for-online-plotting) or [offline](https://plot.ly/python/getting-started/#initialization-for-offline-plotting) mode, or in [jupyter notebooks](https://plot.ly/python/getting-started/#start-plotting-online).\n", "
We also have a quick-reference [cheatsheet](https://images.plot.ly/plotly-documentation/images/python_cheat_sheet.pdf) (new!) to help you get started!" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Version Check\n", "Plotly's python package is updated frequently. Run `pip install plotly --upgrade` to use the latest version." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'3.4.0rc1'" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import plotly\n", "plotly.__version__" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "import plotly.graph_objs as go\n", "\n", "import pandas as pd\n", "import numpy as np\n", "import ipywidgets as widgets" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Parallel Categories Trace\n", "The parallel categories trace is a visualization of multi-dimensional categorical data sets. Each variable in the data set is represented by a column of rectangles, where each rectangle corresponds to a discrete value taken on by that variable. The relative heights of the rectangles reflect the relative frequency of occurrence of the corresponding value.\n", "\n", "Combinations of category rectangles across dimensions are connected by ribbons, where the height of the ribbon corresponds to the relative frequency of occurrence of the combination of categories in the data set.\n", "\n", "#### Basic Parallel Categories Trace\n", "In this first example, we visualize the hair color, eye color, and sex of a sample of 8 people. Hovering over a category rectangle displays a tooltip with the number of people with that single trait. Hovering over a ribbon in the diagram displays a tooltip with the number of people with a particular combination of the three traits connected by the ribbon.\n", "\n", "The dimension labels can be dragged horizontally to reorder the dimensions and the category rectangles can be dragged vertically to reorder the categories within a dimension." ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "289c067216404b5a8cc75a327707af16", "version_major": 2, "version_minor": 0 }, "text/plain": [ "FigureWidget({\n", " 'data': [{'dimensions': [{'label': 'Hair',\n", " 'values': [Black, …" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "parcats = go.Parcats(\n", " dimensions=[\n", " {'label': 'Hair',\n", " 'values': ['Black', 'Black', 'Black', 'Brown',\n", " 'Brown', 'Brown', 'Red', 'Brown']},\n", " {'label': 'Eye',\n", " 'values': ['Brown', 'Brown', 'Brown', 'Brown',\n", " 'Brown', 'Blue', 'Blue', 'Blue']},\n", " {'label': 'Sex',\n", " 'values': ['Female', 'Female', 'Female', 'Male',\n", " 'Female', 'Male', 'Male', 'Male']}]\n", ")\n", "\n", "go.FigureWidget(data=[parcats], layout={'width': 800})" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Basic Parallel Categories Trace with Counts\n", "If the frequency of occurrence for each combination of attributes is known in advance, this can be specified using the `counts` property" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "6ba931d1e8e1415cbffe326c888f4c4b", "version_major": 2, "version_minor": 0 }, "text/plain": [ "FigureWidget({\n", " 'data': [{'counts': [6, 10, 40, 23, 7],\n", " 'dimensions': [{'label': 'Hair', 'val…" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "parcats = go.Parcats(\n", " dimensions=[\n", " {'label': 'Hair',\n", " 'values': ['Black', 'Brown', 'Brown', 'Brown', 'Red']},\n", " {'label': 'Eye',\n", " 'values': ['Brown', 'Brown', 'Brown', 'Blue', 'Blue']},\n", " {'label': 'Sex',\n", " 'values': ['Female', 'Male', 'Female', 'Male', 'Male']}],\n", " counts=[6, 10, 40, 23, 7]\n", ")\n", "\n", "go.FigureWidget(data=[parcats], layout={'width': 800})" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Mutli-Color Parallel Categories Trace\n", "The color of the ribbons can be specified with the `line.color` property. Similar to other trace types, this property may be set to an array of numbers, which are then mapped to colors according to the the colorscale specified in the `line.colorscale` property.\n", "\n", "Here is an example of visualizing the survival rate of passengers in the titanic dataset, where the ribbons are colored based on survival outcome.\n", "\n", "By setting the `hoveron` property to `'color'` and the `hoverinfo` property to `'count+probability'` the tooltips now display count and probability information for each color (outcome) per category.\n", "\n", "By setting the `arrangement` property to `'freeform'` it is now possible to drag categories horizontally to reorder dimensions as well as vertically to reorder categories within the dimension." ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
PassengerIdSurvivedPclassNameSexAgeSibSpParchTicketFareCabinEmbarked
0103Braund, Mr. Owen Harrismale22.010A/5 211717.2500NaNS
1211Cumings, Mrs. John Bradley (Florence Briggs Th...female38.010PC 1759971.2833C85C
2313Heikkinen, Miss. Lainafemale26.000STON/O2. 31012827.9250NaNS
3411Futrelle, Mrs. Jacques Heath (Lily May Peel)female35.01011380353.1000C123S
4503Allen, Mr. William Henrymale35.0003734508.0500NaNS
\n", "
" ], "text/plain": [ " PassengerId Survived Pclass \\\n", "0 1 0 3 \n", "1 2 1 1 \n", "2 3 1 3 \n", "3 4 1 1 \n", "4 5 0 3 \n", "\n", " Name Sex Age SibSp \\\n", "0 Braund, Mr. Owen Harris male 22.0 1 \n", "1 Cumings, Mrs. John Bradley (Florence Briggs Th... female 38.0 1 \n", "2 Heikkinen, Miss. Laina female 26.0 0 \n", "3 Futrelle, Mrs. Jacques Heath (Lily May Peel) female 35.0 1 \n", "4 Allen, Mr. William Henry male 35.0 0 \n", "\n", " Parch Ticket Fare Cabin Embarked \n", "0 0 A/5 21171 7.2500 NaN S \n", "1 0 PC 17599 71.2833 C85 C \n", "2 0 STON/O2. 3101282 7.9250 NaN S \n", "3 0 113803 53.1000 C123 S \n", "4 0 373450 8.0500 NaN S " ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "titanic_df = pd.read_csv(\"https://gist.githubusercontent.com/michhar/2dfd2de0d4f8727f873422c5d959fff5/raw/ff414a1bcfcba32481e4d4e8db578e55872a2ca1/titanic.csv\", sep='\\t')\n", "titanic_df.head()" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "36a9a4990d8e4c659687d9ef9a0330a5", "version_major": 2, "version_minor": 0 }, "text/plain": [ "FigureWidget({\n", " 'data': [{'arrangement': 'freeform',\n", " 'dimensions': [{'categoryorder': 'catego…" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# Create dimensions\n", "class_dim = go.parcats.Dimension(\n", " values=titanic_df.Pclass,\n", " categoryorder='category ascending',\n", " label=\"Class\"\n", ")\n", "\n", "gender_dim = go.parcats.Dimension(\n", " values=titanic_df.Sex,\n", " label=\"Gender\"\n", ")\n", "\n", "survival_dim = go.parcats.Dimension(\n", " values=titanic_df.Survived,\n", " label=\"Outcome\",\n", " categoryarray=[0, 1],\n", " ticktext=['perished', 'survived'],\n", ")\n", "\n", "# Create parcats trace\n", "color = titanic_df.Survived;\n", "colorscale = [[0, 'lightsteelblue'], [1, 'mediumseagreen']];\n", "\n", "data = [\n", " go.Parcats(\n", " dimensions=[class_dim, gender_dim, survival_dim],\n", " line={'color': color,\n", " 'colorscale': colorscale},\n", " hoveron='color',\n", " hoverinfo='count+probability',\n", " arrangement='freeform'\n", " )\n", "]\n", "layout = go.Layout(title='Titanic Survival',\n", " font={'family': 'Serif', 'size': 18},\n", " width=800)\n", "\n", "# Create figure\n", "go.FigureWidget(data, layout=layout)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Parallel Categories Linked Brushing\n", "This example demonstrates how the `on_selection` and `on_click` callbacks can be used to implement linked brushing between 3 categorical dimensions displayed with a `parcats` trace and 2 continuous dimensions displayed with a `scatter` trace.\n", "\n", "This example also sets the `line.shape` property to `hspline` to cause the ribbons to curve between categories.\n", "\n", "**Note:** In order for the callback functions to be executed the figure must be a `FigureWidget`, and the figure should display itself. In particular the `plot` and `iplot` functions should not be used." ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
symbolingnormalized-lossesmakefuel-typeaspirationnum-of-doorsbody-styledrive-wheelsengine-locationwheel-base...engine-sizefuel-systemborestrokecompression-ratiohorsepowerpeak-rpmcity-mpghighway-mpgprice
03NaNalfa-romerogasstdtwoconvertiblerwdfront88.6...130mpfi3.472.689.0111.05000.0212713495.0
13NaNalfa-romerogasstdtwoconvertiblerwdfront88.6...130mpfi3.472.689.0111.05000.0212716500.0
21NaNalfa-romerogasstdtwohatchbackrwdfront94.5...152mpfi2.683.479.0154.05000.0192616500.0
32164.0audigasstdfoursedanfwdfront99.8...109mpfi3.193.4010.0102.05500.0243013950.0
42164.0audigasstdfoursedan4wdfront99.4...136mpfi3.193.408.0115.05500.0182217450.0
\n", "

5 rows × 26 columns

\n", "
" ], "text/plain": [ " symboling normalized-losses make fuel-type aspiration \\\n", "0 3 NaN alfa-romero gas std \n", "1 3 NaN alfa-romero gas std \n", "2 1 NaN alfa-romero gas std \n", "3 2 164.0 audi gas std \n", "4 2 164.0 audi gas std \n", "\n", " num-of-doors body-style drive-wheels engine-location wheel-base ... \\\n", "0 two convertible rwd front 88.6 ... \n", "1 two convertible rwd front 88.6 ... \n", "2 two hatchback rwd front 94.5 ... \n", "3 four sedan fwd front 99.8 ... \n", "4 four sedan 4wd front 99.4 ... \n", "\n", " engine-size fuel-system bore stroke compression-ratio horsepower \\\n", "0 130 mpfi 3.47 2.68 9.0 111.0 \n", "1 130 mpfi 3.47 2.68 9.0 111.0 \n", "2 152 mpfi 2.68 3.47 9.0 154.0 \n", "3 109 mpfi 3.19 3.40 10.0 102.0 \n", "4 136 mpfi 3.19 3.40 8.0 115.0 \n", "\n", " peak-rpm city-mpg highway-mpg price \n", "0 5000.0 21 27 13495.0 \n", "1 5000.0 21 27 16500.0 \n", "2 5000.0 19 26 16500.0 \n", "3 5500.0 24 30 13950.0 \n", "4 5500.0 18 22 17450.0 \n", "\n", "[5 rows x 26 columns]" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "cars_df = pd.read_csv('https://raw.githubusercontent.com/mtrebi/d3_cars/e90ede77443df72e714863f876e921cfb2977b56/data/imports-85.csv')\n", "cars_df.head()" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "scrolled": false }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "6c7314c859614f5d81efe26e10dffd02", "version_major": 2, "version_minor": 0 }, "text/plain": [ "FigureWidget({\n", " 'data': [{'marker': {'color': 'gray'},\n", " 'mode': 'markers',\n", " 'sele…" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# Build parcats dimensions\n", "categorical_dimensions = [\n", " 'body-style',\n", " 'drive-wheels',\n", " 'fuel-type'\n", "];\n", "\n", "dimensions = [\n", " dict(values=cars_df[label], label=label)\n", " for label in categorical_dimensions\n", "]\n", "\n", "# Build figure as FigureWidget\n", "color = np.zeros(len(cars_df), dtype='uint8')\n", "colorscale = [[0, 'gray'], [1, 'firebrick']]\n", "\n", "fig = go.FigureWidget(\n", " data=[\n", " go.Scatter(\n", " x=cars_df.horsepower,\n", " y=cars_df['highway-mpg'],\n", " marker={'color': 'gray'},\n", " mode='markers',\n", " selected={'marker': {'color': 'firebrick'}},\n", " unselected={'marker': {'opacity': 0.3}}),\n", "\n", " go.Parcats(\n", " domain={'y': [0, 0.4]},\n", " dimensions=dimensions,\n", " line={\n", " 'colorscale': colorscale,\n", " 'cmin': 0,\n", " 'cmax': 1,\n", " 'color': color,\n", " 'shape': 'hspline'})\n", " ],\n", " layout=go.Layout(\n", " height=800,\n", " width=800,\n", " xaxis={'title': 'Horsepower'},\n", " yaxis={'title': 'MPG',\n", " 'domain': [0.6, 1]},\n", " dragmode='lasso',\n", " font={'size': 16},\n", " hovermode='closest')\n", ")\n", "\n", "# Update color callback\n", "def update_color(trace, points, state):\n", " # Update scatter selection\n", " fig.data[0].selectedpoints = points.point_inds\n", " \n", " # Update parcats colors\n", " new_color = np.zeros(len(cars_df), dtype='uint8')\n", " new_color[points.point_inds] = 1\n", " fig.data[1].line.color = new_color\n", " \n", "# Register callback on scatter selection...\n", "fig.data[0].on_selection(update_color)\n", "# and parcats click\n", "fig.data[1].on_click(update_color)\n", "\n", "# Display figure\n", "fig" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Parallel Categories with Multi-Color Linked Brushing\n", "This example extends the previous example to support brushing with multiple colors. The radio buttons above may be used to select the active color, and this color will be applied when points are selected in the `scatter` trace and when categories or ribbons are clicked in the `parcats` trace." ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "scrolled": false }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "a7d8f63baf074164b9e16d58d089a451", "version_major": 2, "version_minor": 0 }, "text/plain": [ "VBox(children=(ToggleButtons(description='Brush Color:', index=1, options=('None', 'Red', 'Blue'), value='Red'…" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# Build parcats dimensions\n", "categorical_dimensions = [\n", " 'body-style',\n", " 'drive-wheels',\n", " 'fuel-type'\n", "];\n", "\n", "dimensions = [\n", " dict(values=cars_df[label], label=label)\n", " for label in categorical_dimensions\n", "]\n", "\n", "# Build parcats trace\n", "color = np.zeros(len(cars_df), dtype='uint8')\n", "colorscale = [[0, 'gray'], [0.33, 'gray'],\n", " [0.33, 'firebrick'], [0.66, 'firebrick'],\n", " [0.66, 'blue'], [1.0, 'blue']];\n", "cmin = -0.5\n", "cmax = 2.5\n", "\n", "# Build figure as FigureWidget\n", "fig = go.FigureWidget(\n", " data=[\n", " go.Scatter(\n", " x=cars_df.horsepower,\n", " y=cars_df['highway-mpg'],\n", " marker={'color': color,\n", " 'cmin': cmin,\n", " 'cmax': cmax,\n", " 'colorscale': colorscale,\n", " 'showscale': True,\n", " 'colorbar': {'tickvals': [0, 1, 2],\n", " 'ticktext': ['None', 'Red', 'Blue']}\n", " },\n", " mode='markers'),\n", "\n", " go.Parcats(\n", " domain={'y': [0, 0.4]},\n", " dimensions=dimensions,\n", " line={\n", " 'colorscale': colorscale,\n", " 'cmin': cmin,\n", " 'cmax': cmax,\n", " 'color': color,\n", " 'shape': 'hspline'})\n", " ],\n", " layout=go.Layout(\n", " height=800,\n", " width=800,\n", " xaxis={'title': 'Horsepower'},\n", " yaxis={'title': 'MPG',\n", " 'domain': [0.6, 1]},\n", " dragmode='lasso',\n", " font={'size': 16},\n", " hovermode='closest')\n", ")\n", "\n", "# Build color selection widget\n", "color_toggle = widgets.ToggleButtons(\n", " options=['None', 'Red', 'Blue'],\n", " index=1,\n", " description='Brush Color:',\n", " disabled=False,\n", ")\n", "\n", "# Update color callback\n", "def update_color(trace, points, state):\n", " # Compute new color array\n", " new_color = np.array(fig.data[0].marker.color)\n", " new_color[points.point_inds] = color_toggle.index\n", " \n", " with fig.batch_update(): \n", " # Update scatter color\n", " fig.data[0].marker.color = new_color\n", "\n", " # Update parcats colors\n", " fig.data[1].line.color = new_color\n", " \n", "# Register callback on scatter selection...\n", "fig.data[0].on_selection(update_color)\n", "# and parcats click\n", "fig.data[1].on_click(update_color)\n", "\n", "# Display figure\n", "widgets.VBox([color_toggle, fig])" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.7" }, "widgets": { "application/vnd.jupyter.widget-state+json": { "state": { "045d2397337c4ad5b3cfa5cbc968b27b": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "ToggleButtonsModel", "state": { "_options_labels": [ "None", "Red", "Blue" ], "button_style": "", "description": "Brush Color:", "icons": [], "index": 1, "layout": "IPY_MODEL_7ac80b575c424b96b9444a1953e70891", "style": "IPY_MODEL_dc46f5ec9aa14941ba63ef7f2fd17301", "tooltips": [] } }, "196dbfd830e84bd79e2fabc7db691eaf": { "buffers": [ { "data": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", "encoding": "base64", "path": [ "_data", 0, "marker", "color", "value" ] }, { "data": "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", "encoding": "base64", "path": [ "_data", 0, "x", "value" ] }, { "data": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", "encoding": "base64", "path": [ "_data", 1, "line", "color", "value" ] } ], "model_module": "plotlywidget", "model_module_version": "^0.5.0-rc.1", "model_name": "FigureModel", "state": { "_data": [ { "marker": { "cmax": 2.5, "cmin": -0.5, "color": { "dtype": "uint8", "shape": [ 205 ] }, "colorbar": { "ticktext": [ "None", "Red", "Blue" ], "tickvals": [ 0, 1, 2 ] }, "colorscale": [ [ 0, "gray" ], [ 0.33, "gray" ], [ 0.33, "firebrick" ], [ 0.66, "firebrick" ], [ 0.66, "blue" ], [ 1, "blue" ] ], "showscale": true }, "mode": "markers", "type": "scatter", "uid": "0ee8208c-352e-4875-92e5-021756823b89", "x": { "dtype": "float64", "shape": [ 205 ] }, "y": [ 27, 27, 26, 30, 22, 25, 25, 25, 20, 22, 29, 29, 28, 28, 25, 22, 22, 20, 53, 43, 43, 41, 38, 30, 38, 38, 38, 30, 30, 24, 54, 38, 42, 34, 34, 34, 34, 33, 33, 33, 33, 28, 31, 29, 43, 43, 29, 19, 19, 17, 31, 38, 38, 38, 38, 23, 23, 23, 23, 32, 32, 32, 32, 42, 32, 27, 39, 25, 25, 25, 25, 18, 18, 16, 16, 24, 41, 38, 38, 30, 30, 32, 24, 24, 24, 32, 32, 30, 30, 37, 50, 37, 37, 37, 37, 37, 37, 37, 37, 34, 34, 22, 22, 25, 25, 23, 25, 24, 33, 24, 25, 24, 33, 24, 25, 24, 33, 24, 41, 30, 38, 38, 38, 30, 24, 27, 25, 25, 25, 28, 31, 31, 28, 28, 28, 28, 26, 26, 36, 31, 31, 37, 33, 32, 25, 29, 32, 31, 29, 23, 39, 38, 38, 37, 32, 32, 37, 37, 36, 47, 47, 34, 34, 34, 34, 29, 29, 30, 30, 30, 30, 30, 30, 34, 33, 32, 32, 32, 24, 24, 24, 24, 46, 34, 46, 34, 34, 42, 32, 29, 29, 24, 38, 31, 28, 28, 28, 28, 22, 22, 28, 25, 23, 27, 25 ] }, { "dimensions": [ { "label": "body-style", "values": [ "convertible", "convertible", "hatchback", "sedan", "sedan", "sedan", "sedan", "wagon", "sedan", "hatchback", "sedan", "sedan", "sedan", "sedan", "sedan", "sedan", "sedan", "sedan", "hatchback", "hatchback", "sedan", "hatchback", "hatchback", "hatchback", "hatchback", "sedan", "sedan", "sedan", "wagon", "hatchback", "hatchback", "hatchback", "hatchback", "hatchback", "hatchback", "sedan", "wagon", "hatchback", "hatchback", "sedan", "sedan", "sedan", "sedan", "sedan", "sedan", "sedan", "hatchback", "sedan", "sedan", "sedan", "hatchback", "hatchback", "hatchback", "sedan", "sedan", "hatchback", "hatchback", "hatchback", "hatchback", "hatchback", "sedan", "hatchback", "sedan", "sedan", "hatchback", "sedan", "sedan", "sedan", "wagon", "hardtop", "sedan", "sedan", "convertible", "sedan", "hardtop", "hatchback", "hatchback", "hatchback", "hatchback", "hatchback", "hatchback", "hatchback", "hatchback", "hatchback", "hatchback", "sedan", "sedan", "sedan", "sedan", "sedan", "sedan", "sedan", "sedan", "wagon", "sedan", "hatchback", "sedan", "wagon", "hardtop", "hatchback", "sedan", "sedan", "wagon", "sedan", "hatchback", "hatchback", "hatchback", "sedan", "sedan", "wagon", "wagon", "sedan", "sedan", "wagon", "wagon", "sedan", "sedan", "sedan", "hatchback", "hatchback", "hatchback", "sedan", "sedan", "wagon", "hatchback", "hatchback", "hardtop", "hardtop", "convertible", "hatchback", "wagon", "hatchback", "hatchback", "sedan", "hatchback", "sedan", "hatchback", "sedan", "hatchback", "hatchback", "hatchback", "sedan", "sedan", "sedan", "sedan", "sedan", "wagon", "wagon", "wagon", "wagon", "hatchback", "hatchback", "hatchback", "wagon", "wagon", "wagon", "sedan", "hatchback", "sedan", "hatchback", "sedan", "hatchback", "sedan", "sedan", "hatchback", "sedan", "hatchback", "hardtop", "hardtop", "hatchback", "hardtop", "hatchback", "convertible", "sedan", "sedan", "hatchback", "sedan", "hatchback", "hatchback", "hatchback", "sedan", "wagon", "sedan", "sedan", "sedan", "sedan", "sedan", "sedan", "sedan", "convertible", "hatchback", "sedan", "sedan", "wagon", "sedan", "wagon", "sedan", "wagon", "sedan", "wagon", "sedan", "sedan", "sedan", "sedan", "sedan" ] }, { "label": "drive-wheels", "values": [ "rwd", "rwd", "rwd", "fwd", "4wd", "fwd", "fwd", "fwd", "fwd", "4wd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "rwd", "fwd", "fwd", "rwd", "rwd", "rwd", "rwd", "fwd", "fwd", "fwd", "fwd", "fwd", "rwd", "rwd", "rwd", "rwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "4wd", "fwd", "fwd", "fwd", "4wd", "4wd", "fwd", "fwd", "4wd", "4wd", "fwd", "fwd", "fwd", "fwd", "4wd", "4wd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "fwd", "fwd", "fwd", "fwd", "fwd", "rwd", "rwd", "rwd", "rwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd" ] }, { "label": "fuel-type", "values": [ "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "diesel", "gas", "gas", "diesel", "diesel", "diesel", "diesel", "diesel", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "diesel", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "diesel", "gas", "diesel", "gas", "diesel", "gas", "diesel", "gas", "diesel", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "diesel", "diesel", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "diesel", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "diesel", "gas", "diesel", "gas", "gas", "diesel", "gas", "gas", "gas", "gas", "diesel", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "diesel", "gas" ] } ], "domain": { "y": [ 0, 0.4 ] }, "line": { "cmax": 2.5, "cmin": -0.5, "color": { "dtype": "uint8", "shape": [ 205 ] }, "colorscale": [ [ 0, "gray" ], [ 0.33, "gray" ], [ 0.33, "firebrick" ], [ 0.66, "firebrick" ], [ 0.66, "blue" ], [ 1, "blue" ] ], "shape": "hspline" }, "type": "parcats", "uid": "2dad125a-33d1-422f-a20d-19cdd6fdc9ba" } ], "_js2py_pointsCallback": {}, "_js2py_relayout": {}, "_js2py_restyle": {}, "_js2py_update": {}, "_layout": { "dragmode": "lasso", "font": { "size": 16 }, "height": 800, "hovermode": "closest", "template": {}, "width": 800, "xaxis": { "title": "Horsepower" }, "yaxis": { "domain": [ 0.6, 1 ], "title": "MPG" } }, "_py2js_addTraces": {}, "_py2js_animate": {}, "_py2js_deleteTraces": {}, "_py2js_moveTraces": {}, "_py2js_removeLayoutProps": {}, "_py2js_removeTraceProps": {}, "_py2js_restyle": {}, "_py2js_update": {}, "_view_count": 1 } }, "289c067216404b5a8cc75a327707af16": { "model_module": "plotlywidget", "model_module_version": "^0.5.0-rc.1", "model_name": "FigureModel", "state": { "_data": [ { "dimensions": [ { "label": "Hair", "values": [ "Black", "Black", "Black", "Brown", "Brown", "Brown", "Red", "Brown" ] }, { "label": "Eye", "values": [ "Brown", "Brown", "Brown", "Brown", "Brown", "Blue", "Blue", "Blue" ] }, { "label": "Sex", "values": [ "Female", "Female", "Female", "Male", "Female", "Male", "Male", "Male" ] } ], "type": "parcats", "uid": "c382286d-bd91-4e50-8772-163b59347cdf" } ], "_js2py_pointsCallback": {}, "_js2py_relayout": {}, "_js2py_restyle": {}, "_js2py_update": {}, "_layout": { "template": {}, "width": 800 }, "_py2js_addTraces": {}, "_py2js_animate": {}, "_py2js_deleteTraces": {}, "_py2js_moveTraces": {}, "_py2js_removeLayoutProps": {}, "_py2js_removeTraceProps": {}, "_py2js_restyle": {}, "_py2js_update": {}, "_view_count": 1 } }, "36a9a4990d8e4c659687d9ef9a0330a5": { "model_module": "plotlywidget", "model_module_version": "^0.5.0-rc.1", "model_name": "FigureModel", "state": { "_data": [ { "arrangement": "freeform", "dimensions": [ { "categoryorder": "category ascending", "label": "Class", "values": [ 3, 1, 3, 1, 3, 3, 1, 3, 3, 2, 3, 1, 3, 3, 3, 2, 3, 2, 3, 3, 2, 2, 3, 1, 3, 3, 3, 1, 3, 3, 1, 1, 3, 2, 1, 1, 3, 3, 3, 3, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 1, 2, 1, 1, 2, 3, 2, 3, 3, 1, 1, 3, 1, 3, 2, 3, 3, 3, 2, 3, 2, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 1, 2, 3, 3, 3, 1, 3, 3, 3, 1, 3, 3, 3, 1, 1, 2, 2, 3, 3, 1, 3, 3, 3, 3, 3, 3, 3, 1, 3, 3, 3, 3, 3, 3, 2, 1, 3, 2, 3, 2, 2, 1, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 1, 1, 3, 1, 3, 3, 3, 3, 2, 2, 3, 3, 2, 2, 2, 1, 3, 3, 3, 1 ] }, { "label": "Gender", "values": [ "male", "female", "female", "female", "male", "male", "male", "male", "female", "female", "female", "female", "male", "male", "female", "female", "male", "male", "female", "female", "male", "male", "female", "male", "female", "female", "male", "male", "female", "male", "male", "female", "female", "male", "male", "male", "male", "male", "female", "female", "female", "female", "male", "female", "female", "male", "male", "female", "male", "female", "male", "male", "female", "female", "male", "male", "female", "male", "female", "male", "male", "female", "male", "male", "male", "male", "female", "male", "female", "male", "male", "female", "male", "male", "male", "male", "male", "male", "male", "female", "male", "male", "female", "male", "female", "female", "male", "male", "female", "male", "male", "male", "male", "male", "male", "male", "male", "male", "female", "male", "female", "male", "male", "male", "male", "male", "female", "male", "male", "female", "male", "female", "male", "female", "female", "male", "male", "male", "male", "female", "male", "male", "male", "female", "male", "male", "male", "male", "female", "male", "male", "male", "female", "female", "male", "male", "female", "male", "male", "male", "female", "female", "female", "male", "male", "male", "male", "female", "male", "male", "male", "female", "male", "male", "male", "male" ] }, { "categoryarray": [ 0, 1 ], "label": "Outcome", "ticktext": [ "perished", "survived" ], "values": [ 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0 ] } ], "hoverinfo": "count+probability", "hoveron": "color", "line": { "color": [ 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0 ], "colorscale": [ [ 0, "lightsteelblue" ], [ 1, "mediumseagreen" ] ] }, "type": "parcats", "uid": "26df42a7-1bb3-4435-b517-3abbbd49844c" } ], "_js2py_pointsCallback": {}, "_js2py_relayout": {}, "_js2py_restyle": {}, "_js2py_update": {}, "_layout": { "font": { "family": "Serif", "size": 18 }, "template": {}, "title": "Titanic Survival", "width": 800 }, "_py2js_addTraces": {}, "_py2js_animate": {}, "_py2js_deleteTraces": {}, "_py2js_moveTraces": {}, "_py2js_removeLayoutProps": {}, "_py2js_removeTraceProps": {}, "_py2js_restyle": {}, "_py2js_update": {}, "_view_count": 1 } }, "6ba931d1e8e1415cbffe326c888f4c4b": { "model_module": "plotlywidget", "model_module_version": "^0.5.0-rc.1", "model_name": "FigureModel", "state": { "_data": [ { "counts": [ 6, 10, 40, 23, 7 ], "dimensions": [ { "label": "Hair", "values": [ "Black", "Brown", "Brown", "Brown", "Red" ] }, { "label": "Eye", "values": [ "Brown", "Brown", "Brown", "Blue", "Blue" ] }, { "label": "Sex", "values": [ "Female", "Male", "Female", "Male", "Male" ] } ], "type": "parcats", "uid": "b331a3a8-ff37-4e5e-8238-d1676de15481" } ], "_js2py_pointsCallback": {}, "_js2py_relayout": {}, "_js2py_restyle": {}, "_js2py_update": {}, "_layout": { "template": {}, "width": 800 }, "_py2js_addTraces": {}, "_py2js_animate": {}, "_py2js_deleteTraces": {}, "_py2js_moveTraces": {}, "_py2js_removeLayoutProps": {}, "_py2js_removeTraceProps": {}, "_py2js_restyle": {}, "_py2js_update": {}, "_view_count": 1 } }, "6c7314c859614f5d81efe26e10dffd02": { "buffers": [ { "data": "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", "encoding": "base64", "path": [ "_data", 0, "x", "value" ] }, { "data": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", "encoding": "base64", "path": [ "_data", 1, "line", "color", "value" ] } ], "model_module": "plotlywidget", "model_module_version": "^0.5.0-rc.1", "model_name": "FigureModel", "state": { "_data": [ { "marker": { "color": "gray" }, "mode": "markers", "selected": { "marker": { "color": "firebrick" } }, "type": "scatter", "uid": "f45f5df7-6dc7-40fe-86e5-785f5effa3a1", "unselected": { "marker": { "opacity": 0.3 } }, "x": { "dtype": "float64", "shape": [ 205 ] }, "y": [ 27, 27, 26, 30, 22, 25, 25, 25, 20, 22, 29, 29, 28, 28, 25, 22, 22, 20, 53, 43, 43, 41, 38, 30, 38, 38, 38, 30, 30, 24, 54, 38, 42, 34, 34, 34, 34, 33, 33, 33, 33, 28, 31, 29, 43, 43, 29, 19, 19, 17, 31, 38, 38, 38, 38, 23, 23, 23, 23, 32, 32, 32, 32, 42, 32, 27, 39, 25, 25, 25, 25, 18, 18, 16, 16, 24, 41, 38, 38, 30, 30, 32, 24, 24, 24, 32, 32, 30, 30, 37, 50, 37, 37, 37, 37, 37, 37, 37, 37, 34, 34, 22, 22, 25, 25, 23, 25, 24, 33, 24, 25, 24, 33, 24, 25, 24, 33, 24, 41, 30, 38, 38, 38, 30, 24, 27, 25, 25, 25, 28, 31, 31, 28, 28, 28, 28, 26, 26, 36, 31, 31, 37, 33, 32, 25, 29, 32, 31, 29, 23, 39, 38, 38, 37, 32, 32, 37, 37, 36, 47, 47, 34, 34, 34, 34, 29, 29, 30, 30, 30, 30, 30, 30, 34, 33, 32, 32, 32, 24, 24, 24, 24, 46, 34, 46, 34, 34, 42, 32, 29, 29, 24, 38, 31, 28, 28, 28, 28, 22, 22, 28, 25, 23, 27, 25 ] }, { "dimensions": [ { "label": "body-style", "values": [ "convertible", "convertible", "hatchback", "sedan", "sedan", "sedan", "sedan", "wagon", "sedan", "hatchback", "sedan", "sedan", "sedan", "sedan", "sedan", "sedan", "sedan", "sedan", "hatchback", "hatchback", "sedan", "hatchback", "hatchback", "hatchback", "hatchback", "sedan", "sedan", "sedan", "wagon", "hatchback", "hatchback", "hatchback", "hatchback", "hatchback", "hatchback", "sedan", "wagon", "hatchback", "hatchback", "sedan", "sedan", "sedan", "sedan", "sedan", "sedan", "sedan", "hatchback", "sedan", "sedan", "sedan", "hatchback", "hatchback", "hatchback", "sedan", "sedan", "hatchback", "hatchback", "hatchback", "hatchback", "hatchback", "sedan", "hatchback", "sedan", "sedan", "hatchback", "sedan", "sedan", "sedan", "wagon", "hardtop", "sedan", "sedan", "convertible", "sedan", "hardtop", "hatchback", "hatchback", "hatchback", "hatchback", "hatchback", "hatchback", "hatchback", "hatchback", "hatchback", "hatchback", "sedan", "sedan", "sedan", "sedan", "sedan", "sedan", "sedan", "sedan", "wagon", "sedan", "hatchback", "sedan", "wagon", "hardtop", "hatchback", "sedan", "sedan", "wagon", "sedan", "hatchback", "hatchback", "hatchback", "sedan", "sedan", "wagon", "wagon", "sedan", "sedan", "wagon", "wagon", "sedan", "sedan", "sedan", "hatchback", "hatchback", "hatchback", "sedan", "sedan", "wagon", "hatchback", "hatchback", "hardtop", "hardtop", "convertible", "hatchback", "wagon", "hatchback", "hatchback", "sedan", "hatchback", "sedan", "hatchback", "sedan", "hatchback", "hatchback", "hatchback", "sedan", "sedan", "sedan", "sedan", "sedan", "wagon", "wagon", "wagon", "wagon", "hatchback", "hatchback", "hatchback", "wagon", "wagon", "wagon", "sedan", "hatchback", "sedan", "hatchback", "sedan", "hatchback", "sedan", "sedan", "hatchback", "sedan", "hatchback", "hardtop", "hardtop", "hatchback", "hardtop", "hatchback", "convertible", "sedan", "sedan", "hatchback", "sedan", "hatchback", "hatchback", "hatchback", "sedan", "wagon", "sedan", "sedan", "sedan", "sedan", "sedan", "sedan", "sedan", "convertible", "hatchback", "sedan", "sedan", "wagon", "sedan", "wagon", "sedan", "wagon", "sedan", "wagon", "sedan", "sedan", "sedan", "sedan", "sedan" ] }, { "label": "drive-wheels", "values": [ "rwd", "rwd", "rwd", "fwd", "4wd", "fwd", "fwd", "fwd", "fwd", "4wd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "rwd", "fwd", "fwd", "rwd", "rwd", "rwd", "rwd", "fwd", "fwd", "fwd", "fwd", "fwd", "rwd", "rwd", "rwd", "rwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "4wd", "fwd", "fwd", "fwd", "4wd", "4wd", "fwd", "fwd", "4wd", "4wd", "fwd", "fwd", "fwd", "fwd", "4wd", "4wd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "fwd", "fwd", "fwd", "fwd", "fwd", "rwd", "rwd", "rwd", "rwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "fwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd", "rwd" ] }, { "label": "fuel-type", "values": [ "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "diesel", "gas", "gas", "diesel", "diesel", "diesel", "diesel", "diesel", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "diesel", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "diesel", "gas", "diesel", "gas", "diesel", "gas", "diesel", "gas", "diesel", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "diesel", "diesel", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "diesel", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "diesel", "gas", "diesel", "gas", "gas", "diesel", "gas", "gas", "gas", "gas", "diesel", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "gas", "diesel", "gas" ] } ], "domain": { "y": [ 0, 0.4 ] }, "line": { "cmax": 1, "cmin": 0, "color": { "dtype": "uint8", "shape": [ 205 ] }, "colorscale": [ [ 0, "gray" ], [ 1, "firebrick" ] ], "shape": "hspline" }, "type": "parcats", "uid": "80b36cb6-a104-4d20-bfd9-f90659f3cb1c" } ], "_js2py_pointsCallback": {}, "_js2py_relayout": {}, "_js2py_restyle": {}, "_js2py_update": {}, "_layout": { "dragmode": "lasso", "font": { "size": 16 }, "height": 800, "hovermode": "closest", "template": {}, "width": 800, "xaxis": { "title": "Horsepower" }, "yaxis": { "domain": [ 0.6, 1 ], "title": "MPG" } }, "_py2js_addTraces": {}, "_py2js_animate": {}, "_py2js_deleteTraces": {}, "_py2js_moveTraces": {}, "_py2js_removeLayoutProps": {}, "_py2js_removeTraceProps": {}, "_py2js_restyle": {}, "_py2js_update": {}, "_view_count": 1 } }, "7ac80b575c424b96b9444a1953e70891": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} }, "a7d8f63baf074164b9e16d58d089a451": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "VBoxModel", "state": { "children": [ "IPY_MODEL_045d2397337c4ad5b3cfa5cbc968b27b", "IPY_MODEL_196dbfd830e84bd79e2fabc7db691eaf" ], "layout": "IPY_MODEL_e042e392ccc942fb96b9aefacd7946d8" } }, "dc46f5ec9aa14941ba63ef7f2fd17301": { "model_module": "@jupyter-widgets/controls", "model_module_version": "1.4.0", "model_name": "ToggleButtonsStyleModel", "state": { "button_width": "", "description_width": "" } }, "e042e392ccc942fb96b9aefacd7946d8": { "model_module": "@jupyter-widgets/base", "model_module_version": "1.1.0", "model_name": "LayoutModel", "state": {} } }, "version_major": 2, "version_minor": 0 } } }, "nbformat": 4, "nbformat_minor": 2 }