Skip to content

Commit c77ec31

Browse files
committed
#194 fixed Bokeh errors in 07-visualization.ipynb
1 parent 10968de commit c77ec31

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

workshop/jupyter/content/notebooks/07-visualization.ipynb

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,6 @@
632632
"outputs": [],
633633
"source": [
634634
"from bokeh.plotting import figure\n",
635-
"from bokeh.tile_providers import get_provider, Vendors\n",
636635
"from bokeh.io import output_notebook, show\n",
637636
"output_notebook()"
638637
]
@@ -658,12 +657,10 @@
658657
"# When using in standard Python env\n",
659658
"# output_file(\"tile.html\")\n",
660659
"\n",
661-
"tile_provider = get_provider(Vendors.CARTODBPOSITRON)\n",
662-
"\n",
663660
"# range bounds supplied in web mercator coordinates\n",
664661
"p = figure(tools='pan, wheel_zoom', x_range=(-10000000, -3000000), y_range=(-6000000, 0),\n",
665662
" x_axis_type='mercator', y_axis_type='mercator')\n",
666-
"p.add_tile(tile_provider)\n",
663+
"p.add_tile(\"CartoDB Positron\", retina=True)\n",
667664
"\n",
668665
"show(p)"
669666
]
@@ -785,7 +782,7 @@
785782
"outputs": [],
786783
"source": [
787784
"# p = figure(title=\"A map of populated places from a GeoPackage\")\n",
788-
"p.circle('x', 'y', source=psource, color='lightblue',size=15, alpha=0.7)\n",
785+
"p.scatter('x', 'y', source=psource, color='lightblue',size=15, alpha=0.7)\n",
789786
"show(p)"
790787
]
791788
},
@@ -831,7 +828,6 @@
831828
"source": [
832829
"from bokeh.models import GeoJSONDataSource\n",
833830
"from bokeh.plotting import figure\n",
834-
"from bokeh.tile_providers import get_provider, Vendors\n",
835831
"from bokeh.io import output_notebook, show\n",
836832
"output_notebook()\n",
837833
"\n",
@@ -882,10 +878,10 @@
882878
"p = figure(tools='pan, wheel_zoom', x_axis_type='mercator', y_axis_type='mercator', width=800, height=500)\n",
883879
"\n",
884880
"# add background tiles layer from CARTO\n",
885-
"p.add_tile(get_provider(Vendors.CARTODBPOSITRON))\n",
881+
"p.add_tile(\"CartoDB Positron\", retina=True)\n",
886882
"\n",
887883
"# add populated places point overlay\n",
888-
"p.circle(x='x', y='y', size=10, alpha=0.7, source=geo_source, color='lightblue', legend_label='Populated Places')\n",
884+
"p.scatter(x='x', y='y', size=10, alpha=0.7, source=geo_source, color='lightblue', legend_label='Populated Places')\n",
889885
"\n",
890886
"show(p)"
891887
]
@@ -908,7 +904,7 @@
908904
},
909905
{
910906
"cell_type": "code",
911-
"execution_count": 0,
907+
"execution_count": null,
912908
"metadata": {
913909
"scrolled": true
914910
},
@@ -979,7 +975,7 @@
979975
"name": "python",
980976
"nbconvert_exporter": "python",
981977
"pygments_lexer": "ipython3",
982-
"version": "3.10.12"
978+
"version": "3.12.3"
983979
}
984980
},
985981
"nbformat": 4,

0 commit comments

Comments
 (0)