Skip to content

Commit

Permalink
Deprecate example notebooks (#1798)
Browse files Browse the repository at this point in the history
  • Loading branch information
Conengmo authored Sep 6, 2023
1 parent fd0267d commit 069a011
Show file tree
Hide file tree
Showing 50 changed files with 302 additions and 22,918 deletions.
67 changes: 10 additions & 57 deletions examples/CheckZorder.ipynb

Large diffs are not rendered by default.

530 changes: 5 additions & 525 deletions examples/Choropleth with Jenks natural breaks optimization.ipynb

Large diffs are not rendered by default.

503 changes: 7 additions & 496 deletions examples/ClickEvents.ipynb

Large diffs are not rendered by default.

1,112 changes: 5 additions & 1,107 deletions examples/Colormaps.ipynb

Large diffs are not rendered by default.

113 changes: 5 additions & 108 deletions examples/ContinuousWorld.ipynb

Large diffs are not rendered by default.

41 changes: 7 additions & 34 deletions examples/ControlScale.ipynb
Original file line number Diff line number Diff line change
@@ -1,41 +1,14 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data-html=PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgCiAgICAgICAgPHNjcmlwdD4KICAgICAgICAgICAgTF9OT19UT1VDSCA9IGZhbHNlOwogICAgICAgICAgICBMX0RJU0FCTEVfM0QgPSBmYWxzZTsKICAgICAgICA8L3NjcmlwdD4KICAgIAogICAgPHN0eWxlPmh0bWwsIGJvZHkge3dpZHRoOiAxMDAlO2hlaWdodDogMTAwJTttYXJnaW46IDA7cGFkZGluZzogMDt9PC9zdHlsZT4KICAgIDxzdHlsZT4jbWFwIHtwb3NpdGlvbjphY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M4ZjU0YzQ1MTliZGMwZGY0MTQzOTIyNWY4IiA+PC9kaXY+CiAgICAgICAgCjwvYm9keT4KPHNjcmlwdD4gICAgCiAgICAKICAgICAgICAgICAgdmFyIG1hcF9kMjVkYzczOGY1NGM0NTE5YmRjMGRmNDE0MzkyMjVmOCA9IEwubWFwKAogICAgICAgICAgICAgICAgIm1hcF9kMjVkYzczOGY1NGM0NTE5YmRjMGRmNDE0MzkyMjVmOCIsCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgY2VudGVyOiBbLTEyLjg3NSwgLTM4LjYyNV0sCiAgICAgICAgICAgICAgICAgICAgY3JzOiBMLkNSUy5FUFNHMzg1NywKICAgICAgICAgICAgICAgICAgICB6b29tOiA4LAogICAgICAgICAgICAgICAgICAgIHpvb21Db250cm9sOiB0cnVlLAogICAgICAgICAgICAgICAgICAgIHByZWZlckNhbnZhczogZmFsc2UsCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICk7CiAgICAgICAgICAgIEwuY29udHJvbC5zY2FsZSgpLmFkZFRvKG1hcF9kMjVkYzczOGY1NGM0NTE5YmRjMGRmNDE0MzkyMjVmOCk7CgogICAgICAgICAgICAKCiAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIHRpbGVfbGF5ZXJfYjAyYzJlYmQ2MGU3NDI5NWE0NTY5MzQ2NzI4MmFjMWUgPSBMLnRpbGVMYXllcigKICAgICAgICAgICAgICAgICJodHRwczovL3tzfS50aWxlLm9wZW5zdHJlZXRtYXAub3JnL3t6fS97eH0ve3l9LnBuZyIsCiAgICAgICAgICAgICAgICB7ImF0dHJpYnV0aW9uIjogIkRhdGEgYnkgXHUwMDI2Y29weTsgXHUwMDNjYSBocmVmPVwiaHR0cDovL29wZW5zdHJlZXRtYXAub3JnXCJcdTAwM2VPcGVuU3RyZWV0TWFwXHUwMDNjL2FcdTAwM2UsIHVuZGVyIFx1MDAzY2EgaHJlZj1cImh0dHA6Ly93d3cub3BlbnN0cmVldG1hcC5vcmcvY29weXJpZ2h0XCJcdTAwM2VPRGJMXHUwMDNjL2FcdTAwM2UuIiwgImRldGVjdFJldGluYSI6IGZhbHNlLCAibWF4TmF0aXZlWm9vbSI6IDE4LCAibWF4Wm9vbSI6IDE4LCAibWluWm9vbSI6IDAsICJub1dyYXAiOiBmYWxzZSwgIm9wYWNpdHkiOiAxLCAic3ViZG9tYWlucyI6ICJhYmMiLCAidG1zIjogZmFsc2V9CiAgICAgICAgICAgICkuYWRkVG8obWFwX2QyNWRjNzM4ZjU0YzQ1MTliZGMwZGY0MTQzOTIyNWY4KTsKICAgICAgICAKPC9zY3JpcHQ+ onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
],
"text/plain": [
"<folium.folium.Map at 0x7fe7f0847220>"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"cell_type": "markdown",
"source": [
"import folium\n",
"\n",
"\n",
"lon, lat = -38.625, -12.875\n",
"\n",
"zoom_start = 8\n",
"\n",
"m = folium.Map(\n",
" location=[lat, lon],\n",
" tiles=\"OpenStreetMap\",\n",
" zoom_start=zoom_start,\n",
" control_scale=True,\n",
")\n",
"\n",
"m"
]
"We've updated our documentation. You can find the new version of this notebook here:\n",
"https://python-visualization.github.io/folium/latest/user_guide/map.html#Scale"
],
"metadata": {
"collapsed": false
}
}
],
"metadata": {
Expand Down
52 changes: 7 additions & 45 deletions examples/CustomIcon.ipynb
Original file line number Diff line number Diff line change
@@ -1,53 +1,15 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe src=\"about:blank\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" data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BfYjZjNGIyYTYzN2ViNDQzNDkzNjkzNGU2NzAzMDBmZTYgewogICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTsKICAgICAgICAgICAgICAgICAgICB3aWR0aDogMTAwLjAlOwogICAgICAgICAgICAgICAgICAgIGhlaWdodDogMTAwLjAlOwogICAgICAgICAgICAgICAgICAgIGxlZnQ6IDAuMCU7CiAgICAgICAgICAgICAgICAgICAgdG9wOiAwLjAlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICA8L3N0eWxlPgogICAgICAgIAo8L2hlYWQ+Cjxib2R5PiAgICAKICAgIAogICAgICAgICAgICA8ZGl2IGNsYXNzPSJmb2xpdW0tbWFwIiBpZD0ibWFwX2I2YzRiMmE2MzdlYjQ0MzQ5MzY5MzRlNjcwMzAwZmU2IiA+PC9kaXY+CiAgICAgICAgCjwvYm9keT4KPHNjcmlwdD4gICAgCiAgICAKICAgICAgICAgICAgdmFyIG1hcF9iNmM0YjJhNjM3ZWI0NDM0OTM2OTM0ZTY3MDMwMGZlNiA9IEwubWFwKAogICAgICAgICAgICAgICAgIm1hcF9iNmM0YjJhNjM3ZWI0NDM0OTM2OTM0ZTY3MDMwMGZlNiIsCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgY2VudGVyOiBbNDUuMzcyLCAtMTIxLjY5NzJdLAogICAgICAgICAgICAgICAgICAgIGNyczogTC5DUlMuRVBTRzM4NTcsCiAgICAgICAgICAgICAgICAgICAgem9vbTogMTIsCiAgICAgICAgICAgICAgICAgICAgem9vbUNvbnRyb2w6IHRydWUsCiAgICAgICAgICAgICAgICAgICAgcHJlZmVyQ2FudmFzOiBmYWxzZSwKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgKTsKCiAgICAgICAgICAgIAoKICAgICAgICAKICAgIAogICAgICAgICAgICB2YXIgdGlsZV9sYXllcl80YzMxMWNiNmU4MGI0OWU3OGQ3MjdiY2ZlMDI2ZDViYiA9IEwud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BdOwogICAgICAgICAgICBwb3B1cF9lYzEwNDg3Y2E4Y2M0ODk1OWMwMjNhMTBhZmYxN2I4Mi5zZXRDb250ZW50KGh0bWxfNmUwZjJlMTE2ODkyNDIwYWI5ZmUwNDk0YmQ1ODZjNTgpOwogICAgICAgIAoKICAgICAgICBtYXJrZXJfOTJjMzVlNTBhZmUwNDAxNDlhZTdmNGE2NDE4MGNhMWYuYmluZFBvcHVwKHBvcHVwX2VjMTA0ODdjYThjYzQ4OTU5YzAyM2ExMGFmZjE3YjgyKQogICAgICAgIDsKCiAgICAgICAgCiAgICAKPC9zY3JpcHQ+ onload=\"this.contentDocument.open();this.contentDocument.write(atob(this.getAttribute('data-html')));this.contentDocument.close();\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
],
"text/plain": [
"<folium.folium.Map at 0x7fcfb8451460>"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
"cell_type": "markdown",
"metadata": {
"pycharm": {
"name": "#%% md\n"
}
],
},
"source": [
"import folium\n",
"from folium.features import CustomIcon\n",
"\n",
"\n",
"m = folium.Map(location=[45.372, -121.6972], zoom_start=12, tiles=\"Stamen Terrain\")\n",
"\n",
"url = \"http://leafletjs.com/examples/custom-icons/{}\".format\n",
"icon_image = url(\"leaf-red.png\")\n",
"shadow_image = url(\"leaf-shadow.png\")\n",
"\n",
"icon = CustomIcon(\n",
" icon_image,\n",
" icon_size=(38, 95),\n",
" icon_anchor=(22, 94),\n",
" shadow_image=shadow_image,\n",
" shadow_size=(50, 64),\n",
" shadow_anchor=(4, 62),\n",
" popup_anchor=(-3, -76),\n",
")\n",
"\n",
"marker = folium.Marker(\n",
" location=[45.3288, -121.6625], icon=icon, popup=\"Mt. Hood Meadows\"\n",
")\n",
"\n",
"\n",
"m.add_child(marker)\n",
"\n",
"m"
"We've updated our documentation. You can find the new version of this notebook here:\n",
"https://python-visualization.github.io/folium/latest/user_guide/ui_elements/icons.html#Custom-icon"
]
}
],
Expand Down
170 changes: 4 additions & 166 deletions examples/CustomPanes.ipynb

Large diffs are not rendered by default.

Loading

0 comments on commit 069a011

Please sign in to comment.