{"id":332926,"date":"2022-05-09T03:00:15","date_gmt":"2022-05-09T03:00:15","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=332926"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=332926","title":{"rendered":"<span>\u041e\u0441\u043d\u043e\u0432\u044b \u0418\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043a\u0430\u0440\u0442<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0414\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043a\u0430\u0440\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443  &#8212; Folium.<\/p>\n<p>Folium \u2014 \u044d\u0442\u043e \u043c\u043e\u0449\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Python, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u044b\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043c\u043e\u0447\u044c \u043b\u044e\u0434\u044f\u043c \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0433\u0435\u043e-\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<p>Folium &#8212; \u044d\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0430\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 Datawrangling \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Folium \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u0430\u0440\u0442\u0443 \u043b\u044e\u0431\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u043c\u0438\u0440\u0435, \u0435\u0441\u043b\u0438 \u0432\u044b \u0437\u043d\u0430\u0435\u0442\u0435 \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0448\u0438\u0440\u043e\u0442\u044b \u0438 \u0434\u043e\u043b\u0433\u043e\u0442\u044b.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u0430\u0440\u0442\u0443 \u0438 \u043d\u0430\u043b\u043e\u0436\u0438\u0442\u044c \u043c\u0430\u0440\u043a\u0435\u0440\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u044b \u043c\u0430\u0440\u043a\u0435\u0440\u043e\u0432 \u043f\u043e\u0432\u0435\u0440\u0445 \u043a\u0430\u0440\u0442\u044b \u0434\u043b\u044f \u043a\u0440\u0443\u0442\u044b\u0445 \u0438 \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439.<\/p>\n<p>Folium &#8212; \u044d\u0442\u043e  \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Python, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0438\u043f\u043e\u0432 \u043a\u0430\u0440\u0442 Leaflet. \u0422\u043e\u0442 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b Folium \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b, \u0434\u0435\u043b\u0430\u0435\u0442 \u044d\u0442\u0443 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u043f\u0430\u043d\u0435\u043b\u0435\u0439.<\/p>\n<p> \u041d\u0430 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Folium:  <\/p>\n<blockquote>\n<p> Folium builds on the data wrangling strengths of the Python ecosystem and the mapping strengths of the Leaflet.js library. Manipulate your data in Python, then visualize it in on a Leaflet map via Folium.  <\/p>\n<\/blockquote>\n<p> Folium \u043e\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u0438\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u044b Python \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Leaflet.js. \u0423\u043f\u0440\u0430\u0432\u043b\u044f\u0439\u0442\u0435 \u0441\u0432\u043e\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 Python, \u0430 \u0437\u0430\u0442\u0435\u043c \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0439\u0442\u0435 \u0438\u0445 \u043d\u0430 \u043a\u0430\u0440\u0442\u0435 Leaflet \u0447\u0435\u0440\u0435\u0437 Folium.  <\/p>\n<blockquote>\n<p> Folium makes it easy to visualize data that&#8217;s been manipulated in Python on an interactive Leaflet map. It enables both the binding of data to a map for choropleth visualizations as well as passing Vincent\/Vega visualizations as markers on the map.  <\/p>\n<\/blockquote>\n<p> Folium \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043b\u0435\u0433\u043a\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0435 \u0432 Python, \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043a\u0430\u0440\u0442\u0435 Leaflet. \u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u0430\u043a \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a \u043a\u0430\u0440\u0442\u0435 \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 choropleth, \u0442\u0430\u043a \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0412\u0438\u043d\u0441\u0435\u043d\u0442\u0430 \/ \u0412\u0435\u0433\u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043c\u0430\u0440\u043a\u0435\u0440\u043e\u0432 \u043d\u0430 \u043a\u0430\u0440\u0442\u0435.  <\/p>\n<blockquote>\n<p> The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. Folium supports both GeoJSON and TopoJSON overlays, as well as the binding of data to those overlays to create choropleth maps with color-brewer color schemes.  <\/p>\n<\/blockquote>\n<p> \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0438\u043c\u0435\u0435\u0442 \u0440\u044f\u0434 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u0432 \u0438\u0437 OpenStreetMap, Mapbox \u0438 Stamen \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u043d\u0430\u0431\u043e\u0440\u044b \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u0432 \u0441 \u043a\u043b\u044e\u0447\u0430\u043c\u0438 API Mapbox \u0438\u043b\u0438 Cloudmade. Folium \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043a\u0430\u043a GeoJSON, \u0442\u0430\u043a \u0438 TopoJSON, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043a \u044d\u0442\u0438\u043c \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u0430\u0440\u0442 choropleth \u0441 \u0446\u0432\u0435\u0442\u043e\u0432\u044b\u043c\u0438 \u0441\u0445\u0435\u043c\u0430\u043c\u0438 \u0446\u0432\u0435\u0442\u0430 color-brewer.  <\/p>\n<\/p>\n<p> \u0414\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438 &#8212; \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 Folium \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c.    \u0412 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435 \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c:  <\/p>\n<pre><code class=\"python\">pip install folium<\/code><\/pre>\n<p> \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 Folium.  <\/p>\n<pre><code class=\"python\">import folium  # Import folium MarkerCluster plugin from folium.plugins import MarkerCluster # Import folium MousePosition plugin from folium.plugins import MousePosition # Import folium DivIcon plugin from folium.features import DivIcon  print('Folium installed and imported!')<\/code><\/pre>\n<p> Folium installed and imported!  <\/p>\n<p> \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u0430\u0440\u0442\u044b \u043c\u0438\u0440\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Folium \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e. \u0412\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043a\u0430\u0440\u0442\u044b  &#8212; <strong>folium<\/strong>.Map(), \u0438 \u044d\u0442\u043e \u0432\u0441\u0435.   <\/p>\n<pre><code class=\"python\"># define the world map world_map = folium.Map()  # display world map world_map<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/58c\/d86\/6ea\/58cd866ea27d5fab21a0e543e7769c41.png\" alt=\"\u041a\u0430\u0440\u0442\u0430 \u043c\u0438\u0440\u0430 (\u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u043c\u0430\u0441\u0448\u0442\u0430\u0431)\" title=\"\u041a\u0430\u0440\u0442\u0430 \u043c\u0438\u0440\u0430 (\u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u043c\u0430\u0441\u0448\u0442\u0430\u0431)\" width=\"975\" height=\"533\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/58c\/d86\/6ea\/58cd866ea27d5fab21a0e543e7769c41.png\"\/><figcaption>\u041a\u0430\u0440\u0442\u0430 \u043c\u0438\u0440\u0430 (\u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u043c\u0430\u0441\u0448\u0442\u0430\u0431)<\/figcaption><\/figure>\n<p> \u0427\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0432 \u043a\u0430\u0440\u0442\u0430\u0445, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 Folium, \u0442\u0430\u043a \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u043e\u043d\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0438\u043b\u0438 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u043c\u0430\u0441\u0448\u0442\u0430\u0431 \u043f\u043e\u0441\u043b\u0435 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u0430\u0440\u0442\u044b.  <\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3e4\/356\/ece\/3e4356eceef73cfdcc497d84873973a7.png\" alt=\"\u041a\u0430\u0440\u0442\u0430 \u043c\u0438\u0440\u0430\" title=\"\u041a\u0430\u0440\u0442\u0430 \u043c\u0438\u0440\u0430\" width=\"458\" height=\"336\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3e4\/356\/ece\/3e4356eceef73cfdcc497d84873973a7.png\"\/><figcaption>\u041a\u0430\u0440\u0442\u0430 \u043c\u0438\u0440\u0430<\/figcaption><\/figure>\n<p> \u0421\u0442\u0438\u043b\u044c \u043a\u0430\u0440\u0442\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e &#8212; OpenStreetMap (\u043e\u0442\u043a\u0440\u044b\u0442\u0430\u044f \u043a\u0430\u0440\u0442\u0430 \u0443\u043b\u0438\u0446), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u0438\u0434 \u0443\u043b\u0438\u0446\u044b \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043f\u0440\u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u0441\u0442\u0440\u0430\u043d \u043c\u0438\u0440\u0430 \u043f\u0440\u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438.   <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0da\/f12\/3b4\/0daf123b4bd0831a1a98be0ab7b23137.png\" alt=\"\u041a\u0430\u0440\u0442\u0430 \u043c\u0438\u0440\u0430, \u0421\u0442\u0438\u043b\u044c \u043a\u0430\u0440\u0442\u044b  - OpenStreetMap (\u043e\u0442\u043a\u0440\u044b\u0442\u0430\u044f \u043a\u0430\u0440\u0442\u0430 \u0443\u043b\u0438\u0446)\" title=\"\u041a\u0430\u0440\u0442\u0430 \u043c\u0438\u0440\u0430, \u0421\u0442\u0438\u043b\u044c \u043a\u0430\u0440\u0442\u044b  - OpenStreetMap (\u043e\u0442\u043a\u0440\u044b\u0442\u0430\u044f \u043a\u0430\u0440\u0442\u0430 \u0443\u043b\u0438\u0446)\" width=\"976\" height=\"557\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0da\/f12\/3b4\/0daf123b4bd0831a1a98be0ab7b23137.png\"\/><figcaption>\u041a\u0430\u0440\u0442\u0430 \u043c\u0438\u0440\u0430, \u0421\u0442\u0438\u043b\u044c \u043a\u0430\u0440\u0442\u044b  &#8212; OpenStreetMap (\u043e\u0442\u043a\u0440\u044b\u0442\u0430\u044f \u043a\u0430\u0440\u0442\u0430 \u0443\u043b\u0438\u0446)<\/figcaption><\/figure>\n<p>    \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043a\u0430\u0440\u0442\u0443 \u043c\u0438\u0440\u0430 \u0432\u043e\u043a\u0440\u0443\u0433 \u0420\u043e\u0441\u0441\u0438\u0438 \u0438 \u043d\u0430\u0437\u043e\u0432\u0435\u043c \u0435\u0435 &#8212; russia_map . \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0448\u0438\u0440\u043e\u0442\u044b \u0438 \u0434\u043e\u043b\u0433\u043e\u0442\u044b \u0420\u043e\u0441\u0441\u0438\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 location (\u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f) \u0438 \u0441 Folium \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 zoom start.   <\/p>\n<pre><code class=\"python\">russia_map = folium.Map(     location = [64.6863136, 97.7453061],    # \u0448\u0438\u0440\u043e\u0442\u0430 \u0438 \u0434\u043e\u043b\u0433\u043e\u0442\u0430 \u0420\u043e\u0441\u0441\u0438\u0438     zoom_start = 4 )  # display russia map russia_map<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/107\/ea4\/b1f\/107ea4b1f2b4093890df235a962192f7.png\" alt=\"\u041a\u0430\u0440\u0442\u0430 \u043c\u0438\u0440\u0430 \u0432\u043e\u043a\u0440\u0443\u0433 \u0420\u043e\u0441\u0441\u0438\u0438\" title=\"\u041a\u0430\u0440\u0442\u0430 \u043c\u0438\u0440\u0430 \u0432\u043e\u043a\u0440\u0443\u0433 \u0420\u043e\u0441\u0441\u0438\u0438\" width=\"968\" height=\"546\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/107\/ea4\/b1f\/107ea4b1f2b4093890df235a962192f7.png\"\/><figcaption>\u041a\u0430\u0440\u0442\u0430 \u043c\u0438\u0440\u0430 \u0432\u043e\u043a\u0440\u0443\u0433 \u0420\u043e\u0441\u0441\u0438\u0438<\/figcaption><\/figure>\n<p>zoom start &#8212;  \u044d\u0442\u043e \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0442.\u043a.  \u043b\u0435\u0433\u043a\u043e  \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0441\u043b\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043a\u0430\u0440\u0442\u044b \u043f\u0443\u0442\u0435\u043c \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430.<\/p>\n<p>         \u0415\u0449\u0435 \u043e\u0434\u043d\u0430 \u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c Folium \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0441\u0442\u0438\u043b\u0438 \u043a\u0430\u0440\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 tiles<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u0442\u0438\u043b\u044c &#8216;Stamen Toner\u2019 \u043a\u0430\u0440\u0442\u044b  \u043c\u0438\u0440\u0430 \u0432\u043e\u043a\u0440\u0443\u0433 \u0420\u043e\u0441\u0441\u0438\u0438. \u042d\u0442\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u043a\u043e\u043d\u0442\u0440\u0430\u0441\u0442\u043d\u044b\u0435 \u0447\u0435\u0440\u043d\u043e-\u0431\u0435\u043b\u044b\u0435 \u043a\u0430\u0440\u0442\u044b.<\/p>\n<p>\u042d\u0442\u043e\u0442 \u0441\u0442\u0438\u043b\u044c \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u0440\u0435\u0447\u043d\u044b\u0445 \u043c\u0435\u0430\u043d\u0434\u0440\u043e\u0432 (\u0438\u0437\u0433\u0438\u0431\u044b \u0440\u0443\u0441\u043b\u0430 \u0440\u0435\u043a\u0438) \u0438 \u043f\u0440\u0438\u0431\u0440\u0435\u0436\u043d\u044b\u0445 \u0437\u043e\u043d.<\/p>\n<pre><code class=\"python\">russia_map = folium.Map(     location = [64.6863136, 97.7453061],   # \u0448\u0438\u0440\u043e\u0442\u0430 \u0438 \u0434\u043e\u043b\u0433\u043e\u0442\u0430 \u0420\u043e\u0441\u0441\u0438\u0438     zoom_start = 4,     tiles = 'Stamen Toner' )  # display russia map russia_map<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/10b\/6c3\/31b\/10b6c331b23aea2bc35862756249d3f6.png\" alt=\"\u0421\u0442\u0438\u043b\u044c 'Stamen Toner\u2019 \u043a\u0430\u0440\u0442\u044b  \u043c\u0438\u0440\u0430 \u0432\u043e\u043a\u0440\u0443\u0433 \u0420\u043e\u0441\u0441\u0438\u0438\" title=\"\u0421\u0442\u0438\u043b\u044c 'Stamen Toner\u2019 \u043a\u0430\u0440\u0442\u044b  \u043c\u0438\u0440\u0430 \u0432\u043e\u043a\u0440\u0443\u0433 \u0420\u043e\u0441\u0441\u0438\u0438\" width=\"962\" height=\"543\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/10b\/6c3\/31b\/10b6c331b23aea2bc35862756249d3f6.png\"\/><figcaption>\u0421\u0442\u0438\u043b\u044c &#8216;Stamen Toner\u2019 \u043a\u0430\u0440\u0442\u044b  \u043c\u0438\u0440\u0430 \u0432\u043e\u043a\u0440\u0443\u0433 \u0420\u043e\u0441\u0441\u0438\u0438<\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8f1\/f1d\/a8e\/8f1f1da8e021b544136cde40f7319d76.png\" alt=\"\u0421\u0442\u0438\u043b\u044c 'Stamen Toner\u2019 \u043a\u0430\u0440\u0442\u044b  \u043c\u0438\u0440\u0430 \u0432\u043e\u043a\u0440\u0443\u0433 \u0420\u043e\u0441\u0441\u0438\u0438 (\u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u043c\u0430\u0441\u0448\u0442\u0430\u0431)\" title=\"\u0421\u0442\u0438\u043b\u044c 'Stamen Toner\u2019 \u043a\u0430\u0440\u0442\u044b  \u043c\u0438\u0440\u0430 \u0432\u043e\u043a\u0440\u0443\u0433 \u0420\u043e\u0441\u0441\u0438\u0438 (\u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u043c\u0430\u0441\u0448\u0442\u0430\u0431)\" width=\"973\" height=\"525\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8f1\/f1d\/a8e\/8f1f1da8e021b544136cde40f7319d76.png\"\/><figcaption>\u0421\u0442\u0438\u043b\u044c &#8216;Stamen Toner\u2019 \u043a\u0430\u0440\u0442\u044b  \u043c\u0438\u0440\u0430 \u0432\u043e\u043a\u0440\u0443\u0433 \u0420\u043e\u0441\u0441\u0438\u0438 (\u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u043c\u0430\u0441\u0448\u0442\u0430\u0431)<\/figcaption><\/figure>\n<p>       \u0414\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u0438\u043b\u044c &#8212; &#8216;Stamen Terrain\u2019 (\u0442\u0438\u0441\u043d\u0435\u043d\u0438\u0435 \u043c\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u0438). \u042d\u0442\u043e\u0442 \u0441\u0442\u0438\u043b\u044c \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u0442\u0435\u043d\u0435\u043d\u0438\u044f \u0445\u043e\u043b\u043c\u043e\u0432 \u0438 \u043f\u0440\u0438\u0440\u043e\u0434\u043d\u044b\u0445 \u0446\u0432\u0435\u0442\u043e\u0432 \u0440\u0430\u0441\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.   <\/p>\n<pre><code class=\"python\">russia_map = folium.Map(     location = [64.6863136, 97.7453061],      # \u0448\u0438\u0440\u043e\u0442\u0430 \u0438 \u0434\u043e\u043b\u0433\u043e\u0442\u0430 \u0420\u043e\u0441\u0441\u0438\u0438     zoom_start = 4,     tiles = 'Stamen Terrain' )  # display russia map russia_map<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f31\/f5c\/f46\/f31f5cf46ba7c71d95761db6b76e0062.png\" alt=\"\u0421\u0442\u0438\u043b\u044c 'Stamen Terrain\u2019 \u043a\u0430\u0440\u0442\u044b  \u043c\u0438\u0440\u0430 \u0432\u043e\u043a\u0440\u0443\u0433 \u0420\u043e\u0441\u0441\u0438\u0438\" title=\"\u0421\u0442\u0438\u043b\u044c 'Stamen Terrain\u2019 \u043a\u0430\u0440\u0442\u044b  \u043c\u0438\u0440\u0430 \u0432\u043e\u043a\u0440\u0443\u0433 \u0420\u043e\u0441\u0441\u0438\u0438\" width=\"964\" height=\"547\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f31\/f5c\/f46\/f31f5cf46ba7c71d95761db6b76e0062.png\"\/><figcaption>\u0421\u0442\u0438\u043b\u044c &#8216;Stamen Terrain\u2019 \u043a\u0430\u0440\u0442\u044b  \u043c\u0438\u0440\u0430 \u0432\u043e\u043a\u0440\u0443\u0433 \u0420\u043e\u0441\u0441\u0438\u0438<\/figcaption><\/figure>\n<p> \u042d\u0442\u043e \u043a\u0430\u0440\u0442\u044b \u0441 \u0437\u0430\u0442\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0445\u043e\u043b\u043c\u043e\u0432 \u0438 \u0446\u0432\u0435\u0442\u0430\u043c\u0438 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0440\u0430\u0441\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u041e\u043d\u0438 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u044e\u0442 \u0443\u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043c\u0430\u0440\u043a\u0438\u0440\u043e\u0432\u043a\u0443 \u0438 \u043e\u0431\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043b\u0438\u043d\u0438\u0439 \u0434\u043e\u0440\u043e\u0433 \u0441 \u0434\u0432\u0443\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u043c \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435\u043c.  <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ac8\/d1e\/6b2\/ac8d1e6b2df3f09f481efbf6f717fa5a.png\" alt=\"\u0421\u0442\u0438\u043b\u044c 'Stamen Terrain\u2019 \u043a\u0430\u0440\u0442\u044b  \u043c\u0438\u0440\u0430 \u0432\u043e\u043a\u0440\u0443\u0433 \u0420\u043e\u0441\u0441\u0438\u0438 (\u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u043c\u0430\u0441\u0448\u0442\u0430\u0431)\" title=\"\u0421\u0442\u0438\u043b\u044c 'Stamen Terrain\u2019 \u043a\u0430\u0440\u0442\u044b  \u043c\u0438\u0440\u0430 \u0432\u043e\u043a\u0440\u0443\u0433 \u0420\u043e\u0441\u0441\u0438\u0438 (\u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u043c\u0430\u0441\u0448\u0442\u0430\u0431)\" width=\"970\" height=\"517\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ac8\/d1e\/6b2\/ac8d1e6b2df3f09f481efbf6f717fa5a.png\"\/><figcaption>\u0421\u0442\u0438\u043b\u044c &#8216;Stamen Terrain\u2019 \u043a\u0430\u0440\u0442\u044b  \u043c\u0438\u0440\u0430 \u0432\u043e\u043a\u0440\u0443\u0433 \u0420\u043e\u0441\u0441\u0438\u0438 (\u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u043c\u0430\u0441\u0448\u0442\u0430\u0431)<\/figcaption><\/figure>\n<p>\u041a\u0430\u043a \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u043c\u0430\u0440\u043a\u0435\u0440\u044b \u043f\u043e\u0432\u0435\u0440\u0445 \u043a\u0430\u0440\u0442\u044b \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439?<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u043a\u0440\u0443\u0433\u043e\u0432\u043e\u0439 \u0437\u043d\u0430\u043a \u0432 \u0446\u0435\u043d\u0442\u0440 \u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c Saint_Petersburg.<\/p>\n<p>\u042d\u0442\u0430 \u0433\u0440\u0443\u043f\u043f\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043f\u0443\u0441\u0442\u0430, \u0430 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0434\u0430\u043b\u044c\u0448\u0435 \u2014 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0435 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b (child) \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0445 \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432.<\/p>\n<p>\u0422\u0430\u043a \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c child \u0432 \u0432\u0438\u0434\u0435 \u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u043a\u0440\u0443\u0433\u043e\u0432\u043e\u0433\u043e \u0437\u043d\u0430\u043a\u0430, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0432 \u0446\u0435\u043d\u0442\u0440\u0435 \u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0443\u043a\u0430\u0436\u0435\u043c  \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0438\u0436\u0435\u0441\u0442\u043e\u044f\u0449\u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 (\u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433\u0430), \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u044f \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0448\u0438\u0440\u043e\u0442\u044b \u0438 \u0434\u043e\u043b\u0433\u043e\u0442\u044b.<\/p>\n<p>\u0418 \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u044b \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 (child) \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u0443 \u043d\u0430 \u043a\u0430\u0440\u0442\u0443 &#8212;<\/p>\n<p>\u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u043a\u0440\u0443\u0433\u043e\u0432\u043e\u0439 \u0437\u043d\u0430\u043a \u043d\u0430\u043b\u043e\u0436\u0435\u043d \u043d\u0430 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043a\u0430\u0440\u0442\u044b \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0432 \u0446\u0435\u043d\u0442\u0440 \u0433\u043e\u0440\u043e\u0434\u0430 \u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433\u0430.<\/p>\n<pre><code class=\"python\"># generate map of Russia  (\u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u0440\u0442\u0443 \u0440\u043e\u0441\u0441\u0438\u0438) russia_map = folium.Map(     location = [64.6863136, 97.7453061],    # \u0448\u0438\u0440\u043e\u0442\u0430 \u0438 \u0434\u043e\u043b\u0433\u043e\u0442\u0430 \u0420\u043e\u0441\u0441\u0438\u0438     zoom_start = 4 )  # add a red marker to Saint Petersburg # create a feature group (\u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u0439) saint_petersburg = folium.map.FeatureGroup()  # style the feature group (\u0441\u0442\u0438\u043b\u044c \u0433\u0440\u0443\u043f\u043f\u044b \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432) saint_petersburg.add_child(     folium.features.CircleMarker(         [59.938732, 30.316229], radius = 5,  # \u0448\u0438\u0440\u043e\u0442\u0430 \u0438 \u0434\u043e\u043b\u0433\u043e\u0442\u0430 \u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433\u0430         color = 'red', fill_color = 'Red'     ) )  # add the feature group to the map  (\u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043d\u0430 \u043a\u0430\u0440\u0442\u0443) russia_map.add_child(saint_petersburg)  # display russia map russia_map<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6b2\/d38\/ae3\/6b2d38ae3a82c3cb083a0bd8bbfc937c.png\" alt=\"\u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u043a\u0440\u0443\u0433\u043e\u0432\u043e\u0439 \u0437\u043d\u0430\u043a \u043d\u0430\u043b\u043e\u0436\u0435\u043d \u043d\u0430 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043a\u0430\u0440\u0442\u044b \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0432 \u0446\u0435\u043d\u0442\u0440 \u0433\u043e\u0440\u043e\u0434\u0430 \u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433\u0430. \" title=\"\u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u043a\u0440\u0443\u0433\u043e\u0432\u043e\u0439 \u0437\u043d\u0430\u043a \u043d\u0430\u043b\u043e\u0436\u0435\u043d \u043d\u0430 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043a\u0430\u0440\u0442\u044b \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0432 \u0446\u0435\u043d\u0442\u0440 \u0433\u043e\u0440\u043e\u0434\u0430 \u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433\u0430. \" width=\"974\" height=\"512\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6b2\/d38\/ae3\/6b2d38ae3a82c3cb083a0bd8bbfc937c.png\"\/><figcaption>\u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u043a\u0440\u0443\u0433\u043e\u0432\u043e\u0439 \u0437\u043d\u0430\u043a \u043d\u0430\u043b\u043e\u0436\u0435\u043d \u043d\u0430 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043a\u0430\u0440\u0442\u044b \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0432 \u0446\u0435\u043d\u0442\u0440 \u0433\u043e\u0440\u043e\u0434\u0430 \u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433\u0430. <\/figcaption><\/figure>\n<p> \u0414\u0430\u0432\u0430\u0439\u0442\u0435, \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0434\u043f\u0438\u0448\u0435\u043c \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u043a\u0440\u0443\u0433\u043e\u0432\u043e\u0439 \u0437\u043d\u0430\u043a: &#8212; &#8216;\u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433, \u0432 \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u043d\u043e\u0439 \u0440\u0435\u0447\u0438 &#8212; \u041f\u0438\u0301\u0442\u0435\u0440, \u0441\u043e\u043a\u0440. &#8212; \u0421\u041f\u0431\u2019. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043c\u0430\u0440\u043a\u0435\u0440\u0430 \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0435\u0433\u043e \u043e\u043a\u043d\u0430, \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0442\u0435\u043a\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a \u044d\u0442\u043e\u043c\u0443 \u043c\u0430\u0440\u043a\u0435\u0440\u0443.   <\/p>\n<pre><code class=\"python\"># generate map of Russia russia_map = folium.Map(     location = [64.6863136, 97.7453061],    # \u0448\u0438\u0440\u043e\u0442\u0430 \u0438 \u0434\u043e\u043b\u0433\u043e\u0442\u0430 \u0420\u043e\u0441\u0441\u0438\u0438     zoom_start = 4 )  # add a red marker to Saint Petersburg # create a feature group saint_petersburg = folium.map.FeatureGroup()  # style the feature group saint_petersburg.add_child(     folium.features.CircleMarker(         [59.938732, 30.316229], radius = 5,    # \u0448\u0438\u0440\u043e\u0442\u0430 \u0438 \u0434\u043e\u043b\u0433\u043e\u0442\u0430 \u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433\u0430         color = 'red', fill_color = 'Red'     ) )  # add the feature group to the map russia_map.add_child(saint_petersburg)  # label the Marker (\u043f\u043e\u043c\u0435\u0442\u0438\u0442\u044c \u043c\u0430\u0440\u043a\u0435\u0440) folium.Marker([59.938732, 30.316229],         # \u0448\u0438\u0440\u043e\u0442\u0430 \u0438 \u0434\u043e\u043b\u0433\u043e\u0442\u0430 \u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433\u0430 popup = '\u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433, \u0432 \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u043d\u043e\u0439 \u0440\u0435\u0447\u0438 - \u041f\u0438\u0301\u0442\u0435\u0440, \u0441\u043e\u043a\u0440.- \u0421\u041f\u0431').add_to(russia_map)  # display russia map russia_map<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/deb\/084\/b1d\/deb084b1df47129a58b2ec81cb640c6f.png\" alt=\"\u043f\u043e\u0434\u043f\u0438\u0441\u044c '\u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433, \u0432 \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u043d\u043e\u0439 \u0440\u0435\u0447\u0438 - \u041f\u0438\u0301\u0442\u0435\u0440, \u0441\u043e\u043a\u0440. - \u0421\u041f\u0431\u2019  \u043a \u043c\u0430\u0440\u043a\u0435\u0440\u0443 \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u043a\u0440\u0443\u0433\u043e\u0432\u043e\u0439 \u0437\u043d\u0430\u043a\" title=\"\u043f\u043e\u0434\u043f\u0438\u0441\u044c '\u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433, \u0432 \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u043d\u043e\u0439 \u0440\u0435\u0447\u0438 - \u041f\u0438\u0301\u0442\u0435\u0440, \u0441\u043e\u043a\u0440. - \u0421\u041f\u0431\u2019  \u043a \u043c\u0430\u0440\u043a\u0435\u0440\u0443 \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u043a\u0440\u0443\u0433\u043e\u0432\u043e\u0439 \u0437\u043d\u0430\u043a\" width=\"983\" height=\"422\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/deb\/084\/b1d\/deb084b1df47129a58b2ec81cb640c6f.png\"\/><figcaption>\u043f\u043e\u0434\u043f\u0438\u0441\u044c &#8216;\u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433, \u0432 \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u043d\u043e\u0439 \u0440\u0435\u0447\u0438 &#8212; \u041f\u0438\u0301\u0442\u0435\u0440, \u0441\u043e\u043a\u0440. &#8212; \u0421\u041f\u0431\u2019  \u043a \u043c\u0430\u0440\u043a\u0435\u0440\u0443 \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u043a\u0440\u0443\u0433\u043e\u0432\u043e\u0439 \u0437\u043d\u0430\u043a<\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/000\/df4\/659\/000df4659b0090956a38af92064e98ff.png\" alt=\"\u043f\u043e\u0434\u043f\u0438\u0441\u044c '\u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433, \u0432 \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u043d\u043e\u0439 \u0440\u0435\u0447\u0438 - \u041f\u0438\u0301\u0442\u0435\u0440, \u0441\u043e\u043a\u0440. - \u0421\u041f\u0431\u2019  \u043a \u043c\u0430\u0440\u043a\u0435\u0440\u0443 \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u043a\u0440\u0443\u0433\u043e\u0432\u043e\u0439 \u0437\u043d\u0430\u043a (\u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u043c\u0430\u0441\u0448\u0442\u0430\u0431), c\u0442\u0438\u043b\u044c \u043a\u0430\u0440\u0442\u044b  - OpenStreetMap\" title=\"\u043f\u043e\u0434\u043f\u0438\u0441\u044c '\u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433, \u0432 \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u043d\u043e\u0439 \u0440\u0435\u0447\u0438 - \u041f\u0438\u0301\u0442\u0435\u0440, \u0441\u043e\u043a\u0440. - \u0421\u041f\u0431\u2019  \u043a \u043c\u0430\u0440\u043a\u0435\u0440\u0443 \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u043a\u0440\u0443\u0433\u043e\u0432\u043e\u0439 \u0437\u043d\u0430\u043a (\u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u043c\u0430\u0441\u0448\u0442\u0430\u0431), c\u0442\u0438\u043b\u044c \u043a\u0430\u0440\u0442\u044b  - OpenStreetMap\" width=\"976\" height=\"412\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/000\/df4\/659\/000df4659b0090956a38af92064e98ff.png\"\/><figcaption>\u043f\u043e\u0434\u043f\u0438\u0441\u044c &#8216;\u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433, \u0432 \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u043d\u043e\u0439 \u0440\u0435\u0447\u0438 &#8212; \u041f\u0438\u0301\u0442\u0435\u0440, \u0441\u043e\u043a\u0440. &#8212; \u0421\u041f\u0431\u2019  \u043a \u043c\u0430\u0440\u043a\u0435\u0440\u0443 \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u043a\u0440\u0443\u0433\u043e\u0432\u043e\u0439 \u0437\u043d\u0430\u043a (\u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u043c\u0430\u0441\u0448\u0442\u0430\u0431), c\u0442\u0438\u043b\u044c \u043a\u0430\u0440\u0442\u044b  &#8212; OpenStreetMap<\/figcaption><\/figure>\n<p> \u0414\u0430\u0432\u0430\u0439\u0442\u0435  \u0434\u043e\u0431\u0430\u0432\u0438\u043c MousePosition \u043d\u0430 \u043a\u0430\u0440\u0442\u0443, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043a\u0443\u0440\u0441\u043e\u0440\u0430 \u043c\u044b\u0448\u0438 \u043d\u0430 \u0442\u043e\u0447\u043a\u0443 \u043d\u0430 \u043a\u0430\u0440\u0442\u0435. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c,  \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u0440\u0442\u0443 \u0438 \u043b\u0435\u0433\u043a\u043e \u043d\u0430\u0439\u0442\u0438 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043b\u044e\u0431\u044b\u0445 \u0442\u043e\u0447\u0435\u043a \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440,  \u0434\u0432\u043e\u0440\u0446\u043e\u0432\u044b\u0439 \u043c\u043e\u0441\u0442, \u043b\u0438\u0442\u0435\u0439\u043d\u044b\u0439 \u043c\u043e\u0441\u0442).  <\/p>\n<pre><code class=\"python\"># Add Mouse Position to get the coordinate (Lat, Long) for a mouse over on the map formatter = \"function(num) {return L.Util.formatNum(num, 5);};\" mouse_position = MousePosition(     position='topright',     separator=' Long: ',     empty_string='NaN',     lng_first=False,     num_digits=20,     prefix='Lat:',     lat_formatter=formatter,     lng_formatter=formatter, )  russia_map.add_child(mouse_position) russia_map<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9a6\/088\/e51\/9a6088e5173b2894414a7fb0efa3db25.png\" alt=\"MousePosition (\u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u043b\u0435\u0432\u043e\u043c \u0443\u0433\u043b\u0443)\" title=\"MousePosition (\u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u043b\u0435\u0432\u043e\u043c \u0443\u0433\u043b\u0443)\" width=\"977\" height=\"299\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9a6\/088\/e51\/9a6088e5173b2894414a7fb0efa3db25.png\"\/><figcaption>MousePosition (\u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u043b\u0435\u0432\u043e\u043c \u0443\u0433\u043b\u0443)<\/figcaption><\/figure>\n<p> \u041c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0442\u043e\u0447\u043a\u0430\u043c\u0438 \u043d\u0430 \u043a\u0430\u0440\u0442\u0435 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0448\u0438\u0440\u043e\u0442\u044b \u0438 \u0434\u043e\u043b\u0433\u043e\u0442\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043c\u0435\u0442\u043e\u0434:  <\/p>\n<pre><code class=\"python\">from math import sin, cos, sqrt, atan2, radians  def calculate_distance(lat1, lon1, lat2, lon2):     # approximate radius of earth in km     R = 6373.0      lat1 = radians(lat1)     lon1 = radians(lon1)     lat2 = radians(lat2)     lon2 = radians(lon2)      dlon = lon2 - lon1     dlat = lat2 - lat1      a = sin(dlat \/ 2)**2 + cos(lat1) * cos(lat2) * sin(dlon \/ 2)**2     c = 2 * atan2(sqrt(a), sqrt(1 - a))      distance = R * c     return distance<\/code><\/pre>\n<p>\u041e\u0442\u043c\u0435\u0442\u0438\u043c \u0442\u043e\u0447\u043a\u0443 \u043d\u0430 \u0414\u0432\u043e\u0440\u0446\u043e\u0432\u043e\u043c \u043c\u043e\u0441\u0442\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e MousePosition \u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u043c \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043e\u0442 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u043a\u0440\u0443\u0433\u043b\u043e\u0433\u043e \u043c\u0430\u0440\u043a\u0435\u0440\u0430 \u0434\u043e \u0414\u0432\u043e\u0440\u0446\u043e\u0432\u043e\u0433\u043e \u043c\u043e\u0441\u0442\u0430.<\/p>\n<pre><code class=\"python\">#Distance to Palace Bridge  \u0414\u0432\u043e\u0440\u0446\u043e\u0432\u044b\u0439 \u043c\u043e\u0441\u0442 coordinates = [     [59.93876, 30.31623],           # \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u043a\u0440\u0443\u0433\u043b\u043e\u0433\u043e \u043c\u0430\u0440\u043a\u0435\u0440\u0430     [59.94022, 30.30931]]           # \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0434\u0432\u043e\u0440\u0446\u043e\u0432\u043e\u0433\u043e \u043c\u043e\u0441\u0442\u0430  lines=folium.PolyLine(locations=coordinates, weight=1) russia_map.add_child(lines) distance = calculate_distance(coordinates[0][0], coordinates[0][1],                               coordinates[1][0], coordinates[1][1]) distance_circle = folium.Marker(     [59.94022,30.30931],     icon=DivIcon(         icon_size=(20,20),         icon_anchor=(0,0),         html='&lt;div style=\"font-size: 12;        color:#252526;\">&lt;b>%s&lt;\/b>&lt;\/div>' % \"{:10.2f} KM\".format(distance),         )     ) russia_map.add_child(distance_circle) russia_map<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b04\/0c4\/4a4\/b040c44a4d111b79e5b04a6bb480447f.png\" alt=\"0.42 \u043a\u043c - \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043e\u0442 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u043a\u0440\u0443\u0433\u043b\u043e\u0433\u043e \u043c\u0430\u0440\u043a\u0435\u0440\u0430 \u0434\u043e \u0414\u0432\u043e\u0440\u0446\u043e\u0432\u043e\u0433\u043e \u043c\u043e\u0441\u0442\u0430\" title=\"0.42 \u043a\u043c - \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043e\u0442 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u043a\u0440\u0443\u0433\u043b\u043e\u0433\u043e \u043c\u0430\u0440\u043a\u0435\u0440\u0430 \u0434\u043e \u0414\u0432\u043e\u0440\u0446\u043e\u0432\u043e\u0433\u043e \u043c\u043e\u0441\u0442\u0430\" width=\"974\" height=\"355\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b04\/0c4\/4a4\/b040c44a4d111b79e5b04a6bb480447f.png\"\/><figcaption>0.42 \u043a\u043c &#8212; \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043e\u0442 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u043a\u0440\u0443\u0433\u043b\u043e\u0433\u043e \u043c\u0430\u0440\u043a\u0435\u0440\u0430 \u0434\u043e \u0414\u0432\u043e\u0440\u0446\u043e\u0432\u043e\u0433\u043e \u043c\u043e\u0441\u0442\u0430<\/figcaption><\/figure>\n<p>\u041e\u0442\u043c\u0435\u0442\u0438\u043c \u0442\u043e\u0447\u043a\u0443 \u043d\u0430  \u041b\u0438\u0442\u0435\u0439\u043d\u043e\u043c \u043c\u043e\u0441\u0442\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e MousePosition \u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u043c \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043e\u0442 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u043a\u0440\u0443\u0433\u043b\u043e\u0433\u043e \u043c\u0430\u0440\u043a\u0435\u0440\u0430 \u0434\u043e \u041b\u0438\u0442\u0435\u0439\u043d\u043e\u0433\u043e \u043c\u043e\u0441\u0442\u0430.<\/p>\n<pre><code class=\"python\">#Distance to Foundry bridge   \u041b\u0438\u0442\u0435\u0439\u043d\u044b\u0439 \u043c\u043e\u0441\u0442 coordinates = [     [59.93876, 30.31623],       # \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u043a\u0440\u0443\u0433\u043b\u043e\u0433\u043e \u043c\u0430\u0440\u043a\u0435\u0440\u0430     [59.94981, 30.34906]]       # \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043b\u0438\u0442\u0435\u0439\u043d\u043e\u0433\u043e \u043c\u043e\u0441\u0442\u0430  lines=folium.PolyLine(locations=coordinates, weight=1) russia_map.add_child(lines) distance = calculate_distance(coordinates[0][0], coordinates[0][1],                               coordinates[1][0], coordinates[1][1]) distance_circle = folium.Marker(     [59.94981,30.34906],     icon=DivIcon(         icon_size=(20,20),         icon_anchor=(0,0),         html='&lt;div style=\"font-size: 12;        color:#252526;\">&lt;b>%s&lt;\/b>&lt;\/div>' % \"{:10.2f} KM\".format(distance),         )     ) russia_map.add_child(distance_circle) russia_map<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f70\/a72\/096\/f70a7209661901dbe2125b9b537b9aa6.png\" alt=\"2.20 \u043a\u043c - \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043e\u0442 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u043a\u0440\u0443\u0433\u043b\u043e\u0433\u043e \u043c\u0430\u0440\u043a\u0435\u0440\u0430 \u0434\u043e \u041b\u0438\u0442\u0435\u0439\u043d\u043e\u0433\u043e \u043c\u043e\u0441\u0442\u0430.\" title=\"2.20 \u043a\u043c - \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043e\u0442 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u043a\u0440\u0443\u0433\u043b\u043e\u0433\u043e \u043c\u0430\u0440\u043a\u0435\u0440\u0430 \u0434\u043e \u041b\u0438\u0442\u0435\u0439\u043d\u043e\u0433\u043e \u043c\u043e\u0441\u0442\u0430.\" width=\"972\" height=\"352\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f70\/a72\/096\/f70a7209661901dbe2125b9b537b9aa6.png\"\/><figcaption>2.20 \u043a\u043c &#8212; \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043e\u0442 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u043a\u0440\u0443\u0433\u043b\u043e\u0433\u043e \u043c\u0430\u0440\u043a\u0435\u0440\u0430 \u0434\u043e \u041b\u0438\u0442\u0435\u0439\u043d\u043e\u0433\u043e \u043c\u043e\u0441\u0442\u0430.<\/figcaption><\/figure>\n<p> \u0420\u0430\u0437\u0432\u0435 \u044d\u0442\u043e \u043d\u0435 \u043a\u0440\u0443\u0442\u043e?  Folium &#8212; \u044d\u0442\u043e \u043c\u043e\u0449\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432  Python!  <\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/664888\/\"> https:\/\/habr.com\/ru\/post\/664888\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0414\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043a\u0430\u0440\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443  &#8212; Folium.<\/p>\n<p>Folium \u2014 \u044d\u0442\u043e \u043c\u043e\u0449\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Python, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u044b\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043c\u043e\u0447\u044c \u043b\u044e\u0434\u044f\u043c \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0433\u0435\u043e-\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<p>Folium &#8212; \u044d\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0430\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 Datawrangling \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Folium \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u0430\u0440\u0442\u0443 \u043b\u044e\u0431\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u043c\u0438\u0440\u0435, \u0435\u0441\u043b\u0438 \u0432\u044b \u0437\u043d\u0430\u0435\u0442\u0435 \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0448\u0438\u0440\u043e\u0442\u044b \u0438 \u0434\u043e\u043b\u0433\u043e\u0442\u044b.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u0430\u0440\u0442\u0443 \u0438 \u043d\u0430\u043b\u043e\u0436\u0438\u0442\u044c \u043c\u0430\u0440\u043a\u0435\u0440\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u044b \u043c\u0430\u0440\u043a\u0435\u0440\u043e\u0432 \u043f\u043e\u0432\u0435\u0440\u0445 \u043a\u0430\u0440\u0442\u044b \u0434\u043b\u044f \u043a\u0440\u0443\u0442\u044b\u0445 \u0438 \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439.<\/p>\n<p>Folium &#8212; \u044d\u0442\u043e  \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Python, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0438\u043f\u043e\u0432 \u043a\u0430\u0440\u0442 Leaflet. \u0422\u043e\u0442 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b Folium \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b, \u0434\u0435\u043b\u0430\u0435\u0442 \u044d\u0442\u0443 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u043f\u0430\u043d\u0435\u043b\u0435\u0439.<\/p>\n<p> \u041d\u0430 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Folium:  <\/p>\n<blockquote>\n<p> Folium builds on the data wrangling strengths of the Python ecosystem and the mapping strengths of the Leaflet.js library. Manipulate your data in Python, then visualize it in on a Leaflet map via Folium.  <\/p>\n<\/blockquote>\n<p> Folium \u043e\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u0438\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u044b Python \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Leaflet.js. \u0423\u043f\u0440\u0430\u0432\u043b\u044f\u0439\u0442\u0435 \u0441\u0432\u043e\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 Python, \u0430 \u0437\u0430\u0442\u0435\u043c \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0439\u0442\u0435 \u0438\u0445 \u043d\u0430 \u043a\u0430\u0440\u0442\u0435 Leaflet \u0447\u0435\u0440\u0435\u0437 Folium.  <\/p>\n<blockquote>\n<p> Folium makes it easy to visualize data that&#8217;s been manipulated in Python on an interactive Leaflet map. It enables both the binding of data to a map for choropleth visualizations as well as passing Vincent\/Vega visualizations as markers on the map.  <\/p>\n<\/blockquote>\n<p> Folium \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043b\u0435\u0433\u043a\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0435 \u0432 Python, \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043a\u0430\u0440\u0442\u0435 Leaflet. \u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u0430\u043a \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a \u043a\u0430\u0440\u0442\u0435 \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 choropleth, \u0442\u0430\u043a \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0412\u0438\u043d\u0441\u0435\u043d\u0442\u0430 \/ \u0412\u0435\u0433\u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043c\u0430\u0440\u043a\u0435\u0440\u043e\u0432 \u043d\u0430 \u043a\u0430\u0440\u0442\u0435.  <\/p>\n<blockquote>\n<p> The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. Folium supports both GeoJSON and TopoJSON overlays, as well as the binding of data to those overlays to create choropleth maps with color-brewer color schemes.  <\/p>\n<\/blockquote>\n<p> \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0438\u043c\u0435\u0435\u0442 \u0440\u044f\u0434 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u0432 \u0438\u0437 OpenStreetMap, Mapbox \u0438 Stamen \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u043d\u0430\u0431\u043e\u0440\u044b \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u0432 \u0441 \u043a\u043b\u044e\u0447\u0430\u043c\u0438 API Mapbox \u0438\u043b\u0438 Cloudmade. Folium \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043a\u0430\u043a GeoJSON, \u0442\u0430\u043a \u0438 TopoJSON, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043a \u044d\u0442\u0438\u043c \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u0430\u0440\u0442 choropleth \u0441 \u0446\u0432\u0435\u0442\u043e\u0432\u044b\u043c\u0438 \u0441\u0445\u0435\u043c\u0430\u043c\u0438 \u0446\u0432\u0435\u0442\u0430 color-brewer.  <\/p>\n<\/p>\n<p> \u0414\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438 &#8212; \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 Folium \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c.    \u0412 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435 \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c:  <\/p>\n<pre><code class=\"python\">pip install folium<\/code><\/pre>\n<p> \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 Folium.  <\/p>\n<pre><code class=\"python\">import folium  # Import folium MarkerCluster plugin from folium.plugins import MarkerCluster # Import folium MousePosition plugin from folium.plugins import MousePosition # Import folium DivIcon plugin from folium.features import DivIcon  print('Folium installed and imported!')<\/code><\/pre>\n<p> Folium installed and imported!  <\/p>\n<p> \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u0430\u0440\u0442\u044b \u043c\u0438\u0440\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Folium \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e. \u0412\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043a\u0430\u0440\u0442\u044b  &#8212; <strong>folium<\/strong>.Map(), \u0438 \u044d\u0442\u043e \u0432\u0441\u0435.   <\/p>\n<pre><code class=\"python\"># define the world map world_map = folium.Map()  # display world map world_map<\/code><\/pre>\n<figure class=\"full-width\"><figcaption>\u041a\u0430\u0440\u0442\u0430 \u043c\u0438\u0440\u0430 (\u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u043c\u0430\u0441\u0448\u0442\u0430\u0431)<\/figcaption><\/figure>\n<p> \u0427\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0432 \u043a\u0430\u0440\u0442\u0430\u0445, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 Folium, \u0442\u0430\u043a \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u043e\u043d\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0438\u043b\u0438 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u043c\u0430\u0441\u0448\u0442\u0430\u0431 \u043f\u043e\u0441\u043b\u0435 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u0430\u0440\u0442\u044b.  <\/p>\n<figure class=\"\"><figcaption>\u041a\u0430\u0440\u0442\u0430 \u043c\u0438\u0440\u0430<\/figcaption><\/figure>\n<p> \u0421\u0442\u0438\u043b\u044c \u043a\u0430\u0440\u0442\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e &#8212; OpenStreetMap (\u043e\u0442\u043a\u0440\u044b\u0442\u0430\u044f \u043a\u0430\u0440\u0442\u0430 \u0443\u043b\u0438\u0446), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u0438\u0434 \u0443\u043b\u0438\u0446\u044b \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043f\u0440\u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u0441\u0442\u0440\u0430\u043d \u043c\u0438\u0440\u0430 \u043f\u0440\u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438.   <\/p>\n<figure class=\"full-width\"><figcaption>\u041a\u0430\u0440\u0442\u0430 \u043c\u0438\u0440\u0430, \u0421\u0442\u0438\u043b\u044c \u043a\u0430\u0440\u0442\u044b  &#8212; OpenStreetMap (\u043e\u0442\u043a\u0440\u044b\u0442\u0430\u044f \u043a\u0430\u0440\u0442\u0430 \u0443\u043b\u0438\u0446)<\/figcaption><\/figure>\n<p>    \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043a\u0430\u0440\u0442\u0443 \u043c\u0438\u0440\u0430 \u0432\u043e\u043a\u0440\u0443\u0433 \u0420\u043e\u0441\u0441\u0438\u0438 \u0438 \u043d\u0430\u0437\u043e\u0432\u0435\u043c \u0435\u0435 &#8212; russia_map . \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0448\u0438\u0440\u043e\u0442\u044b \u0438 \u0434\u043e\u043b\u0433\u043e\u0442\u044b \u0420\u043e\u0441\u0441\u0438\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 location (\u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f) \u0438 \u0441 Folium \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 zoom start.   <\/p>\n<pre><code class=\"python\">russia_map = folium.Map(     location = [64.6863136, 97.7453061],    # \u0448\u0438\u0440\u043e\u0442\u0430 \u0438 \u0434\u043e\u043b\u0433\u043e\u0442\u0430 \u0420\u043e\u0441\u0441\u0438\u0438     zoom_start = 4 )  # display russia map russia_map<\/code><\/pre>\n<figure class=\"full-width\"><figcaption>\u041a\u0430\u0440\u0442\u0430 \u043c\u0438\u0440\u0430 \u0432\u043e\u043a\u0440\u0443\u0433 \u0420\u043e\u0441\u0441\u0438\u0438<\/figcaption><\/figure>\n<p>zoom start &#8212;  \u044d\u0442\u043e \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0442.\u043a.  \u043b\u0435\u0433\u043a\u043e  \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0441\u043b\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043a\u0430\u0440\u0442\u044b \u043f\u0443\u0442\u0435\u043c \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430.<\/p>\n<p>         \u0415\u0449\u0435 \u043e\u0434\u043d\u0430 \u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c Folium \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0441\u0442\u0438\u043b\u0438 \u043a\u0430\u0440\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 tiles<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u0442\u0438\u043b\u044c &#8216;Stamen Toner\u2019 \u043a\u0430\u0440\u0442\u044b  \u043c\u0438\u0440\u0430 \u0432\u043e\u043a\u0440\u0443\u0433 \u0420\u043e\u0441\u0441\u0438\u0438. \u042d\u0442\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u043a\u043e\u043d\u0442\u0440\u0430\u0441\u0442\u043d\u044b\u0435 \u0447\u0435\u0440\u043d\u043e-\u0431\u0435\u043b\u044b\u0435 \u043a\u0430\u0440\u0442\u044b.<\/p>\n<p>\u042d\u0442\u043e\u0442 \u0441\u0442\u0438\u043b\u044c \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u0440\u0435\u0447\u043d\u044b\u0445 \u043c\u0435\u0430\u043d\u0434\u0440\u043e\u0432 (\u0438\u0437\u0433\u0438\u0431\u044b \u0440\u0443\u0441\u043b\u0430 \u0440\u0435\u043a\u0438) \u0438 \u043f\u0440\u0438\u0431\u0440\u0435\u0436\u043d\u044b\u0445 \u0437\u043e\u043d.<\/p>\n<pre><code class=\"python\">russia_map = folium.Map(     location = [64.6863136, 97.7453061],   # \u0448\u0438\u0440\u043e\u0442\u0430 \u0438 \u0434\u043e\u043b\u0433\u043e\u0442\u0430 \u0420\u043e\u0441\u0441\u0438\u0438     zoom_start = 4,     tiles = 'Stamen Toner' )  # display russia map russia_map<\/code><\/pre>\n<figure class=\"full-width\"><figcaption>\u0421\u0442\u0438\u043b\u044c &#8216;Stamen Toner\u2019 \u043a\u0430\u0440\u0442\u044b  \u043c\u0438\u0440\u0430 \u0432\u043e\u043a\u0440\u0443\u0433 \u0420\u043e\u0441\u0441\u0438\u0438<\/figcaption><\/figure>\n<figure class=\"full-width\"><figcaption>\u0421\u0442\u0438\u043b\u044c &#8216;Stamen Toner\u2019 \u043a\u0430\u0440\u0442\u044b  \u043c\u0438\u0440\u0430 \u0432\u043e\u043a\u0440\u0443\u0433 \u0420\u043e\u0441\u0441\u0438\u0438 (\u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u043c\u0430\u0441\u0448\u0442\u0430\u0431)<\/figcaption><\/figure>\n<p>       \u0414\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u0438\u043b\u044c &#8212; &#8216;Stamen Terrain\u2019 (\u0442\u0438\u0441\u043d\u0435\u043d\u0438\u0435 \u043c\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u0438). \u042d\u0442\u043e\u0442 \u0441\u0442\u0438\u043b\u044c \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u0442\u0435\u043d\u0435\u043d\u0438\u044f \u0445\u043e\u043b\u043c\u043e\u0432 \u0438 \u043f\u0440\u0438\u0440\u043e\u0434\u043d\u044b\u0445 \u0446\u0432\u0435\u0442\u043e\u0432 \u0440\u0430\u0441\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.   <\/p>\n<pre><code class=\"python\">russia_map = folium.Map(     location = [64.6863136, 97.7453061],      # \u0448\u0438\u0440\u043e\u0442\u0430 \u0438 \u0434\u043e\u043b\u0433\u043e\u0442\u0430 \u0420\u043e\u0441\u0441\u0438\u0438     zoom_start = 4,     tiles = 'Stamen Terrain' )  # display russia map russia_map<\/code><\/pre>\n<figure class=\"full-width\"><figcaption>\u0421\u0442\u0438\u043b\u044c &#8216;Stamen Terrain\u2019 \u043a\u0430\u0440\u0442\u044b  \u043c\u0438\u0440\u0430 \u0432\u043e\u043a\u0440\u0443\u0433 \u0420\u043e\u0441\u0441\u0438\u0438<\/figcaption><\/figure>\n<p> \u042d\u0442\u043e \u043a\u0430\u0440\u0442\u044b \u0441 \u0437\u0430\u0442\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0445\u043e\u043b\u043c\u043e\u0432 \u0438 \u0446\u0432\u0435\u0442\u0430\u043c\u0438 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0440\u0430\u0441\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u041e\u043d\u0438 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u044e\u0442 \u0443\u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043c\u0430\u0440\u043a\u0438\u0440\u043e\u0432\u043a\u0443 \u0438 \u043e\u0431\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043b\u0438\u043d\u0438\u0439 \u0434\u043e\u0440\u043e\u0433 \u0441 \u0434\u0432\u0443\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u043c \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435\u043c.  <\/p>\n<figure class=\"full-width\"><figcaption>\u0421\u0442\u0438\u043b\u044c &#8216;Stamen Terrain\u2019 \u043a\u0430\u0440\u0442\u044b  \u043c\u0438\u0440\u0430 \u0432\u043e\u043a\u0440\u0443\u0433 \u0420\u043e\u0441\u0441\u0438\u0438 (\u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u043c\u0430\u0441\u0448\u0442\u0430\u0431)<\/figcaption><\/figure>\n<p>\u041a\u0430\u043a \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u043c\u0430\u0440\u043a\u0435\u0440\u044b \u043f\u043e\u0432\u0435\u0440\u0445 \u043a\u0430\u0440\u0442\u044b \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439?<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u043a\u0440\u0443\u0433\u043e\u0432\u043e\u0439 \u0437\u043d\u0430\u043a \u0432 \u0446\u0435\u043d\u0442\u0440 \u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c Saint_Petersburg.<\/p>\n<p>\u042d\u0442\u0430 \u0433\u0440\u0443\u043f\u043f\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043f\u0443\u0441\u0442\u0430, \u0430 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0434\u0430\u043b\u044c\u0448\u0435 \u2014 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0435 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b (child) \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0445 \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432.<\/p>\n<p>\u0422\u0430\u043a \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c child \u0432 \u0432\u0438\u0434\u0435 \u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u043a\u0440\u0443\u0433\u043e\u0432\u043e\u0433\u043e \u0437\u043d\u0430\u043a\u0430, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0432 \u0446\u0435\u043d\u0442\u0440\u0435 \u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0443\u043a\u0430\u0436\u0435\u043c  \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0438\u0436\u0435\u0441\u0442\u043e\u044f\u0449\u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 (\u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433\u0430), \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u044f \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0448\u0438\u0440\u043e\u0442\u044b \u0438 \u0434\u043e\u043b\u0433\u043e\u0442\u044b.<\/p>\n<p>\u0418 \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u044b \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 (child) \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u0443 \u043d\u0430 \u043a\u0430\u0440\u0442\u0443 &#8212;<\/p>\n<p>\u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u043a\u0440\u0443\u0433\u043e\u0432\u043e\u0439 \u0437\u043d\u0430\u043a \u043d\u0430\u043b\u043e\u0436\u0435\u043d \u043d\u0430 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043a\u0430\u0440\u0442\u044b \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0432 \u0446\u0435\u043d\u0442\u0440 \u0433\u043e\u0440\u043e\u0434\u0430 \u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433\u0430.<\/p>\n<pre><code class=\"python\"># generate map of Russia  (\u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u0440\u0442\u0443 \u0440\u043e\u0441\u0441\u0438\u0438) russia_map = folium.Map(     location = [64.6863136, 97.7453061],    # \u0448\u0438\u0440\u043e\u0442\u0430 \u0438 \u0434\u043e\u043b\u0433\u043e\u0442\u0430 \u0420\u043e\u0441\u0441\u0438\u0438     zoom_start = 4 )  # add a red marker to Saint Petersburg # create a feature group (\u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u0439) saint_petersburg = folium.map.FeatureGroup()  # style the feature group (\u0441\u0442\u0438\u043b\u044c \u0433\u0440\u0443\u043f\u043f\u044b \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432) saint_petersburg.add_child(     folium.features.CircleMarker(         [59.938732, 30.316229], radius = 5,  # \u0448\u0438\u0440\u043e\u0442\u0430 \u0438 \u0434\u043e\u043b\u0433\u043e\u0442\u0430 \u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433\u0430         color = 'red', fill_color = 'Red'     ) )  # add the feature group to the map  (\u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043d\u0430 \u043a\u0430\u0440\u0442\u0443) russia_map.add_child(saint_petersburg)  # display russia map russia_map<\/code><\/pre>\n<figure class=\"full-width\"><figcaption>\u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u043a\u0440\u0443\u0433\u043e\u0432\u043e\u0439 \u0437\u043d\u0430\u043a \u043d\u0430\u043b\u043e\u0436\u0435\u043d \u043d\u0430 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043a\u0430\u0440\u0442\u044b \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0432 \u0446\u0435\u043d\u0442\u0440 \u0433\u043e\u0440\u043e\u0434\u0430 \u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433\u0430. <\/figcaption><\/figure>\n<p> \u0414\u0430\u0432\u0430\u0439\u0442\u0435, \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0434\u043f\u0438\u0448\u0435\u043c \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u043a\u0440\u0443\u0433\u043e\u0432\u043e\u0439 \u0437\u043d\u0430\u043a: &#8212; &#8216;\u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433, \u0432 \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u043d\u043e\u0439 \u0440\u0435\u0447\u0438 &#8212; \u041f\u0438\u0301\u0442\u0435\u0440, \u0441\u043e\u043a\u0440. &#8212; \u0421\u041f\u0431\u2019. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043c\u0430\u0440\u043a\u0435\u0440\u0430 \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0435\u0433\u043e \u043e\u043a\u043d\u0430, \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0442\u0435\u043a\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a \u044d\u0442\u043e\u043c\u0443 \u043c\u0430\u0440\u043a\u0435\u0440\u0443.   <\/p>\n<pre><code class=\"python\"># generate map of Russia russia_map = folium.Map(     location = [64.6863136, 97.7453061],    # \u0448\u0438\u0440\u043e\u0442\u0430 \u0438 \u0434\u043e\u043b\u0433\u043e\u0442\u0430 \u0420\u043e\u0441\u0441\u0438\u0438     zoom_start = 4 )  # add a red marker to Saint Petersburg # create a feature group saint_petersburg = folium.map.FeatureGroup()  # style the feature group saint_petersburg.add_child(     folium.features.CircleMarker(         [59.938732, 30.316229], radius = 5,    # \u0448\u0438\u0440\u043e\u0442\u0430 \u0438 \u0434\u043e\u043b\u0433\u043e\u0442\u0430 \u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433\u0430         color = 'red', fill_color = 'Red'     ) )  # add the feature group to the map russia_map.add_child(saint_petersburg)  # label the Marker (\u043f\u043e\u043c\u0435\u0442\u0438\u0442\u044c \u043c\u0430\u0440\u043a\u0435\u0440) folium.Marker([59.938732, 30.316229],         # \u0448\u0438\u0440\u043e\u0442\u0430 \u0438 \u0434\u043e\u043b\u0433\u043e\u0442\u0430 \u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433\u0430 popup = '\u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433, \u0432 \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u043d\u043e\u0439 \u0440\u0435\u0447\u0438 - \u041f\u0438\u0301\u0442\u0435\u0440, \u0441\u043e\u043a\u0440.- \u0421\u041f\u0431').add_to(russia_map)  # display russia map russia_map<\/code><\/pre>\n<figure class=\"full-width\"><figcaption>\u043f\u043e\u0434\u043f\u0438\u0441\u044c &#8216;\u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433, \u0432 \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u043d\u043e\u0439 \u0440\u0435\u0447\u0438 &#8212; \u041f\u0438\u0301\u0442\u0435\u0440, \u0441\u043e\u043a\u0440. &#8212; \u0421\u041f\u0431\u2019  \u043a \u043c\u0430\u0440\u043a\u0435\u0440\u0443 \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u043a\u0440\u0443\u0433\u043e\u0432\u043e\u0439 \u0437\u043d\u0430\u043a<\/figcaption><\/figure>\n<figure class=\"full-width\"><figcaption>\u043f\u043e\u0434\u043f\u0438\u0441\u044c &#8216;\u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433, \u0432 \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u043d\u043e\u0439 \u0440\u0435\u0447\u0438 &#8212; \u041f\u0438\u0301\u0442\u0435\u0440, \u0441\u043e\u043a\u0440. &#8212; \u0421\u041f\u0431\u2019  \u043a \u043c\u0430\u0440\u043a\u0435\u0440\u0443 \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u043a\u0440\u0443\u0433\u043e\u0432\u043e\u0439 \u0437\u043d\u0430\u043a (\u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u043c\u0430\u0441\u0448\u0442\u0430\u0431), c\u0442\u0438\u043b\u044c \u043a\u0430\u0440\u0442\u044b  &#8212; OpenStreetMap<\/figcaption><\/figure>\n<p> \u0414\u0430\u0432\u0430\u0439\u0442\u0435  \u0434\u043e\u0431\u0430\u0432\u0438\u043c MousePosition \u043d\u0430 \u043a\u0430\u0440\u0442\u0443, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043a\u0443\u0440\u0441\u043e\u0440\u0430 \u043c\u044b\u0448\u0438 \u043d\u0430 \u0442\u043e\u0447\u043a\u0443 \u043d\u0430 \u043a\u0430\u0440\u0442\u0435. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c,  \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u0440\u0442\u0443 \u0438 \u043b\u0435\u0433\u043a\u043e \u043d\u0430\u0439\u0442\u0438 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043b\u044e\u0431\u044b\u0445 \u0442\u043e\u0447\u0435\u043a \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440,  \u0434\u0432\u043e\u0440\u0446\u043e\u0432\u044b\u0439 \u043c\u043e\u0441\u0442, \u043b\u0438\u0442\u0435\u0439\u043d\u044b\u0439 \u043c\u043e\u0441\u0442).  <\/p>\n<pre><code class=\"python\"># Add Mouse Position to get the coordinate (Lat, Long) for a mouse over on the map formatter = \"function(num) {return L.Util.formatNum(num, 5);};\" mouse_position = MousePosition(     position='topright',     separator=' Long: ',     empty_string='NaN',     lng_first=False,     num_digits=20,     prefix='Lat:',     lat_formatter=formatter,     lng_formatter=formatter, )  russia_map.add_child(mouse_position) russia_map<\/code><\/pre>\n<figure class=\"full-width\"><figcaption>MousePosition (\u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u043b\u0435\u0432\u043e\u043c \u0443\u0433\u043b\u0443)<\/figcaption><\/figure>\n<p> \u041c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0442\u043e\u0447\u043a\u0430\u043c\u0438 \u043d\u0430 \u043a\u0430\u0440\u0442\u0435 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0448\u0438\u0440\u043e\u0442\u044b \u0438 \u0434\u043e\u043b\u0433\u043e\u0442\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043c\u0435\u0442\u043e\u0434:  <\/p>\n<pre><code class=\"python\">from math import sin, cos, sqrt, atan2, radians  def calculate_distance(lat1, lon1, lat2, lon2):     # approximate radius of earth in km     R = 6373.0      lat1 = radians(lat1)     lon1 = radians(lon1)     lat2 = radians(lat2)     lon2 = radians(lon2)      dlon = lon2 - lon1     dlat = lat2 - lat1      a = sin(dlat \/ 2)**2 + cos(lat1) * cos(lat2) * sin(dlon \/ 2)**2     c = 2 * atan2(sqrt(a), sqrt(1 - a))      distance = R * c     return distance<\/code><\/pre>\n<p>\u041e\u0442\u043c\u0435\u0442\u0438\u043c \u0442\u043e\u0447\u043a\u0443 \u043d\u0430 \u0414\u0432\u043e\u0440\u0446\u043e\u0432\u043e\u043c \u043c\u043e\u0441\u0442\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e MousePosition \u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u043c \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043e\u0442 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u043a\u0440\u0443\u0433\u043b\u043e\u0433\u043e \u043c\u0430\u0440\u043a\u0435\u0440\u0430 \u0434\u043e \u0414\u0432\u043e\u0440\u0446\u043e\u0432\u043e\u0433\u043e \u043c\u043e\u0441\u0442\u0430.<\/p>\n<pre><code class=\"python\">#Distance to Palace Bridge  \u0414\u0432\u043e\u0440\u0446\u043e\u0432\u044b\u0439 \u043c\u043e\u0441\u0442 coordinates = [     [59.93876, 30.31623],           # \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u043a\u0440\u0443\u0433\u043b\u043e\u0433\u043e \u043c\u0430\u0440\u043a\u0435\u0440\u0430     [59.94022, 30.30931]]         <\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-332926","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/332926","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=332926"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/332926\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=332926"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=332926"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=332926"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}