From 9ccbdd1a439ce63a0ddf30d12ea3d3c39eed32e7 Mon Sep 17 00:00:00 2001 From: Luigi Selmi Date: Tue, 19 Dec 2023 13:04:56 +0100 Subject: [PATCH] map --- python/iia/air_quality_arctic.ipynb | 52 ++++++++++++++--------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/python/iia/air_quality_arctic.ipynb b/python/iia/air_quality_arctic.ipynb index d098885..30889aa 100755 --- a/python/iia/air_quality_arctic.ipynb +++ b/python/iia/air_quality_arctic.ipynb @@ -65,7 +65,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 58, "id": "9f6d5549-aeb0-43c8-bd35-42589980e860", "metadata": {}, "outputs": [ @@ -99,7 +99,7 @@ " <meta name="viewport" content="width=device-width,\n", " initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />\n", " <style>\n", - " #map_729787c084b4637e8d001331df209529 {\n", + " #map_423a277392cf5947297e69f0df7809d7 {\n", " position: relative;\n", " width: 100.0%;\n", " height: 100.0%;\n", @@ -129,14 +129,14 @@ "<body>\n", " \n", " \n", - " <div class="folium-map" id="map_729787c084b4637e8d001331df209529" ></div>\n", + " <div class="folium-map" id="map_423a277392cf5947297e69f0df7809d7" ></div>\n", " \n", "</body>\n", "<script>\n", " \n", " \n", - " var map_729787c084b4637e8d001331df209529 = L.map(\n", - " "map_729787c084b4637e8d001331df209529",\n", + " var map_423a277392cf5947297e69f0df7809d7 = L.map(\n", + " "map_423a277392cf5947297e69f0df7809d7",\n", " {\n", " center: [66.87965, 1.8474000000000004],\n", " crs: L.CRS.EPSG3857,\n", @@ -145,71 +145,71 @@ " preferCanvas: false,\n", " }\n", " );\n", - " L.control.scale().addTo(map_729787c084b4637e8d001331df209529);\n", + " L.control.scale().addTo(map_423a277392cf5947297e69f0df7809d7);\n", "\n", " \n", "\n", " \n", " \n", - " var tile_layer_132cfe0a4b3e20446cf3f7423d98cece = L.tileLayer(\n", + " var tile_layer_6cd4916f0f6dd202ef7e1f18b92b78eb = L.tileLayer(\n", " "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",\n", " {"attribution": "Data by \\u0026copy; \\u003ca target=\\"_blank\\" href=\\"http://openstreetmap.org\\"\\u003eOpenStreetMap\\u003c/a\\u003e, under \\u003ca target=\\"_blank\\" href=\\"http://www.openstreetmap.org/copyright\\"\\u003eODbL\\u003c/a\\u003e.", "detectRetina": false, "maxNativeZoom": 18, "maxZoom": 18, "minZoom": 0, "noWrap": false, "opacity": 1, "subdomains": "abc", "tms": false}\n", - " ).addTo(map_729787c084b4637e8d001331df209529);\n", + " ).addTo(map_423a277392cf5947297e69f0df7809d7);\n", " \n", " \n", - " function geo_json_b374b0c29b82b26c76856f22975244a7_styler(feature) {\n", + " function geo_json_c2fb411c62f9d58b8d7836cf20166bcf_styler(feature) {\n", " switch(feature.id) {\n", " default:\n", " return {"fillOpacity": 0.5, "weight": 2};\n", " }\n", " }\n", - " function geo_json_b374b0c29b82b26c76856f22975244a7_highlighter(feature) {\n", + " function geo_json_c2fb411c62f9d58b8d7836cf20166bcf_highlighter(feature) {\n", " switch(feature.id) {\n", " default:\n", " return {"fillOpacity": 0.75};\n", " }\n", " }\n", - " function geo_json_b374b0c29b82b26c76856f22975244a7_pointToLayer(feature, latlng) {\n", + " function geo_json_c2fb411c62f9d58b8d7836cf20166bcf_pointToLayer(feature, latlng) {\n", " var opts = {"bubblingMouseEvents": true, "color": "#3388ff", "dashArray": null, "dashOffset": null, "fill": true, "fillColor": "#3388ff", "fillOpacity": 0.2, "fillRule": "evenodd", "lineCap": "round", "lineJoin": "round", "opacity": 1.0, "radius": "3", "stroke": true, "weight": 3};\n", " \n", - " let style = geo_json_b374b0c29b82b26c76856f22975244a7_styler(feature)\n", + " let style = geo_json_c2fb411c62f9d58b8d7836cf20166bcf_styler(feature)\n", " Object.assign(opts, style)\n", " \n", " return new L.CircleMarker(latlng, opts)\n", " }\n", "\n", - " function geo_json_b374b0c29b82b26c76856f22975244a7_onEachFeature(feature, layer) {\n", + " function geo_json_c2fb411c62f9d58b8d7836cf20166bcf_onEachFeature(feature, layer) {\n", " layer.on({\n", " mouseout: function(e) {\n", " if(typeof e.target.setStyle === "function"){\n", - " geo_json_b374b0c29b82b26c76856f22975244a7.resetStyle(e.target);\n", + " geo_json_c2fb411c62f9d58b8d7836cf20166bcf.resetStyle(e.target);\n", " }\n", " },\n", " mouseover: function(e) {\n", " if(typeof e.target.setStyle === "function"){\n", - " const highlightStyle = geo_json_b374b0c29b82b26c76856f22975244a7_highlighter(e.target.feature)\n", + " const highlightStyle = geo_json_c2fb411c62f9d58b8d7836cf20166bcf_highlighter(e.target.feature)\n", " e.target.setStyle(highlightStyle);\n", " }\n", " },\n", " });\n", " };\n", - " var geo_json_b374b0c29b82b26c76856f22975244a7 = L.geoJson(null, {\n", - " onEachFeature: geo_json_b374b0c29b82b26c76856f22975244a7_onEachFeature,\n", + " var geo_json_c2fb411c62f9d58b8d7836cf20166bcf = L.geoJson(null, {\n", + " onEachFeature: geo_json_c2fb411c62f9d58b8d7836cf20166bcf_onEachFeature,\n", " \n", - " style: geo_json_b374b0c29b82b26c76856f22975244a7_styler,\n", - " pointToLayer: geo_json_b374b0c29b82b26c76856f22975244a7_pointToLayer\n", + " style: geo_json_c2fb411c62f9d58b8d7836cf20166bcf_styler,\n", + " pointToLayer: geo_json_c2fb411c62f9d58b8d7836cf20166bcf_pointToLayer\n", " });\n", "\n", - " function geo_json_b374b0c29b82b26c76856f22975244a7_add (data) {\n", - " geo_json_b374b0c29b82b26c76856f22975244a7\n", + " function geo_json_c2fb411c62f9d58b8d7836cf20166bcf_add (data) {\n", + " geo_json_c2fb411c62f9d58b8d7836cf20166bcf\n", " .addData(data)\n", - " .addTo(map_729787c084b4637e8d001331df209529);\n", + " .addTo(map_423a277392cf5947297e69f0df7809d7);\n", " }\n", - " geo_json_b374b0c29b82b26c76856f22975244a7_add({"bbox": [-21.889, 64.105, 25.5838, 69.6543], "features": [{"bbox": [-21.7754, 64.3613, -21.7754, 64.3613], "geometry": {"coordinates": [-21.7754, 64.3613], "type": "Point"}, "id": "0", "properties": {"Station": "Grundartangi Groef"}, "type": "Feature"}, {"bbox": [-21.889, 64.105, -21.889, 64.105], "geometry": {"coordinates": [-21.889, 64.105], "type": "Point"}, "id": "1", "properties": {"Station": "Kopavogur Dalsmari"}, "type": "Feature"}, {"bbox": [25.5838, 65.0662, 25.5838, 65.0662], "geometry": {"coordinates": [25.5838, 65.0662], "type": "Point"}, "id": "2", "properties": {"Station": "Pyykoesjaervi Oulu"}, "type": "Feature"}, {"bbox": [25.4694, 65.0159, 25.4694, 65.0159], "geometry": {"coordinates": [25.4694, 65.0159], "type": "Point"}, "id": "3", "properties": {"Station": "Oulu Keskusta 2"}, "type": "Feature"}, {"bbox": [18.9564, 69.6543, 18.9564, 69.6543], "geometry": {"coordinates": [18.9564, 69.6543], "type": "Point"}, "id": "4", "properties": {"Station": "Tromso Rambergan"}, "type": "Feature"}, {"bbox": [24.1167, 67.9671, 24.1167, 67.9671], "geometry": {"coordinates": [24.1167, 67.9671], "type": "Point"}, "id": "5", "properties": {"Station": "Muonio Sammaltunturi"}, "type": "Feature"}], "type": "FeatureCollection"});\n", + " geo_json_c2fb411c62f9d58b8d7836cf20166bcf_add({"bbox": [-21.889, 64.105, 25.5838, 69.6543], "features": [{"bbox": [-21.7754, 64.3613, -21.7754, 64.3613], "geometry": {"coordinates": [-21.7754, 64.3613], "type": "Point"}, "id": "0", "properties": {"Station": "Grundartangi Groef"}, "type": "Feature"}, {"bbox": [-21.889, 64.105, -21.889, 64.105], "geometry": {"coordinates": [-21.889, 64.105], "type": "Point"}, "id": "1", "properties": {"Station": "Kopavogur Dalsmari"}, "type": "Feature"}, {"bbox": [25.5838, 65.0662, 25.5838, 65.0662], "geometry": {"coordinates": [25.5838, 65.0662], "type": "Point"}, "id": "2", "properties": {"Station": "Pyykoesjaervi Oulu"}, "type": "Feature"}, {"bbox": [25.4694, 65.0159, 25.4694, 65.0159], "geometry": {"coordinates": [25.4694, 65.0159], "type": "Point"}, "id": "3", "properties": {"Station": "Oulu Keskusta 2"}, "type": "Feature"}, {"bbox": [18.9564, 69.6543, 18.9564, 69.6543], "geometry": {"coordinates": [18.9564, 69.6543], "type": "Point"}, "id": "4", "properties": {"Station": "Tromso Rambergan"}, "type": "Feature"}, {"bbox": [24.1167, 67.9671, 24.1167, 67.9671], "geometry": {"coordinates": [24.1167, 67.9671], "type": "Point"}, "id": "5", "properties": {"Station": "Muonio Sammaltunturi"}, "type": "Feature"}], "type": "FeatureCollection"});\n", "\n", " \n", " \n", - " geo_json_b374b0c29b82b26c76856f22975244a7.bindTooltip(\n", + " geo_json_c2fb411c62f9d58b8d7836cf20166bcf.bindTooltip(\n", " function(layer){\n", " let div = L.DomUtil.create('div');\n", " \n", @@ -236,10 +236,10 @@ "</html>\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" allowfullscreen webkitallowfullscreen mozallowfullscreen>" ], "text/plain": [ - "" + "" ] }, - "execution_count": 2, + "execution_count": 58, "metadata": {}, "output_type": "execute_result" }