Skip to content

Commit

Permalink
map
Browse files Browse the repository at this point in the history
  • Loading branch information
luigiselmi committed Dec 19, 2023
1 parent ff59460 commit 9ccbdd1
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions python/iia/air_quality_arctic.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 58,
"id": "9f6d5549-aeb0-43c8-bd35-42589980e860",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -236,10 +236,10 @@
"&lt;/html&gt;\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
],
"text/plain": [
"<folium.folium.Map at 0x23fb6304210>"
"<folium.folium.Map at 0x23fc0eb64d0>"
]
},
"execution_count": 2,
"execution_count": 58,
"metadata": {},
"output_type": "execute_result"
}
Expand Down

0 comments on commit 9ccbdd1

Please sign in to comment.