Skip to content

Commit d2522bb

Browse files
committed
Clean up notebook
1 parent d3afdf5 commit d2522bb

File tree

1 file changed

+0
-336
lines changed

1 file changed

+0
-336
lines changed

examples/notebooks/71_aws_s3.ipynb

-336
Original file line numberDiff line numberDiff line change
@@ -143,349 +143,13 @@
143143
"source": [
144144
"leafmap.s3_download_files(items[:2], outdir=\"maxar\")"
145145
]
146-
},
147-
{
148-
"cell_type": "code",
149-
"execution_count": null,
150-
"id": "d6e80fee",
151-
"metadata": {},
152-
"outputs": [],
153-
"source": [
154-
"import rasterio"
155-
]
156-
},
157-
{
158-
"cell_type": "code",
159-
"execution_count": null,
160-
"id": "09c5c2d3",
161-
"metadata": {},
162-
"outputs": [],
163-
"source": [
164-
"s3_path = 's3://maxar-opendata/events/Kahramanmaras-turkey-earthquake-23/ard/36/120022103023/2023-02-21/104001008314FC00-ms.tif'"
165-
]
166-
},
167-
{
168-
"cell_type": "code",
169-
"execution_count": null,
170-
"id": "9f8d0589",
171-
"metadata": {},
172-
"outputs": [],
173-
"source": [
174-
"src = rasterio.open(s3_path)\n",
175-
"print(src.meta)"
176-
]
177-
},
178-
{
179-
"cell_type": "code",
180-
"execution_count": null,
181-
"id": "089a43e5",
182-
"metadata": {},
183-
"outputs": [],
184-
"source": [
185-
"import os\n",
186-
"from ipyleaflet import Map\n",
187-
"from localtileserver import TileClient, get_leaflet_tile_layer\n",
188-
"\n",
189-
"# os.environ[\"AWS_ACCESS_KEY_ID\"] = \"AKIA2PSJOUOFLLPCTJKE\"\n",
190-
"# os.environ[\"AWS_SECRET_ACCESS_KEY\"] = \"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\"\n",
191-
"\n",
192-
"src = 's3://maxar-opendata/events/Kahramanmaras-turkey-earthquake-23/ard/36/120022103023/2023-02-21/104001008314FC00-ms.tif'\n",
193-
"client = TileClient(src)\n",
194-
"t = get_leaflet_tile_layer(client, indexes=[1, 2, 3])\n",
195-
"m = Map(center=client.center(), zoom=client.default_zoom)\n",
196-
"m.add_layer(t)\n",
197-
"m\n"
198-
]
199-
},
200-
{
201-
"cell_type": "code",
202-
"execution_count": null,
203-
"id": "53616e27",
204-
"metadata": {},
205-
"outputs": [],
206-
"source": [
207-
"m.layers"
208-
]
209-
},
210-
{
211-
"cell_type": "code",
212-
"execution_count": null,
213-
"id": "5de348b5",
214-
"metadata": {},
215-
"outputs": [],
216-
"source": [
217-
"import leafmap"
218-
]
219-
},
220-
{
221-
"cell_type": "code",
222-
"execution_count": null,
223-
"id": "405f7a7a",
224-
"metadata": {},
225-
"outputs": [],
226-
"source": [
227-
"m = leafmap.Map()\n",
228-
"m.add_raster(src)\n",
229-
"m"
230-
]
231-
},
232-
{
233-
"cell_type": "code",
234-
"execution_count": null,
235-
"id": "f6ea91c1",
236-
"metadata": {},
237-
"outputs": [],
238-
"source": [
239-
"m.layers"
240-
]
241-
},
242-
{
243-
"cell_type": "code",
244-
"execution_count": null,
245-
"id": "106d0230",
246-
"metadata": {},
247-
"outputs": [],
248-
"source": []
249-
},
250-
{
251-
"cell_type": "code",
252-
"execution_count": null,
253-
"id": "19825d3f",
254-
"metadata": {},
255-
"outputs": [],
256-
"source": []
257-
},
258-
{
259-
"cell_type": "code",
260-
"execution_count": null,
261-
"id": "703ccee5",
262-
"metadata": {},
263-
"outputs": [],
264-
"source": [
265-
"import os\n",
266-
"from ipyleaflet import Map\n",
267-
"from localtileserver import TileClient, get_leaflet_tile_layer\n",
268-
"\n",
269-
"os.environ[\"AWS_ACCESS_KEY_ID\"] = \"AKIA2PSJOUOFLLPCTJKE\"\n",
270-
"os.environ[\"AWS_SECRET_ACCESS_KEY\"] = \"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\"\n",
271-
"os.environ[\"AWS_REQUEST_PAYER\"] = \"requester\"\n",
272-
"\n",
273-
"src = 's3://naip-analytic/tn/2021/60cm/rgbir_cog/34084/m_3408401_ne_16_060_20210404.tif'\n",
274-
"client = TileClient(src)\n",
275-
"t = get_leaflet_tile_layer(client, indexes=[1, 2, 3])\n",
276-
"m = Map(center=client.center(), zoom=client.default_zoom)\n",
277-
"m.add_layer(t)\n",
278-
"m"
279-
]
280-
},
281-
{
282-
"cell_type": "code",
283-
"execution_count": null,
284-
"id": "168f503a",
285-
"metadata": {},
286-
"outputs": [],
287-
"source": [
288-
"src = 's3://maxar-opendata/events/Kahramanmaras-turkey-earthquake-23/ard/36/120022103023/2023-02-21/104001008314FC00-ms.tif'\n",
289-
"src = 's3://naip-analytic/tn/2021/60cm/rgbir_cog/34084/m_3408401_ne_16_060_20210404.tif'\n",
290-
"client = TileClient(src)\n",
291-
"t = get_leaflet_tile_layer(client, indexes=[1, 2, 3])\n",
292-
"m = Map(center=client.center(), zoom=client.default_zoom)\n",
293-
"m.add_layer(t)\n",
294-
"m"
295-
]
296-
},
297-
{
298-
"cell_type": "code",
299-
"execution_count": null,
300-
"id": "4cc5a753",
301-
"metadata": {},
302-
"outputs": [],
303-
"source": []
304-
},
305-
{
306-
"cell_type": "code",
307-
"execution_count": 1,
308-
"id": "7fde406a",
309-
"metadata": {},
310-
"outputs": [
311-
{
312-
"data": {
313-
"application/vnd.jupyter.widget-view+json": {
314-
"model_id": "20b486d09cdb46f39aa9ebfdb09ccd3e",
315-
"version_major": 2,
316-
"version_minor": 0
317-
},
318-
"text/plain": [
319-
"Map(center=[37.0458025, 35.3333195], controls=(ZoomControl(options=['position', 'zoom_in_text', 'zoom_in_title…"
320-
]
321-
},
322-
"metadata": {},
323-
"output_type": "display_data"
324-
}
325-
],
326-
"source": [
327-
"import os\n",
328-
"from ipyleaflet import Map\n",
329-
"from localtileserver import TileClient, get_leaflet_tile_layer\n",
330-
"\n",
331-
"os.environ[\"AWS_ACCESS_KEY_ID\"] = \"AKIA2PSJOUOFLLPCTJKE\"\n",
332-
"os.environ[\"AWS_SECRET_ACCESS_KEY\"] = \"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\"\n",
333-
"\n",
334-
"src = 's3://maxar-opendata/events/Kahramanmaras-turkey-earthquake-23/ard/36/120022103023/2023-02-21/104001008314FC00-ms.tif'\n",
335-
"client = TileClient(src)\n",
336-
"t = get_leaflet_tile_layer(client, indexes=[1, 2, 3])\n",
337-
"m = Map(center=client.center(), zoom=client.default_zoom)\n",
338-
"m.add_layer(t)\n",
339-
"m"
340-
]
341-
},
342-
{
343-
"cell_type": "code",
344-
"execution_count": null,
345-
"id": "729cc9f2",
346-
"metadata": {},
347-
"outputs": [],
348-
"source": [
349-
"m.layers"
350-
]
351-
},
352-
{
353-
"cell_type": "code",
354-
"execution_count": null,
355-
"id": "8e1679dd",
356-
"metadata": {},
357-
"outputs": [],
358-
"source": [
359-
"import os\n",
360-
"import leafmap\n",
361-
"\n",
362-
"os.environ[\"AWS_ACCESS_KEY_ID\"] = \"AKIA2PSJOUOFLLPCTJKE\"\n",
363-
"os.environ[\"AWS_SECRET_ACCESS_KEY\"] = \"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\"\n",
364-
"\n",
365-
"src = 's3://maxar-opendata/events/Kahramanmaras-turkey-earthquake-23/ard/36/120022103023/2023-02-21/104001008314FC00-ms.tif'\n",
366-
"m = leafmap.Map()\n",
367-
"m.add_raster(src, layer_name=\"Maxar\", vmin=0, vmax=100)\n",
368-
"m"
369-
]
370-
},
371-
{
372-
"cell_type": "code",
373-
"execution_count": null,
374-
"id": "bed51bff",
375-
"metadata": {},
376-
"outputs": [],
377-
"source": [
378-
"m.layers"
379-
]
380-
},
381-
{
382-
"cell_type": "code",
383-
"execution_count": null,
384-
"id": "9d632233",
385-
"metadata": {},
386-
"outputs": [],
387-
"source": [
388-
"from localtileserver import get_leaflet_tile_layer, examples\n",
389-
"from ipyleaflet import Map\n",
390-
"\n",
391-
"client = examples.get_san_francisco()\n",
392-
"t = get_leaflet_tile_layer(client, vmin=50,vmax=100)\n",
393-
"m = Map(center=client.center(), zoom=client.default_zoom)\n",
394-
"m.add(t)\n",
395-
"m"
396-
]
397-
},
398-
{
399-
"cell_type": "code",
400-
"execution_count": null,
401-
"id": "43b08ecc",
402-
"metadata": {},
403-
"outputs": [],
404-
"source": []
405-
},
406-
{
407-
"cell_type": "code",
408-
"execution_count": null,
409-
"id": "24682abc",
410-
"metadata": {},
411-
"outputs": [],
412-
"source": [
413-
"m.layers"
414-
]
415-
},
416-
{
417-
"cell_type": "code",
418-
"execution_count": null,
419-
"id": "3cdf78ad",
420-
"metadata": {},
421-
"outputs": [],
422-
"source": [
423-
"m.layers[-1].loading=False"
424-
]
425-
},
426-
{
427-
"cell_type": "code",
428-
"execution_count": null,
429-
"id": "2f362e21",
430-
"metadata": {},
431-
"outputs": [],
432-
"source": [
433-
"import os\n",
434-
"import leafmap"
435-
]
436-
},
437-
{
438-
"cell_type": "code",
439-
"execution_count": null,
440-
"id": "460f5e3a",
441-
"metadata": {},
442-
"outputs": [],
443-
"source": [
444-
"os.environ[\"AWS_ACCESS_KEY_ID\"] = \"AKIA2PSJOUOFLLPCTJKE\"\n",
445-
"os.environ[\"AWS_SECRET_ACCESS_KEY\"] = \"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\"\n",
446-
"# os.environ[\"AWS_REQUEST_PAYER\"] = \"requester\""
447-
]
448-
},
449-
{
450-
"cell_type": "code",
451-
"execution_count": null,
452-
"id": "03372960",
453-
"metadata": {},
454-
"outputs": [],
455-
"source": [
456-
"m = leafmap.Map()\n",
457-
"src = 's3://maxar-opendata/events/Kahramanmaras-turkey-earthquake-23/ard/36/120022103023/2023-02-21/104001008314FC00-ms.tif'\n",
458-
"# src = 's3://naip-analytic/tn/2021/60cm/rgbir_cog/34084/m_3408401_ne_16_060_20210404.tif'\n",
459-
"m.add_raster(src, layer_name=\"Image\", show_loading=True)\n",
460-
"m"
461-
]
462-
},
463-
{
464-
"cell_type": "code",
465-
"execution_count": null,
466-
"id": "717f9223",
467-
"metadata": {},
468-
"outputs": [],
469-
"source": []
470146
}
471147
],
472148
"metadata": {
473149
"kernelspec": {
474150
"display_name": "Python 3",
475151
"language": "python",
476152
"name": "python3"
477-
},
478-
"language_info": {
479-
"codemirror_mode": {
480-
"name": "ipython",
481-
"version": 3
482-
},
483-
"file_extension": ".py",
484-
"mimetype": "text/x-python",
485-
"name": "python",
486-
"nbconvert_exporter": "python",
487-
"pygments_lexer": "ipython3",
488-
"version": "3.11.7"
489153
}
490154
},
491155
"nbformat": 4,

0 commit comments

Comments
 (0)