Skip to content

Commit 650e4b3

Browse files
authored
Clean up notebook output (#1287)
1 parent 57d225b commit 650e4b3

1 file changed

Lines changed: 7 additions & 302 deletions

File tree

docs/notebooks/112_quackosm.ipynb

Lines changed: 7 additions & 302 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
},
2929
{
3030
"cell_type": "code",
31-
"execution_count": 1,
31+
"execution_count": null,
3232
"id": "2",
3333
"metadata": {},
3434
"outputs": [],
@@ -49,157 +49,10 @@
4949
},
5050
{
5151
"cell_type": "code",
52-
"execution_count": 2,
52+
"execution_count": null,
5353
"id": "4",
5454
"metadata": {},
55-
"outputs": [
56-
{
57-
"name": "stderr",
58-
"output_type": "stream",
59-
"text": [
60-
"100%|█████████████████████████████████████| 1.07M/1.07M [00:00<00:00, 1.19GB/s]\n"
61-
]
62-
},
63-
{
64-
"data": {
65-
"application/vnd.jupyter.widget-view+json": {
66-
"model_id": "d86535f55d0a44929deed140e9c6f6bc",
67-
"version_major": 2,
68-
"version_minor": 0
69-
},
70-
"text/plain": [
71-
"Output()"
72-
]
73-
},
74-
"metadata": {},
75-
"output_type": "display_data"
76-
},
77-
{
78-
"data": {
79-
"text/html": [
80-
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"></pre>\n"
81-
],
82-
"text/plain": []
83-
},
84-
"metadata": {},
85-
"output_type": "display_data"
86-
},
87-
{
88-
"data": {
89-
"text/html": [
90-
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n",
91-
"</pre>\n"
92-
],
93-
"text/plain": [
94-
"\n"
95-
]
96-
},
97-
"metadata": {},
98-
"output_type": "display_data"
99-
},
100-
{
101-
"data": {
102-
"text/html": [
103-
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">Finished operation in <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\">0:00:06</span>\n",
104-
"</pre>\n"
105-
],
106-
"text/plain": [
107-
"Finished operation in \u001b[1;33m0:00:06\u001b[0m\n"
108-
]
109-
},
110-
"metadata": {},
111-
"output_type": "display_data"
112-
},
113-
{
114-
"name": "stdout",
115-
"output_type": "stream",
116-
"text": [
117-
"Downloaded 9284 features\n"
118-
]
119-
},
120-
{
121-
"data": {
122-
"text/html": [
123-
"<div>\n",
124-
"<style scoped>\n",
125-
" .dataframe tbody tr th:only-of-type {\n",
126-
" vertical-align: middle;\n",
127-
" }\n",
128-
"\n",
129-
" .dataframe tbody tr th {\n",
130-
" vertical-align: top;\n",
131-
" }\n",
132-
"\n",
133-
" .dataframe thead th {\n",
134-
" text-align: right;\n",
135-
" }\n",
136-
"</style>\n",
137-
"<table border=\"1\" class=\"dataframe\">\n",
138-
" <thead>\n",
139-
" <tr style=\"text-align: right;\">\n",
140-
" <th></th>\n",
141-
" <th>tags</th>\n",
142-
" <th>geometry</th>\n",
143-
" </tr>\n",
144-
" <tr>\n",
145-
" <th>feature_id</th>\n",
146-
" <th></th>\n",
147-
" <th></th>\n",
148-
" </tr>\n",
149-
" </thead>\n",
150-
" <tbody>\n",
151-
" <tr>\n",
152-
" <th>way/30837497</th>\n",
153-
" <td>{'admin_level': '2', 'border_type': 'territori...</td>\n",
154-
" <td>LINESTRING (7.41852 43.72476, 7.41937 43.72259...</td>\n",
155-
" </tr>\n",
156-
" <tr>\n",
157-
" <th>way/37811849</th>\n",
158-
" <td>{'admin_level': '8', 'boundary': 'administrati...</td>\n",
159-
" <td>LINESTRING (7.3902 43.72642, 7.39023 43.72641,...</td>\n",
160-
" </tr>\n",
161-
" <tr>\n",
162-
" <th>way/257071645</th>\n",
163-
" <td>{'highway': 'residential', 'name': 'Avenue Jac...</td>\n",
164-
" <td>LINESTRING (7.41018 43.72903, 7.41009 43.729, ...</td>\n",
165-
" </tr>\n",
166-
" <tr>\n",
167-
" <th>way/63020063</th>\n",
168-
" <td>{'building': 'yes'}</td>\n",
169-
" <td>POLYGON ((7.40945 43.72938, 7.40942 43.72934, ...</td>\n",
170-
" </tr>\n",
171-
" <tr>\n",
172-
" <th>way/63022174</th>\n",
173-
" <td>{'building': 'yes'}</td>\n",
174-
" <td>POLYGON ((7.40968 43.72927, 7.40962 43.72923, ...</td>\n",
175-
" </tr>\n",
176-
" </tbody>\n",
177-
"</table>\n",
178-
"</div>"
179-
],
180-
"text/plain": [
181-
" tags \\\n",
182-
"feature_id \n",
183-
"way/30837497 {'admin_level': '2', 'border_type': 'territori... \n",
184-
"way/37811849 {'admin_level': '8', 'boundary': 'administrati... \n",
185-
"way/257071645 {'highway': 'residential', 'name': 'Avenue Jac... \n",
186-
"way/63020063 {'building': 'yes'} \n",
187-
"way/63022174 {'building': 'yes'} \n",
188-
"\n",
189-
" geometry \n",
190-
"feature_id \n",
191-
"way/30837497 LINESTRING (7.41852 43.72476, 7.41937 43.72259... \n",
192-
"way/37811849 LINESTRING (7.3902 43.72642, 7.39023 43.72641,... \n",
193-
"way/257071645 LINESTRING (7.41018 43.72903, 7.41009 43.729, ... \n",
194-
"way/63020063 POLYGON ((7.40945 43.72938, 7.40942 43.72934, ... \n",
195-
"way/63022174 POLYGON ((7.40968 43.72927, 7.40962 43.72923, ... "
196-
]
197-
},
198-
"execution_count": 2,
199-
"metadata": {},
200-
"output_type": "execute_result"
201-
}
202-
],
55+
"outputs": [],
20356
"source": [
20457
"# Download all OSM features for Monaco\n",
20558
"gdf = osm.quackosm_gdf_from_place(\"Monaco\")\n",
@@ -217,26 +70,10 @@
21770
},
21871
{
21972
"cell_type": "code",
220-
"execution_count": 3,
73+
"execution_count": null,
22174
"id": "6",
22275
"metadata": {},
223-
"outputs": [
224-
{
225-
"data": {
226-
"application/vnd.jupyter.widget-view+json": {
227-
"model_id": "5686b0611604437a95ccf3fa9a602ead",
228-
"version_major": 2,
229-
"version_minor": 0
230-
},
231-
"text/plain": [
232-
"Map(center=[20, 0], controls=(ZoomControl(options=['position', 'zoom_in_text', 'zoom_in_title', 'zoom_out_text…"
233-
]
234-
},
235-
"execution_count": 3,
236-
"metadata": {},
237-
"output_type": "execute_result"
238-
}
239-
],
76+
"outputs": [],
24077
"source": [
24178
"m = leafmap.Map()\n",
24279
"m.add_gdf(gdf, layer_name=\"Monaco OSM\")\n",
@@ -255,142 +92,10 @@
25592
},
25693
{
25794
"cell_type": "code",
258-
"execution_count": 4,
95+
"execution_count": null,
25996
"id": "8",
26097
"metadata": {},
261-
"outputs": [
262-
{
263-
"data": {
264-
"application/vnd.jupyter.widget-view+json": {
265-
"model_id": "7e8188b7e74a4def9f52b2e01ff20336",
266-
"version_major": 2,
267-
"version_minor": 0
268-
},
269-
"text/plain": [
270-
"Output()"
271-
]
272-
},
273-
"metadata": {},
274-
"output_type": "display_data"
275-
},
276-
{
277-
"data": {
278-
"text/html": [
279-
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"></pre>\n"
280-
],
281-
"text/plain": []
282-
},
283-
"metadata": {},
284-
"output_type": "display_data"
285-
},
286-
{
287-
"data": {
288-
"text/html": [
289-
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n",
290-
"</pre>\n"
291-
],
292-
"text/plain": [
293-
"\n"
294-
]
295-
},
296-
"metadata": {},
297-
"output_type": "display_data"
298-
},
299-
{
300-
"data": {
301-
"text/html": [
302-
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">Finished operation in <span style=\"color: #808000; text-decoration-color: #808000; font-weight: bold\">0:00:04</span>\n",
303-
"</pre>\n"
304-
],
305-
"text/plain": [
306-
"Finished operation in \u001b[1;33m0:00:04\u001b[0m\n"
307-
]
308-
},
309-
"metadata": {},
310-
"output_type": "display_data"
311-
},
312-
{
313-
"name": "stdout",
314-
"output_type": "stream",
315-
"text": [
316-
"Downloaded 1261 buildings\n"
317-
]
318-
},
319-
{
320-
"data": {
321-
"text/html": [
322-
"<div>\n",
323-
"<style scoped>\n",
324-
" .dataframe tbody tr th:only-of-type {\n",
325-
" vertical-align: middle;\n",
326-
" }\n",
327-
"\n",
328-
" .dataframe tbody tr th {\n",
329-
" vertical-align: top;\n",
330-
" }\n",
331-
"\n",
332-
" .dataframe thead th {\n",
333-
" text-align: right;\n",
334-
" }\n",
335-
"</style>\n",
336-
"<table border=\"1\" class=\"dataframe\">\n",
337-
" <thead>\n",
338-
" <tr style=\"text-align: right;\">\n",
339-
" <th></th>\n",
340-
" <th>building</th>\n",
341-
" <th>geometry</th>\n",
342-
" </tr>\n",
343-
" <tr>\n",
344-
" <th>feature_id</th>\n",
345-
" <th></th>\n",
346-
" <th></th>\n",
347-
" </tr>\n",
348-
" </thead>\n",
349-
" <tbody>\n",
350-
" <tr>\n",
351-
" <th>way/63020063</th>\n",
352-
" <td>yes</td>\n",
353-
" <td>POLYGON ((7.40945 43.72938, 7.40942 43.72934, ...</td>\n",
354-
" </tr>\n",
355-
" <tr>\n",
356-
" <th>way/63022174</th>\n",
357-
" <td>yes</td>\n",
358-
" <td>POLYGON ((7.40968 43.72927, 7.40962 43.72923, ...</td>\n",
359-
" </tr>\n",
360-
" <tr>\n",
361-
" <th>way/1020764928</th>\n",
362-
" <td>yes</td>\n",
363-
" <td>POLYGON ((7.40953 43.72944, 7.40951 43.72942, ...</td>\n",
364-
" </tr>\n",
365-
" <tr>\n",
366-
" <th>way/335197691</th>\n",
367-
" <td>yes</td>\n",
368-
" <td>POLYGON ((7.40973 43.73004, 7.40977 43.73009, ...</td>\n",
369-
" </tr>\n",
370-
" <tr>\n",
371-
" <th>way/1020764924</th>\n",
372-
" <td>yes</td>\n",
373-
" <td>POLYGON ((7.40972 43.7297, 7.40971 43.72969, 7...</td>\n",
374-
" </tr>\n",
375-
" </tbody>\n",
376-
"</table>\n",
377-
"</div>"
378-
],
379-
"text/plain": [
380-
" building geometry\n",
381-
"feature_id \n",
382-
"way/63020063 yes POLYGON ((7.40945 43.72938, 7.40942 43.72934, ...\n",
383-
"way/63022174 yes POLYGON ((7.40968 43.72927, 7.40962 43.72923, ...\n",
384-
"way/1020764928 yes POLYGON ((7.40953 43.72944, 7.40951 43.72942, ...\n",
385-
"way/335197691 yes POLYGON ((7.40973 43.73004, 7.40977 43.73009, ...\n",
386-
"way/1020764924 yes POLYGON ((7.40972 43.7297, 7.40971 43.72969, 7..."
387-
]
388-
},
389-
"execution_count": 4,
390-
"metadata": {},
391-
"output_type": "execute_result"
392-
}
393-
],
98+
"outputs": [],
39499
"source": [
395100
"# Download only buildings in Monaco\n",
396101
"buildings = osm.quackosm_gdf_from_place(\"Monaco\", tags={\"building\": True})\n",

0 commit comments

Comments
 (0)