{"id":1125756,"date":"2025-01-08T19:54:37","date_gmt":"2025-01-08T11:54:37","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1125756.html"},"modified":"2025-01-08T19:54:39","modified_gmt":"2025-01-08T11:54:39","slug":"python%e5%a6%82%e4%bd%95%e5%9c%a8%e7%99%be%e5%ba%a6%e5%9c%b0%e5%9b%be%e4%b8%ad%e7%bb%98%e5%88%b6%e8%bd%a8%e8%bf%b9","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1125756.html","title":{"rendered":"python\u5982\u4f55\u5728\u767e\u5ea6\u5730\u56fe\u4e2d\u7ed8\u5236\u8f68\u8ff9"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25090323\/a48cd631-92a1-4eba-bc81-c26faf5bcf5e.webp\" alt=\"python\u5982\u4f55\u5728\u767e\u5ea6\u5730\u56fe\u4e2d\u7ed8\u5236\u8f68\u8ff9\" \/><\/p>\n<p><p> <strong>Python\u5728\u767e\u5ea6\u5730\u56fe\u4e2d\u7ed8\u5236\u8f68\u8ff9\u7684\u6b65\u9aa4\u5305\u62ec\uff1a\u83b7\u53d6\u767e\u5ea6\u5730\u56feAPI\u5bc6\u94a5\u3001\u51c6\u5907\u8f68\u8ff9\u6570\u636e\u3001\u4f7f\u7528Python\u5e93\uff08\u5982folium\u6216\u767e\u5ea6\u5730\u56feAPI\uff09\u3001\u5c06\u8f68\u8ff9\u7ed8\u5236\u5728\u5730\u56fe\u4e0a\u3001\u8c03\u6574\u5730\u56fe\u6837\u5f0f\u548c\u663e\u793a\u6548\u679c\u3002<\/strong>\u63a5\u4e0b\u6765\uff0c\u6211\u5c06\u8be6\u7ec6\u63cf\u8ff0\u5982\u4f55\u5b9e\u73b0\u8fd9\u4e9b\u6b65\u9aa4\u3002<\/p>\n<\/p>\n<p><h2>\u4e00\u3001\u83b7\u53d6\u767e\u5ea6\u5730\u56feAPI\u5bc6\u94a5<\/h2>\n<\/p>\n<p><p>\u5728\u4f7f\u7528\u767e\u5ea6\u5730\u56feAPI\u4e4b\u524d\uff0c\u9996\u5148\u9700\u8981\u6ce8\u518c\u767e\u5ea6\u5f00\u53d1\u8005\u8d26\u53f7\uff0c\u5e76\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u5e94\u7528\u6765\u83b7\u53d6API\u5bc6\u94a5\u3002\u8fd9\u4e00\u6b65\u9aa4\u5f88\u91cd\u8981\uff0c\u56e0\u4e3a\u6ca1\u6709API\u5bc6\u94a5\u5c31\u65e0\u6cd5\u4f7f\u7528\u767e\u5ea6\u5730\u56fe\u7684\u670d\u52a1\u3002<\/p>\n<\/p>\n<p><h3>1. \u6ce8\u518c\u767e\u5ea6\u5f00\u53d1\u8005\u8d26\u53f7<\/h3>\n<\/p>\n<p><p>\u524d\u5f80\u767e\u5ea6\u5730\u56feAPI\u5b98\u7f51\uff0c\u6ce8\u518c\u4e00\u4e2a\u5f00\u53d1\u8005\u8d26\u53f7\u3002\u5982\u679c\u5df2\u7ecf\u6709\u8d26\u53f7\uff0c\u53ef\u4ee5\u76f4\u63a5\u767b\u5f55\u3002<\/p>\n<\/p>\n<p><h3>2. \u521b\u5efa\u5e94\u7528<\/h3>\n<\/p>\n<p><p>\u767b\u5f55\u540e\uff0c\u8fdb\u5165\u63a7\u5236\u53f0\uff0c\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u5e94\u7528\u3002\u586b\u5199\u5e94\u7528\u540d\u79f0\u3001\u5e94\u7528\u7c7b\u578b\u7b49\u4fe1\u606f\u3002\u521b\u5efa\u5b8c\u6210\u540e\uff0c\u7cfb\u7edf\u4f1a\u751f\u6210\u4e00\u4e2a\u552f\u4e00\u7684API\u5bc6\u94a5\uff08AK\uff09\uff0c\u8fd9\u4e2a\u5bc6\u94a5\u5728\u540e\u7eed\u6b65\u9aa4\u4e2d\u4f1a\u7528\u5230\u3002<\/p>\n<\/p>\n<p><h2>\u4e8c\u3001\u51c6\u5907\u8f68\u8ff9\u6570\u636e<\/h2>\n<\/p>\n<p><p>\u8f68\u8ff9\u6570\u636e\u901a\u5e38\u5305\u542b\u4e00\u7cfb\u5217\u5730\u7406\u5750\u6807\uff08\u7ecf\u5ea6\u548c\u7eac\u5ea6\uff09\uff0c\u8868\u793a\u67d0\u4e2a\u5bf9\u8c61\u5728\u5730\u56fe\u4e0a\u7684\u79fb\u52a8\u8def\u5f84\u3002\u53ef\u4ee5\u4ece\u5404\u79cd\u6765\u6e90\u83b7\u53d6\u8f68\u8ff9\u6570\u636e\uff0c\u4f8b\u5982GPS\u8bbe\u5907\u3001\u79fb\u52a8\u5e94\u7528\u7b49\u3002<\/p>\n<\/p>\n<p><h3>1. \u83b7\u53d6\u8f68\u8ff9\u6570\u636e<\/h3>\n<\/p>\n<p><p>\u8f68\u8ff9\u6570\u636e\u53ef\u4ee5\u4fdd\u5b58\u5728CSV\u3001JSON\u7b49\u683c\u5f0f\u7684\u6587\u4ef6\u4e2d\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\u8f68\u8ff9\u6570\u636e\uff08JSON\u683c\u5f0f\uff09\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-json\">[<\/p>\n<p>    {&quot;lng&quot;: 116.403963, &quot;lat&quot;: 39.915119},<\/p>\n<p>    {&quot;lng&quot;: 116.404055, &quot;lat&quot;: 39.914966},<\/p>\n<p>    {&quot;lng&quot;: 116.404141, &quot;lat&quot;: 39.914822},<\/p>\n<p>    {&quot;lng&quot;: 116.404212, &quot;lat&quot;: 39.914688}<\/p>\n<p>]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>2. \u89e3\u6790\u8f68\u8ff9\u6570\u636e<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528Python\u89e3\u6790\u8f68\u8ff9\u6570\u636e\uff0c\u786e\u4fdd\u6570\u636e\u683c\u5f0f\u6b63\u786e\u3002\u53ef\u4ee5\u4f7f\u7528<code>json<\/code>\u5e93\u6765\u89e3\u6790JSON\u683c\u5f0f\u7684\u6570\u636e\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import json<\/p>\n<h2><strong>\u8bfb\u53d6\u8f68\u8ff9\u6570\u636e<\/strong><\/h2>\n<p>with open(&#39;trajectory.json&#39;, &#39;r&#39;) as f:<\/p>\n<p>    trajectory_data = json.load(f)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h2>\u4e09\u3001\u4f7f\u7528Python\u5e93\u7ed8\u5236\u8f68\u8ff9<\/h2>\n<\/p>\n<p><p>\u6709\u591a\u79cd\u65b9\u6cd5\u53ef\u4ee5\u5728\u767e\u5ea6\u5730\u56fe\u4e2d\u7ed8\u5236\u8f68\u8ff9\uff0c\u5e38\u7528\u7684\u5305\u62ec\u4f7f\u7528\u767e\u5ea6\u5730\u56feAPI\u548cfolium\u5e93\u3002<\/p>\n<\/p>\n<p><h3>1. \u4f7f\u7528\u767e\u5ea6\u5730\u56feAPI<\/h3>\n<\/p>\n<p><p>\u767e\u5ea6\u5730\u56feAPI\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u63a5\u53e3\uff0c\u53ef\u4ee5\u5728\u5730\u56fe\u4e0a\u7ed8\u5236\u5404\u79cd\u56fe\u5f62\u3002\u4e0b\u9762\u662f\u4f7f\u7528\u767e\u5ea6\u5730\u56feAPI\u7ed8\u5236\u8f68\u8ff9\u7684\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<p><h4>a. \u5f15\u5165\u767e\u5ea6\u5730\u56feAPI<\/h4>\n<\/p>\n<p><p>\u5728HTML\u6587\u4ef6\u4e2d\u5f15\u5165\u767e\u5ea6\u5730\u56feAPI\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-html\">&lt;!DOCTYPE html&gt;<\/p>\n<p>&lt;html&gt;<\/p>\n<p>&lt;head&gt;<\/p>\n<p>    &lt;meta charset=&quot;utf-8&quot;&gt;<\/p>\n<p>    &lt;title&gt;\u8f68\u8ff9\u7ed8\u5236&lt;\/title&gt;<\/p>\n<p>    &lt;script src=&quot;https:\/\/api.map.b<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>du.com\/api?v=3.0&amp;ak=\u4f60\u7684API\u5bc6\u94a5&quot;&gt;&lt;\/script&gt;<\/p>\n<p>&lt;\/head&gt;<\/p>\n<p>&lt;body&gt;<\/p>\n<p>    &lt;div id=&quot;map&quot; style=&quot;width: 100%; height: 500px;&quot;&gt;&lt;\/div&gt;<\/p>\n<p>    &lt;script&gt;<\/p>\n<p>        \/\/ \u767e\u5ea6\u5730\u56feAPI\u529f\u80fd<\/p>\n<p>        var map = new BMap.Map(&quot;map&quot;);<\/p>\n<p>        map.centerAndZoom(new BMap.Point(116.404, 39.915), 15);<\/p>\n<p>        var polyline = new BMap.Polyline([<\/p>\n<p>            new BMap.Point(116.403963, 39.915119),<\/p>\n<p>            new BMap.Point(116.404055, 39.914966),<\/p>\n<p>            new BMap.Point(116.404141, 39.914822),<\/p>\n<p>            new BMap.Point(116.404212, 39.914688)<\/p>\n<p>        ], {strokeColor:&quot;blue&quot;, strokeWeight:6, strokeOpacity:0.5});<\/p>\n<p>        map.addOverlay(polyline);<\/p>\n<p>    &lt;\/script&gt;<\/p>\n<p>&lt;\/body&gt;<\/p>\n<p>&lt;\/html&gt;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>b. \u5c06\u8f68\u8ff9\u6570\u636e\u8f6c\u6362\u4e3aBMap.Point\u5bf9\u8c61<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">points = []<\/p>\n<p>for data in trajectory_data:<\/p>\n<p>    points.append(f&#39;new BMap.Point({data[&quot;lng&quot;]}, {data[&quot;lat&quot;]})&#39;)<\/p>\n<p>points_str = &#39;,&#39;.join(points)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>c. \u52a8\u6001\u751f\u6210HTML\u6587\u4ef6<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528Python\u751f\u6210\u5305\u542b\u8f68\u8ff9\u6570\u636e\u7684HTML\u6587\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">html_content = f&quot;&quot;&quot;<\/p>\n<p>&lt;!DOCTYPE html&gt;<\/p>\n<p>&lt;html&gt;<\/p>\n<p>&lt;head&gt;<\/p>\n<p>    &lt;meta charset=&quot;utf-8&quot;&gt;<\/p>\n<p>    &lt;title&gt;\u8f68\u8ff9\u7ed8\u5236&lt;\/title&gt;<\/p>\n<p>    &lt;script src=&quot;https:\/\/api.map.baidu.com\/api?v=3.0&amp;ak=\u4f60\u7684API\u5bc6\u94a5&quot;&gt;&lt;\/script&gt;<\/p>\n<p>&lt;\/head&gt;<\/p>\n<p>&lt;body&gt;<\/p>\n<p>    &lt;div id=&quot;map&quot; style=&quot;width: 100%; height: 500px;&quot;&gt;&lt;\/div&gt;<\/p>\n<p>    &lt;script&gt;<\/p>\n<p>        \/\/ \u767e\u5ea6\u5730\u56feAPI\u529f\u80fd<\/p>\n<p>        var map = new BMap.Map(&quot;map&quot;);<\/p>\n<p>        map.centerAndZoom(new BMap.Point(116.404, 39.915), 15);<\/p>\n<p>        var polyline = new BMap.Polyline([<\/p>\n<p>            {points_str}<\/p>\n<p>        ], {{strokeColor:&quot;blue&quot;, strokeWeight:6, strokeOpacity:0.5}});<\/p>\n<p>        map.addOverlay(polyline);<\/p>\n<p>    &lt;\/script&gt;<\/p>\n<p>&lt;\/body&gt;<\/p>\n<p>&lt;\/html&gt;<\/p>\n<p>&quot;&quot;&quot;<\/p>\n<p>with open(&#39;map.html&#39;, &#39;w&#39;) as f:<\/p>\n<p>    f.write(html_content)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u751f\u6210HTML\u6587\u4ef6\u540e\uff0c\u53ef\u4ee5\u5728\u6d4f\u89c8\u5668\u4e2d\u6253\u5f00\uff0c\u67e5\u770b\u8f68\u8ff9\u7ed8\u5236\u6548\u679c\u3002<\/p>\n<\/p>\n<p><h3>2. \u4f7f\u7528Folium\u5e93<\/h3>\n<\/p>\n<p><p>Folium\u5e93\u662f\u57fa\u4e8ePython\u7684\u5730\u56fe\u53ef\u89c6\u5316\u5de5\u5177\uff0c\u652f\u6301Leaflet.js\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u5728\u5730\u56fe\u4e0a\u7ed8\u5236\u8f68\u8ff9\u3002<\/p>\n<\/p>\n<p><h4>a. \u5b89\u88c5Folium\u5e93<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528pip\u5b89\u88c5Folium\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install folium<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>b. \u4f7f\u7528Folium\u7ed8\u5236\u8f68\u8ff9<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">import folium<\/p>\n<h2><strong>\u521b\u5efa\u5730\u56fe\u5bf9\u8c61<\/strong><\/h2>\n<p>m = folium.Map(location=[39.915, 116.404], zoom_start=15)<\/p>\n<h2><strong>\u6dfb\u52a0\u8f68\u8ff9<\/strong><\/h2>\n<p>folium.PolyLine(<\/p>\n<p>    [(data[&#39;lat&#39;], data[&#39;lng&#39;]) for data in trajectory_data],<\/p>\n<p>    color=&#39;blue&#39;,<\/p>\n<p>    weight=6,<\/p>\n<p>    opacity=0.5<\/p>\n<p>).add_to(m)<\/p>\n<h2><strong>\u4fdd\u5b58\u5730\u56fe<\/strong><\/h2>\n<p>m.save(&#39;trajectory_map.html&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u751f\u6210HTML\u6587\u4ef6\u540e\uff0c\u53ef\u4ee5\u5728\u6d4f\u89c8\u5668\u4e2d\u6253\u5f00\uff0c\u67e5\u770b\u8f68\u8ff9\u7ed8\u5236\u6548\u679c\u3002<\/p>\n<\/p>\n<p><h2>\u56db\u3001\u8c03\u6574\u5730\u56fe\u6837\u5f0f\u548c\u663e\u793a\u6548\u679c<\/h2>\n<\/p>\n<p><p>\u5728\u7ed8\u5236\u8f68\u8ff9\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u8c03\u6574\u5730\u56fe\u6837\u5f0f\u548c\u663e\u793a\u6548\u679c\uff0c\u4f7f\u5730\u56fe\u66f4\u52a0\u7f8e\u89c2\u548c\u6613\u4e8e\u7406\u89e3\u3002<\/p>\n<\/p>\n<p><h3>1. \u8c03\u6574\u5730\u56fe\u6837\u5f0f<\/h3>\n<\/p>\n<p><p>\u767e\u5ea6\u5730\u56feAPI\u548cFolium\u5e93\u90fd\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u5730\u56fe\u6837\u5f0f\u9009\u9879\uff0c\u53ef\u4ee5\u6839\u636e\u9700\u6c42\u8c03\u6574\u5730\u56fe\u7684\u663e\u793a\u6548\u679c\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u66f4\u6539\u5730\u56fe\u7684\u7f29\u653e\u7ea7\u522b\u3001\u4e2d\u5fc3\u70b9\u4f4d\u7f6e\u3001\u8f68\u8ff9\u989c\u8272\u7b49\u3002<\/p>\n<\/p>\n<p><h3>2. \u6dfb\u52a0\u6807\u6ce8\u548c\u4fe1\u606f\u7a97\u53e3<\/h3>\n<\/p>\n<p><p>\u53ef\u4ee5\u5728\u8f68\u8ff9\u7684\u8d77\u70b9\u548c\u7ec8\u70b9\u6dfb\u52a0\u6807\u6ce8\u548c\u4fe1\u606f\u7a97\u53e3\uff0c\u63d0\u4f9b\u66f4\u591a\u7684\u4f4d\u7f6e\u4fe1\u606f\u3002\u4f8b\u5982\uff0c\u5728Folium\u4e2d\u53ef\u4ee5\u4f7f\u7528<code>folium.Marker<\/code>\u6dfb\u52a0\u6807\u6ce8\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u6dfb\u52a0\u8d77\u70b9\u6807\u6ce8<\/p>\n<p>folium.Marker(<\/p>\n<p>    location=[trajectory_data[0][&#39;lat&#39;], trajectory_data[0][&#39;lng&#39;]],<\/p>\n<p>    popup=&#39;\u8d77\u70b9&#39;,<\/p>\n<p>    icon=folium.Icon(color=&#39;green&#39;)<\/p>\n<p>).add_to(m)<\/p>\n<h2><strong>\u6dfb\u52a0\u7ec8\u70b9\u6807\u6ce8<\/strong><\/h2>\n<p>folium.Marker(<\/p>\n<p>    location=[trajectory_data[-1][&#39;lat&#39;], trajectory_data[-1][&#39;lng&#39;]],<\/p>\n<p>    popup=&#39;\u7ec8\u70b9&#39;,<\/p>\n<p>    icon=folium.Icon(color=&#39;red&#39;)<\/p>\n<p>).add_to(m)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h2>\u4e94\u3001\u603b\u7ed3<\/h2>\n<\/p>\n<p><p>\u901a\u8fc7\u4e0a\u8ff0\u6b65\u9aa4\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528Python\u5728\u767e\u5ea6\u5730\u56fe\u4e2d\u7ed8\u5236\u8f68\u8ff9\u3002\u5177\u4f53\u6b65\u9aa4\u5305\u62ec\uff1a\u83b7\u53d6\u767e\u5ea6\u5730\u56feAPI\u5bc6\u94a5\u3001\u51c6\u5907\u8f68\u8ff9\u6570\u636e\u3001\u4f7f\u7528Python\u5e93\uff08\u5982\u767e\u5ea6\u5730\u56feAPI\u6216Folium\uff09\u3001\u5c06\u8f68\u8ff9\u7ed8\u5236\u5728\u5730\u56fe\u4e0a\u3001\u8c03\u6574\u5730\u56fe\u6837\u5f0f\u548c\u663e\u793a\u6548\u679c\u3002\u901a\u8fc7\u8fd9\u4e9b\u6b65\u9aa4\uff0c\u53ef\u4ee5\u5b9e\u73b0\u8f68\u8ff9\u7684\u53ef\u89c6\u5316\u5c55\u793a\uff0c\u5e2e\u52a9\u7528\u6237\u66f4\u597d\u5730\u7406\u89e3\u548c\u5206\u6790\u5730\u7406\u6570\u636e\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728\u767e\u5ea6\u5730\u56fe\u4e2d\u4f7f\u7528Python\u7ed8\u5236\u8f68\u8ff9\uff1f<\/strong><br \/>\u8981\u5728\u767e\u5ea6\u5730\u56fe\u4e2d\u7ed8\u5236\u8f68\u8ff9\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u767e\u5ea6\u5730\u56fe\u7684API\u4e0ePython\u7ed3\u5408\u3002\u9996\u5148\uff0c\u60a8\u9700\u8981\u83b7\u53d6\u767e\u5ea6\u5730\u56fe\u7684API\u5bc6\u94a5\uff0c\u7136\u540e\u4f7f\u7528Python\u7684requests\u5e93\u5411API\u53d1\u9001\u8bf7\u6c42\u3002\u901a\u8fc7\u4f20\u9012\u5750\u6807\u6570\u636e\uff0c\u60a8\u53ef\u4ee5\u5728\u5730\u56fe\u4e0a\u7ed8\u5236\u51fa\u60a8\u7684\u8f68\u8ff9\u3002<\/p>\n<p><strong>\u9700\u8981\u54ea\u4e9b\u5e93\u6765\u5b9e\u73b0Python\u4e0e\u767e\u5ea6\u5730\u56fe\u7684\u4ea4\u4e92\uff1f<\/strong><br \/>\u4e3a\u4e86\u5b9e\u73b0Python\u4e0e\u767e\u5ea6\u5730\u56fe\u7684\u4ea4\u4e92\uff0c\u63a8\u8350\u4f7f\u7528requests\u5e93\u6765\u5904\u7406HTTP\u8bf7\u6c42\uff0c\u4ee5\u53capandas\u5e93\u6765\u5904\u7406\u6570\u636e\u3002\u5982\u679c\u9700\u8981\u53ef\u89c6\u5316\uff0c\u53ef\u4ee5\u8003\u8651\u4f7f\u7528folium\u5e93\uff0c\u8fd9\u80fd\u5e2e\u52a9\u60a8\u5c06\u8f68\u8ff9\u6570\u636e\u4ee5\u5730\u56fe\u5f62\u5f0f\u5c55\u793a\u3002<\/p>\n<p><strong>\u5982\u4f55\u5904\u7406\u8f68\u8ff9\u6570\u636e\u4ee5\u9002\u5e94\u767e\u5ea6\u5730\u56fe\u7684\u683c\u5f0f\uff1f<\/strong><br \/>\u5728\u7ed8\u5236\u8f68\u8ff9\u4e4b\u524d\uff0c\u786e\u4fdd\u60a8\u7684\u5750\u6807\u6570\u636e\u683c\u5f0f\u6b63\u786e\u3002\u767e\u5ea6\u5730\u56fe\u901a\u5e38\u4f7f\u7528\u7ecf\u7eac\u5ea6\u683c\u5f0f\uff08\u5982\uff1alatitude, longitude\uff09\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528Python\u7684pandas\u5e93\u5bf9\u6570\u636e\u8fdb\u884c\u6e05\u6d17\u548c\u683c\u5f0f\u5316\uff0c\u5c06\u5176\u8f6c\u6362\u4e3a\u7b26\u5408\u767e\u5ea6\u5730\u56feAPI\u8981\u6c42\u7684\u683c\u5f0f\uff0c\u4ee5\u786e\u4fdd\u8f68\u8ff9\u80fd\u591f\u6b63\u786e\u663e\u793a\u5728\u5730\u56fe\u4e0a\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u5728\u767e\u5ea6\u5730\u56fe\u4e2d\u7ed8\u5236\u8f68\u8ff9\u7684\u6b65\u9aa4\u5305\u62ec\uff1a\u83b7\u53d6\u767e\u5ea6\u5730\u56feAPI\u5bc6\u94a5\u3001\u51c6\u5907\u8f68\u8ff9\u6570\u636e\u3001\u4f7f\u7528Python\u5e93\uff08\u5982fol [&hellip;]","protected":false},"author":3,"featured_media":1125767,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1125756"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1125756"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1125756\/revisions"}],"predecessor-version":[{"id":1125768,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1125756\/revisions\/1125768"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1125767"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1125756"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1125756"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1125756"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}