Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.

Commit a4cfc8b

Browse files
committed
Display data in example notebook
1 parent 0dad001 commit a4cfc8b

File tree

1 file changed

+35
-10
lines changed

1 file changed

+35
-10
lines changed

examples/module-3/my-website/example.ipynb

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
},
4242
{
4343
"cell_type": "code",
44-
"execution_count": 2,
44+
"execution_count": 4,
4545
"id": "d348e3a7-7147-410b-b989-a44cd6c25003",
4646
"metadata": {},
4747
"outputs": [
@@ -75,7 +75,7 @@
7575
" <meta name="viewport" content="width=device-width,\n",
7676
" initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />\n",
7777
" <style>\n",
78-
" #map_db6b2a790e8b7b530f758fd8b5d54570 {\n",
78+
" #map_7d7bee40b0b83301271bae879a97f8da {\n",
7979
" position: relative;\n",
8080
" width: 100.0%;\n",
8181
" height: 100.0%;\n",
@@ -89,14 +89,14 @@
8989
"<body>\n",
9090
" \n",
9191
" \n",
92-
" <div class="folium-map" id="map_db6b2a790e8b7b530f758fd8b5d54570" ></div>\n",
92+
" <div class="folium-map" id="map_7d7bee40b0b83301271bae879a97f8da" ></div>\n",
9393
" \n",
9494
"</body>\n",
9595
"<script>\n",
9696
" \n",
9797
" \n",
98-
" var map_db6b2a790e8b7b530f758fd8b5d54570 = L.map(\n",
99-
" "map_db6b2a790e8b7b530f758fd8b5d54570",\n",
98+
" var map_7d7bee40b0b83301271bae879a97f8da = L.map(\n",
99+
" "map_7d7bee40b0b83301271bae879a97f8da",\n",
100100
" {\n",
101101
" center: [40.00979778909886, -105.24215679549545],\n",
102102
" crs: L.CRS.EPSG3857,\n",
@@ -113,7 +113,7 @@
113113
"\n",
114114
" \n",
115115
" \n",
116-
" var tile_layer_7e89f557b1613d618db2bf55d4469506 = L.tileLayer(\n",
116+
" var tile_layer_bbfa1640fd85c36bb3f6987f90a57901 = L.tileLayer(\n",
117117
" "https://tile.openstreetmap.org/{z}/{x}/{y}.png",\n",
118118
" {\n",
119119
" "minZoom": 0,\n",
@@ -130,16 +130,40 @@
130130
" );\n",
131131
" \n",
132132
" \n",
133-
" tile_layer_7e89f557b1613d618db2bf55d4469506.addTo(map_db6b2a790e8b7b530f758fd8b5d54570);\n",
133+
" tile_layer_bbfa1640fd85c36bb3f6987f90a57901.addTo(map_7d7bee40b0b83301271bae879a97f8da);\n",
134+
" \n",
135+
" \n",
136+
"\n",
137+
" function geo_json_7f5ccb0865024fb1735b7bab3d93a68b_onEachFeature(feature, layer) {\n",
138+
" layer.on({\n",
139+
" });\n",
140+
" };\n",
141+
" var geo_json_7f5ccb0865024fb1735b7bab3d93a68b = L.geoJson(null, {\n",
142+
" onEachFeature: geo_json_7f5ccb0865024fb1735b7bab3d93a68b_onEachFeature,\n",
143+
" \n",
144+
" ...{\n",
145+
"}\n",
146+
" });\n",
147+
"\n",
148+
" function geo_json_7f5ccb0865024fb1735b7bab3d93a68b_add (data) {\n",
149+
" geo_json_7f5ccb0865024fb1735b7bab3d93a68b\n",
150+
" .addData(data);\n",
151+
" }\n",
152+
" geo_json_7f5ccb0865024fb1735b7bab3d93a68b_add({"crs": {"properties": {"name": "urn:ogc:def:crs:OGC:1.3:CRS84"}, "type": "name"}, "features": [{"geometry": {"coordinates": [-105.24206599999948, 40.01007767367196], "type": "Point"}, "properties": {"Address": "4001 Discovery Dr., Boulder, CO", "Name": "Sustainability, Energy, and Environment Community (SEEC) Building"}, "type": "Feature"}, {"geometry": {"coordinates": [-105.25271574468819, 40.01262175838934], "type": "Point"}, "properties": {"Address": "National Snow and Ice Data Center CIRES, 449 UCB University of Colorado Boulder", "Name": "National Snow and Ice Data Center (NSIDC)"}, "type": "Feature"}], "name": "seec_and_nsidc", "type": "FeatureCollection"});\n",
153+
" geo_json_7f5ccb0865024fb1735b7bab3d93a68b.setStyle(function(feature) {return feature.properties.style;});\n",
154+
"\n",
155+
" \n",
156+
" \n",
157+
" geo_json_7f5ccb0865024fb1735b7bab3d93a68b.addTo(map_7d7bee40b0b83301271bae879a97f8da);\n",
134158
" \n",
135159
"</script>\n",
136160
"&lt;/html&gt;\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
137161
],
138162
"text/plain": [
139-
"<folium.folium.Map at 0x7443344cd160>"
163+
"<folium.folium.Map at 0x7fa03e1d19f0>"
140164
]
141165
},
142-
"execution_count": 2,
166+
"execution_count": 4,
143167
"metadata": {},
144168
"output_type": "execute_result"
145169
}
@@ -148,6 +172,7 @@
148172
"import folium\n",
149173
"\n",
150174
"m = folium.Map(location=(40.00979778909886, -105.24215679549545), zoom_start=14)\n",
175+
"folium.GeoJson(\"seec_and_nsidc.json\").add_to(m)\n",
151176
"m"
152177
]
153178
},
@@ -199,7 +224,7 @@
199224
"name": "python",
200225
"nbconvert_exporter": "python",
201226
"pygments_lexer": "ipython3",
202-
"version": "3.13.3"
227+
"version": "3.10.16"
203228
}
204229
},
205230
"nbformat": 4,

0 commit comments

Comments
 (0)