Skip to content

Commit

Permalink
batch 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Conengmo committed Sep 6, 2023
1 parent f601232 commit f9da3cc
Show file tree
Hide file tree
Showing 31 changed files with 183 additions and 15,279 deletions.
2 changes: 1 addition & 1 deletion examples/CheckZorder.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"cell_type": "markdown",
"source": [
"We've updated our documentation and removed this notebook.\n",
"We've updated our documentation and removed this notebook.\n",
"You can find the current documentation at https://python-visualization.github.io/folium/latest/."
],
"metadata": {
Expand Down
156 changes: 5 additions & 151 deletions examples/Highlight_Function.ipynb

Large diffs are not rendered by default.

293 changes: 6 additions & 287 deletions examples/ImageOverlay.ipynb

Large diffs are not rendered by default.

331 changes: 6 additions & 325 deletions examples/MarkerCluster.ipynb

Large diffs are not rendered by default.

68 changes: 7 additions & 61 deletions examples/MinMaxLimits.ipynb
Original file line number Diff line number Diff line change
@@ -1,68 +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+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgCiAgICAgICAgPHNjcmlwdD4KICAgICAgICAgICAgTF9OT19UT1VDSCA9IGZhbHNlOwogICAgICAgICAgICBMX0RJU0FCTEVfM0QgPSBmYWxzZTsKICAgICAgICA8L3NjcmlwdD4KICAgIAogICAgPHN0eWxlPmh0bWwsIGJvZHkge3dpZHRoOiAxMDAlO2hlaWdodDogMTAwJTttYXJnaW46IDA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ICAgICAgICA8ZGl2IGNsYXNzPSJmb2xpdW0tbWFwIiBpZD0ibWFwX2U3MzIyZDY3MjAyYzRiNTY5NGJhODYzZTNkMjNlZGM5IiA+PC9kaXY+CiAgICAgICAgCjwvYm9keT4KPHNjcmlwdD4gICAgCiAgICAKICAgICAgICAgICAgdmFyIG1hcF9lNzMyMmQ2NzIwMmM0YjU2OTRiYTg2M2UzZDIzZWRjOSA9IEwubWFwKAogICAgICAgICAgICAgICAgIm1hcF9lNzMyMmQ2NzIwMmM0YjU2OTRiYTg2M2UzZDIzZWRjOSIsCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgY2VudGVyOiBbLTIwLjk5MzA1NTU1NTU1NTU1NywgLTQxLjMzODA1NTU1NTU1NTU1Nl0sCiAgICAgICAgICAgICAgICAgICAgY3JzOiBMLkNSUy5FUFNHMzg1NywKICAgICAgICAgICAgICAgICAgICBtYXhCb3VuZHM6IFtbLTI1LCAtNDVdLCBbLTE1LCAtMzVdXSwKICAgICAgICAgICAgICAgICAgICB6b29tOiA2LAogICAgICAgICAgICAgICAgICAgIHpvb21Db250cm9sOiB0cnVlLAogICAgICAgICAgICAgICAgICAgIHByZWZlckNhbnZhczogZmFsc2UsCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICk7CgogICAgICAgICAgICAKCiAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIHRpbGVfbGF5ZXJfMzI4ZTdjMTQ1NTdmNGFjMzg2MjAwMzY1ZmYwZjMwMmEgPSBMLnRpbGVMYXllcigKICAgICAgICAgICAgICAgICJodHRwczovL3tzfS50aWxlLm9wZW5zdHJlZXRtYXAub3JnL3t6fS97eH0ve3l9LnBuZyIsCiAgICAgICAgICAgICAgICB7ImF0dHJpYnV0aW9uIjogIkRhdGEgYnkgXHUwMDI2Y29weTsgXHUwMDNjYSBocmVmPVwiaHR0cDovL29wZW5zdHJlZXRtYXAub3JnXCJcdTAwM2VPcGVuU3RyZWV0TWFwXHU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zM2OWY5ZTM2NzAyMmFhMmUzMS5iaW5kVG9vbHRpcCgKICAgICAgICAgICAgICAgIGA8ZGl2PgogICAgICAgICAgICAgICAgICAgICBVcHBlciBMZWZ0IENvcm5lcgogICAgICAgICAgICAgICAgIDwvZGl2PmAsCiAgICAgICAgICAgICAgICB7InN0aWNreSI6IHRydWV9CiAgICAgICAgICAgICk7CiAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIGNpcmNsZV9tYXJrZXJfOTQxZDgzOGIzM2VlNGU3NDhkMjFmNjNjNDc4NDczMDUgPSBMLmNpcmNsZU1hcmtlcigKICAgICAgICAgICAgICAgIFstMjUuMCwgLTQ1LjBdLAogICAgICAgICAgICAgICAgeyJidWJibGluZ01vdXNlRXZlbnRzIjogdHJ1ZSwgImNvbG9yIjogImJsYWNrIiwgImRhc2hBcnJheSI6IG51bGwsICJkYXNoT2Zmc2V0IjogbnVsbCwgImZpbGwiOiB0cnVlLCAiZmlsbENvbG9yIjogImdyZWVuIiwgImZpbGxPcGFjaXR5IjogMSwgImZpbGxSdWxlIjogImV2ZW5vZGQiLCAibGluZUNhcCI6ICJyb3VuZCIsICJsaW5lSm9pbiI6ICJyb3VuZCIsICJvcGFjaXR5IjogMS4wLCAicmFkaXVzIjogMTAsICJzdHJva2UiOiB0cnVlLCAid2VpZ2h0IjogMX0KICAgICAgICAgICAgKS5hZGRUbyhtYXBfZTczMjJkNjcyMDJjNGI1Njk0YmE4NjNlM2QyM2VkYzkpOwogICAgICAgIAogICAgCiAgICAgICAgICAgIGNpcmNsZV9tYXJrZXJfOTQxZDgzOGIzM2VlNGU3NDhkMjFmNjNjNDc4NDczMDUuYmluZFRvb2x0aXAoCiAgICAgICAgICAgICAgICBgPGRpdj4KICAgICAgICAgICAgICAgICAgICAgTG93ZXIgTGVmdCBDb3JuZXIKICAgICAgICAgICAgICAgICA8L2Rpdj5gLAogICAgICAgICAgICAgICAgeyJzdGlja3kiOiB0cnVlfQogICAgICAgICAgICApOwogICAgICAgIAogICAgCiAgICAgICAgICAgIHZhciBjaXJjbGVfbWFya2VyXzIzNjM4NmFiMmFkYjQxNDBhY2U4OTFmMzNlZDYzMDM2ID0gTC5jaXJjbGVNYXJrZXIoCiAgICAgICAgICAgICAgICBbLTI1LjAsIC0zNS4wXSwKICAgICAgICAgICAgICAgIHsiYnViYmxpbmdNb3VzZUV2ZW50cyI6IHRydWUsICJjb2xvciI6ICJibGFjayIsICJkYXNoQXJyYXkiOiBudWxsLCAiZGFzaE9mZnNldCI6IG51bGwsICJmaWxsIjogdHJ1ZSwgImZpbGxDb2xvciI6ICJncmVlbiIsICJmaWxsT3BhY2l0eSI6IDEsICJmaWxsUnVsZSI6ICJldmVub2RkIiwgImxpbmVDYXAiOiAicm91bmQiLCAibGluZUpvaW4iOiAicm91bmQiLCAib3BhY2l0eSI6IDEuMCwgInJhZGl1cyI6IDEwLCAic3Ryb2tlIjogdHJ1ZSwgIndlaWdodCI6IDF9CiAgICAgICAgICAgICkuYWRkVG8obWFwX2U3MzIyZDY3MjAyYzRiNTY5NGJhODYzZTNkMjNlZGM5KTsKICAgICAgICAKICAgIAogICAgICAgICAgICBjaXJjbGVfbWFya2VyXzIzNjM4NmFiMmFkYjQxNDBhY2U4OTFmMzNlZDYzMDM2LmJpbmRUb29sdGlwKAogICAgICAgICAgICAgICAgYDxkaXY+CiAgICAgICAgICAgICAgICAgICAgIExvd2VyIFJpZ2h0IENvcm5lcgogICAgICAgICAgICAgICAgIDwvZGl2PmAsCiAgICAgICAgICAgICAgICB7InN0aWNreSI6IHRydWV9CiAgICAgICAgICAgICk7CiAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIGNpcmNsZV9tYXJrZXJfNDJlMDJkYzJhODJhNDJkZDk3YTE0Mjc0ODk4MjJiNWMgPSBMLmNpcmNsZU1hcmtlcigKICAgICAgICAgICAgICAgIFstMTUuMCwgLTM1LjBdLAogICAgICAgICAgICAgICAgeyJidWJibGluZ01vdXNlRXZlbnRzIjogdHJ1ZSwgImNvbG9yIjogImJsYWNrIiwgImRhc2hBcnJheSI6IG51bGwsICJkYXNoT2Zmc2V0IjogbnVsbCwgImZpbGwiOiB0cnVlLCAiZmlsbENvbG9yIjogImdyZWVuIiwgImZpbGxPcGFjaXR5IjogMSwgImZpbGxSdWxlIjogImV2ZW5vZGQiLCAibGluZUNhcCI6ICJyb3VuZCIsICJsaW5lSm9pbiI6ICJyb3VuZCIsICJvcGFjaXR5IjogMS4wLCAicmFkaXVzIjogMTAsICJzdHJva2UiOiB0cnVlLCAid2VpZ2h0IjogMX0KICAgICAgICAgICAgKS5hZGRUbyhtYXBfZTczMjJkNjcyMDJjNGI1Njk0YmE4NjNlM2QyM2VkYzkpOwogICAgICAgIAogICAgCiAgICAgICAgICAgIGNpcmNsZV9tYXJrZXJfNDJlMDJkYzJhODJhNDJkZDk3YTE0Mjc0ODk4MjJiNWMuYmluZFRvb2x0aXAoCiAgICAgICAgICAgICAgICBgPGRpdj4KICAgICAgICAgICAgICAgICAgICAgVXBwZXIgUmlnaHQgQ29ybmVyCiAgICAgICAgICAgICAgICAgPC9kaXY+YCwKICAgICAgICAgICAgICAgIHsic3RpY2t5IjogdHJ1ZX0KICAgICAgICAgICAgKTsKICAgICAgICAKPC9zY3JpcHQ+ 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 0x7fb0e872c640>"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"cell_type": "markdown",
"source": [
"import folium\n",
"\n",
"\n",
"lon = -(41 + 20 / 60.0 + 17 / 60 / 60.0)\n",
"lat = -(20 + 59 / 60.0 + 35 / 60 / 60.0)\n",
"\n",
"min_lon, max_lon = -45, -35\n",
"min_lat, max_lat = -25, -15\n",
"\n",
"m = folium.Map(\n",
" max_bounds=True,\n",
" location=[lat, lon],\n",
" zoom_start=6,\n",
" min_lat=min_lat,\n",
" max_lat=max_lat,\n",
" min_lon=min_lon,\n",
" max_lon=max_lon,\n",
")\n",
"\n",
"\n",
"kw = {\n",
" \"radius\": 10,\n",
" \"color\": \"black\",\n",
" \"fill\": True,\n",
" \"weight\": 1,\n",
" \"fill_color\": \"green\",\n",
" \"fill_opacity\": 1,\n",
"}\n",
"\n",
"c0 = folium.CircleMarker(location=[max_lat, min_lon], tooltip=\"Upper Left Corner\", **kw)\n",
"c1 = folium.CircleMarker(location=[min_lat, min_lon], tooltip=\"Lower Left Corner\", **kw)\n",
"c2 = folium.CircleMarker(\n",
" location=[min_lat, max_lon], tooltip=\"Lower Right Corner\", **kw\n",
")\n",
"c3 = folium.CircleMarker(\n",
" location=[max_lat, max_lon], tooltip=\"Upper Right Corner\", **kw\n",
")\n",
"\n",
"for c in [c0, c1, c2, c3]:\n",
" m.add_child(c)\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#Limits"
],
"metadata": {
"collapsed": false
}
}
],
"metadata": {
Expand Down
Loading

0 comments on commit f9da3cc

Please sign in to comment.