From a38e62ef23187826bbc5a8dcb826fd60ea491031 Mon Sep 17 00:00:00 2001 From: Andrew <15331990+ahuang11@users.noreply.github.com> Date: Sun, 10 Nov 2024 23:22:41 -0800 Subject: [PATCH] docs: Fix wrong variable name (#6442) --- examples/gallery/demos/bokeh/choropleth_data_link.ipynb | 7 +++---- .../gallery/demos/bokeh/texas_choropleth_example.ipynb | 3 +-- .../demos/matplotlib/texas_choropleth_example.ipynb | 3 +-- examples/user_guide/Linked_Brushing.ipynb | 7 +++---- 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/examples/gallery/demos/bokeh/choropleth_data_link.ipynb b/examples/gallery/demos/bokeh/choropleth_data_link.ipynb index bb1f6a5764..84631bef88 100644 --- a/examples/gallery/demos/bokeh/choropleth_data_link.ipynb +++ b/examples/gallery/demos/bokeh/choropleth_data_link.ipynb @@ -42,11 +42,10 @@ " if county[\"state\"] == \"tx\"]\n", "\n", "\n", - "detailed_name = 'detailed_name' if counties[0].get('detailed_name') else 'detailed name' # detailed name was changed in Bokeh 3.0\n", - "county_data = [(county[detailed_name], county['Unemployment']) for county in counties]\n", + "county_data = [(county['detailed_name'], county['Unemployment']) for county in counties]\n", "\n", - "choropleth = hv.Polygons(counties, ['lons', 'lats'], [(detailed_name, 'County'), 'Unemployment'], label='Texas Unemployment')\n", - "table = hv.Table(county_data, [(detailed_name, 'County'), 'Unemployment'])\n", + "choropleth = hv.Polygons(counties, ['lons', 'lats'], [('detailed_name', 'County'), 'Unemployment'], label='Texas Unemployment')\n", + "table = hv.Table(county_data, [('detailed_name', 'County'), 'Unemployment'])\n", "\n", "print(len(choropleth.data), len(table))" ] diff --git a/examples/gallery/demos/bokeh/texas_choropleth_example.ipynb b/examples/gallery/demos/bokeh/texas_choropleth_example.ipynb index 9fdaefe668..82bb23b00e 100644 --- a/examples/gallery/demos/bokeh/texas_choropleth_example.ipynb +++ b/examples/gallery/demos/bokeh/texas_choropleth_example.ipynb @@ -42,8 +42,7 @@ " for cid, county in counties.items()\n", " if county[\"state\"] == \"tx\"]\n", "\n", - "detailed_name = 'detailed_name' if counties[0].get('detailed_name') else 'detailed name' # detailed name was changed in Bokeh 3.0\n", - "choropleth = hv.Polygons(counties, ['lons', 'lats'], [(detailed_name, 'County'), 'Unemployment'])" + "choropleth = hv.Polygons(counties, ['lons', 'lats'], [('detailed_name', 'County'), 'Unemployment'])" ] }, { diff --git a/examples/gallery/demos/matplotlib/texas_choropleth_example.ipynb b/examples/gallery/demos/matplotlib/texas_choropleth_example.ipynb index 69db3b5bb5..3c52d003bd 100644 --- a/examples/gallery/demos/matplotlib/texas_choropleth_example.ipynb +++ b/examples/gallery/demos/matplotlib/texas_choropleth_example.ipynb @@ -44,8 +44,7 @@ " if county[\"state\"] == \"tx\"]\n", "\n", "\n", - "detailed_name = 'detailed_name' if counties[0].get('detailed_name') else 'detailed name' # detailed name was changed in Bokeh 3.0\n", - "choropleth = hv.Polygons(counties, ['lons', 'lats'], [(detailed_name, 'County'), 'Unemployment'])" + "choropleth = hv.Polygons(counties, ['lons', 'lats'], [('detailed_name', 'County'), 'Unemployment'])" ] }, { diff --git a/examples/user_guide/Linked_Brushing.ipynb b/examples/user_guide/Linked_Brushing.ipynb index beb7ea3f39..6e15bd5d7f 100644 --- a/examples/user_guide/Linked_Brushing.ipynb +++ b/examples/user_guide/Linked_Brushing.ipynb @@ -275,8 +275,7 @@ " for cid, county in counties.items()\n", " if county[\"state\"] == \"tx\"]\n", "\n", - "detailed_name = 'detailed_name' if counties[0].get('detailed_name') else 'detailed name' # detailed name was changed in Bokeh 3.0\n", - "choropleth = hv.Polygons(counties, ['lons', 'lats'], [(detailed_name, 'County'), 'Unemployment'])\n", + "choropleth = hv.Polygons(counties, ['lons', 'lats'], [('detailed_name', 'County'), 'Unemployment'])\n", "hist = choropleth.hist('Unemployment', adjoin=False, normed=False)" ] }, @@ -284,7 +283,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "To link the two we will specify the `'detailed name'` column as the `index_cols`." + "To link the two we will specify the `detailed_name` column as the `index_cols`." ] }, { @@ -293,7 +292,7 @@ "metadata": {}, "outputs": [], "source": [ - "linked_choropleth = link_selections(choropleth + hist, index_cols=['detailed name'])" + "linked_choropleth = link_selections(choropleth + hist, index_cols=['detailed_name'])" ] }, {