Skip to content

Commit

Permalink
docs: Fix wrong variable name (#6442)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahuang11 authored Nov 11, 2024
1 parent 6f43206 commit a38e62e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
7 changes: 3 additions & 4 deletions examples/gallery/demos/bokeh/choropleth_data_link.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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))"
]
Expand Down
3 changes: 1 addition & 2 deletions examples/gallery/demos/bokeh/texas_choropleth_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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'])"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'])"
]
},
{
Expand Down
7 changes: 3 additions & 4 deletions examples/user_guide/Linked_Brushing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -275,16 +275,15 @@
" 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)"
]
},
{
"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`."
]
},
{
Expand All @@ -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'])"
]
},
{
Expand Down

0 comments on commit a38e62e

Please sign in to comment.