Last active
August 7, 2023 09:51
-
-
Save sbscully/c024c31c49ecfea8579f20bf025b50db to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Jupyter Notebook Geocoding Tutorial" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"This is a tutorial for using the OpenCage Geocoding API in a Python Jupyter Notebook.\n", | |
"\n", | |
"Before you can query the API you will need to [sign up for an OpenCage API key](https://opencagedata.com/users/sign_up).\n", | |
"\n", | |
"Once you've done that we recommend you spend five minutes on:\n", | |
"- [playing with the demo page](https://opencagedata.com/demo), so that you see the actual response the API returns.\n", | |
"- [browsing the API documentation](https://opencagedata.com/api), so you understand the various [optional parameters](https://opencagedata.com/api#forward-opt), [possible response codes](https://opencagedata.com/api#codes), and the [rate limiting](https://opencagedata.com/api#rate-limiting) on free trial accounts" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Install the OpenCage Python module\n", | |
"\n", | |
"Install with pip, compatible with Python 3.7+.\n", | |
"\n", | |
"`% pip install opencage`\n", | |
"\n", | |
"- [OpenCageGeocode on github](https://github.com/opencagedata/python-opencage-geocoder)\n", | |
"- [OpenCageGeocode on python package index](https://pypi.python.org/pypi/opencage/)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Initialize geocoder" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"from opencage.geocoder import OpenCageGeocode\n", | |
"from pprint import pprint" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Replace `YOUR-API-KEY` below with the OpenCage API key for your account." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"key = 'YOUR-API-KEY'\n", | |
"geocoder = OpenCageGeocode(key)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Geocode coordinate" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"metadata": { | |
"scrolled": true | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"[{'annotations': {'DMS': {'lat': \"44° 49' 49.11132'' N\",\n", | |
" 'lng': \"0° 34' 34.28796'' E\"},\n", | |
" 'MGRS': '30TXQ9159666958',\n", | |
" 'Maidenhead': 'IN94rt09ug',\n", | |
" 'Mercator': {'x': -64141.3, 'y': 5564710.789},\n", | |
" 'NUTS': {'NUTS0': {'code': 'FR'},\n", | |
" 'NUTS1': {'code': 'FRI'},\n", | |
" 'NUTS2': {'code': 'FRI1'},\n", | |
" 'NUTS3': {'code': 'FRI12'}},\n", | |
" 'OSM': {'edit_url': 'https://www.openstreetmap.org/edit?node=2754853042#map=16/44.83031/-0.57619',\n", | |
" 'note_url': 'https://www.openstreetmap.org/note/new#map=16/44.83031/-0.57619&layers=N',\n", | |
" 'url': 'https://www.openstreetmap.org/?mlat=44.83031&mlon=-0.57619#map=16/44.83031/-0.57619'},\n", | |
" 'UN_M49': {'regions': {'EUROPE': '150',\n", | |
" 'FR': '250',\n", | |
" 'WESTERN_EUROPE': '155',\n", | |
" 'WORLD': '001'},\n", | |
" 'statistical_groupings': ['MEDC']},\n", | |
" 'callingcode': 33,\n", | |
" 'currency': {'alternate_symbols': [],\n", | |
" 'decimal_mark': ',',\n", | |
" 'html_entity': '€',\n", | |
" 'iso_code': 'EUR',\n", | |
" 'iso_numeric': '978',\n", | |
" 'name': 'Euro',\n", | |
" 'smallest_denomination': 1,\n", | |
" 'subunit': 'Cent',\n", | |
" 'subunit_to_unit': 100,\n", | |
" 'symbol': '€',\n", | |
" 'symbol_first': 0,\n", | |
" 'thousands_separator': '.'},\n", | |
" 'flag': '🇫🇷',\n", | |
" 'geohash': 'ezzx4ch7mz0zbyftcpdf',\n", | |
" 'qibla': 111.75,\n", | |
" 'roadinfo': {'drive_on': 'right',\n", | |
" 'road': 'Rue Sauteyron',\n", | |
" 'speed_in': 'km/h'},\n", | |
" 'sun': {'rise': {'apparent': 1691384160,\n", | |
" 'astronomical': 1691376960,\n", | |
" 'civil': 1691382180,\n", | |
" 'nautical': 1691379720},\n", | |
" 'set': {'apparent': 1691436000,\n", | |
" 'astronomical': 1691443140,\n", | |
" 'civil': 1691437920,\n", | |
" 'nautical': 1691440380}},\n", | |
" 'timezone': {'name': 'Europe/Paris',\n", | |
" 'now_in_dst': 1,\n", | |
" 'offset_sec': 7200,\n", | |
" 'offset_string': '+0200',\n", | |
" 'short_name': 'CEST'},\n", | |
" 'what3words': {'words': 'advice.quiet.surveyed'}},\n", | |
" 'bounds': {'northeast': {'lat': 44.8303587, 'lng': -0.5761411},\n", | |
" 'southwest': {'lat': 44.8302587, 'lng': -0.5762411}},\n", | |
" 'components': {'ISO_3166-1_alpha-2': 'FR',\n", | |
" 'ISO_3166-1_alpha-3': 'FRA',\n", | |
" 'ISO_3166-2': ['FR-NAQ', 'FR-33'],\n", | |
" '_category': 'building',\n", | |
" '_type': 'building',\n", | |
" 'city': 'Bordeaux',\n", | |
" 'continent': 'Europe',\n", | |
" 'country': 'France',\n", | |
" 'country_code': 'fr',\n", | |
" 'county': 'Gironde',\n", | |
" 'house_number': '11',\n", | |
" 'municipality': 'Bordeaux',\n", | |
" 'political_union': 'European Union',\n", | |
" 'postcode': '33000',\n", | |
" 'region': 'Metropolitan France',\n", | |
" 'road': 'Rue Sauteyron',\n", | |
" 'state': 'Nouvelle-Aquitaine',\n", | |
" 'state_code': 'NAQ',\n", | |
" 'suburb': 'Victoire'},\n", | |
" 'confidence': 10,\n", | |
" 'formatted': '11 Rue Sauteyron, 33000 Bordeaux, France',\n", | |
" 'geometry': {'lat': 44.8303087, 'lng': -0.5761911}}]\n" | |
] | |
} | |
], | |
"source": [ | |
"results = geocoder.reverse_geocode(44.8303087, -0.5761911)\n", | |
"pprint(results)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Set output language, error handling" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"11 Rue Sauteyron, 33000 Bordeaux, Frankreich\n" | |
] | |
} | |
], | |
"source": [ | |
"from opencage.geocoder import RateLimitExceededError\n", | |
"\n", | |
"try:\n", | |
" results = geocoder.reverse_geocode(44.8303087, -0.5761911, language='de', no_annotation='1')\n", | |
" if results and len(results):\n", | |
" print(results[0]['formatted'])\n", | |
"except RateLimitExceededError as ex:\n", | |
" print(ex)\n", | |
" # Your rate limit has expired ...\n", | |
" # Upgrade on https://opencagedata.com/pricing" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Lookup coordinates from postal address " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 5, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"45.796933;15.981894;hr;Europe/Zagreb\n" | |
] | |
} | |
], | |
"source": [ | |
"query = u'Bosutska ulica 10, Trnje, Zagreb, Croatia'\n", | |
"results = geocoder.geocode(query)\n", | |
"\n", | |
"print(u'%f;%f;%s;%s' % (results[0]['geometry']['lat'], \n", | |
" results[0]['geometry']['lng'],\n", | |
" results[0]['components']['country_code'],\n", | |
" results[0]['annotations']['timezone']['name']))" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Plot geocoded address on a map" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Install [ipyleaflet](https://github.com/jupyter-widgets/ipyleaflet)\n", | |
"\n", | |
"`% pip install ipyleaflet`" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 6, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"from ipyleaflet import *" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 7, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"results = geocoder.geocode(u'Brussels, Belgium')\n", | |
"center = (results[0]['geometry']['lat'], results[0]['geometry']['lng'])" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 8, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"application/vnd.jupyter.widget-view+json": { | |
"model_id": "853dab2c900543189419f7aee9f6268d", | |
"version_major": 2, | |
"version_minor": 0 | |
}, | |
"text/plain": [ | |
"Map(center=[50.8465573, 4.351697], controls=(ZoomControl(options=['position', 'zoom_in_text', 'zoom_in_title',…" | |
] | |
}, | |
"execution_count": 8, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"map = Map(center=center, zoom=6)\n", | |
"marker = Marker(location=center, draggable=False)\n", | |
"map.add_layer(marker)\n", | |
"\n", | |
"map" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Alternative Python modules" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"You can also access the OpenCage geocoder via Denis Carriere's [geocoder library](https://github.com/DenisCarriere/geocoder). Here is a [code sample](https://github.com/OpenCageData/opencagedata-misc-docs/blob/master/code-samples/python-geocoder.md) showing how to query our API using python geocoder." | |
] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 3", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.11.4" | |
}, | |
"widgets": { | |
"application/vnd.jupyter.widget-state+json": { | |
"state": { | |
"027324bf21bb49a7a2026ffba3eb4908": { | |
"model_module": "jupyter-leaflet", | |
"model_module_version": "~0.10.1", | |
"model_name": "LeafletMarkerModel", | |
"state": { | |
"_model_module_version": "~0.10.1", | |
"_view_count": null, | |
"_view_module_version": "~0.10.1", | |
"draggable": false, | |
"location": [ | |
50.8465573, | |
4.351697 | |
], | |
"options": [ | |
"alt", | |
"draggable", | |
"keyboard", | |
"rise_offset", | |
"rise_on_hover", | |
"rotation_angle", | |
"rotation_origin", | |
"title", | |
"z_index_offset" | |
] | |
} | |
}, | |
"229b5f9d69ff4ff4b3e2a3c282494a15": { | |
"model_module": "jupyter-leaflet", | |
"model_module_version": "~0.10.1", | |
"model_name": "LeafletMarkerModel", | |
"state": { | |
"_model_module_version": "~0.10.1", | |
"_view_count": null, | |
"_view_module_version": "~0.10.1", | |
"draggable": false, | |
"location": [ | |
50.8465573, | |
4.351697 | |
], | |
"options": [ | |
"alt", | |
"draggable", | |
"keyboard", | |
"rise_offset", | |
"rise_on_hover", | |
"rotation_angle", | |
"rotation_origin", | |
"title", | |
"z_index_offset" | |
] | |
} | |
}, | |
"25eafc79d1f14352a8dabd93040acac6": { | |
"model_module": "jupyter-leaflet", | |
"model_module_version": "~0.10.1", | |
"model_name": "LeafletTileLayerModel", | |
"state": { | |
"_model_module_version": "~0.10.1", | |
"_view_count": null, | |
"_view_module_version": "~0.10.1", | |
"base": true, | |
"max_zoom": 19, | |
"min_zoom": 1, | |
"options": [ | |
"attribution", | |
"detect_retina", | |
"max_zoom", | |
"min_zoom", | |
"tile_size" | |
] | |
} | |
}, | |
"36372ae876474aabb80d0ddbef5387a0": { | |
"model_module": "@jupyter-widgets/base", | |
"model_module_version": "1.1.0", | |
"model_name": "LayoutModel", | |
"state": {} | |
}, | |
"43177cea57304510b7ab7ca38eaa6350": { | |
"model_module": "jupyter-leaflet", | |
"model_module_version": "~0.10.1", | |
"model_name": "LeafletTileLayerModel", | |
"state": { | |
"_model_module_version": "~0.10.1", | |
"_view_count": null, | |
"_view_module_version": "~0.10.1", | |
"base": true, | |
"max_zoom": 19, | |
"min_zoom": 1, | |
"options": [ | |
"attribution", | |
"detect_retina", | |
"max_zoom", | |
"min_zoom", | |
"tile_size" | |
] | |
} | |
}, | |
"4a6ab2f73fbe480199fb696bdbd5ffbd": { | |
"model_module": "jupyter-leaflet", | |
"model_module_version": "~0.10.1", | |
"model_name": "LeafletTileLayerModel", | |
"state": { | |
"_model_module_version": "~0.10.1", | |
"_view_count": null, | |
"_view_module_version": "~0.10.1", | |
"attribution": "Tiles © Esri — Copyright: ©2012 DeLorme", | |
"base": true, | |
"max_zoom": 11, | |
"min_zoom": 1, | |
"name": "Esri.DeLorme", | |
"options": [ | |
"attribution", | |
"detect_retina", | |
"max_zoom", | |
"min_zoom", | |
"tile_size" | |
], | |
"url": "http://server.arcgisonline.com/ArcGIS/rest/services/Specialty/DeLorme_World_Base_Map/MapServer/tile/{z}/{y}/{x}" | |
} | |
}, | |
"4f8a717f7790451da054f8bb12fc20fd": { | |
"model_module": "jupyter-leaflet", | |
"model_module_version": "~0.10.1", | |
"model_name": "LeafletMapModel", | |
"state": { | |
"_dom_classes": [], | |
"_model_module_version": "~0.10.1", | |
"_view_count": null, | |
"_view_module_version": "~0.10.1", | |
"basemap": { | |
"attribution": "Map data (c) <a href=\"https://openstreetmap.org\">OpenStreetMap</a> contributors", | |
"max_zoom": 19, | |
"url": "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" | |
}, | |
"center": [ | |
50.84757295365389, | |
4.372558593750001 | |
], | |
"east": -180, | |
"interpolation": "bilinear", | |
"layers": [ | |
"IPY_MODEL_89c97986ec31450aa6dab9ef0ba32ef3", | |
"IPY_MODEL_229b5f9d69ff4ff4b3e2a3c282494a15" | |
], | |
"layout": "IPY_MODEL_36372ae876474aabb80d0ddbef5387a0", | |
"modisdate": "yesterday", | |
"north": -90, | |
"options": [ | |
"attribution_control", | |
"basemap", | |
"bounce_at_zoom_limits", | |
"box_zoom", | |
"center", | |
"close_popup_on_click", | |
"double_click_zoom", | |
"dragging", | |
"inertia", | |
"inertia_deceleration", | |
"inertia_max_speed", | |
"interpolation", | |
"keyboard", | |
"keyboard_pan_offset", | |
"keyboard_zoom_offset", | |
"max_zoom", | |
"min_zoom", | |
"scroll_wheel_zoom", | |
"tap", | |
"tap_tolerance", | |
"touch_zoom", | |
"world_copy_jump", | |
"zoom", | |
"zoom_animation_threshold", | |
"zoom_control", | |
"zoom_start" | |
], | |
"south": 90, | |
"west": 180, | |
"zoom": 6 | |
} | |
}, | |
"54b2e746bb2f44e5b39599e50240ddf5": { | |
"model_module": "jupyter-leaflet", | |
"model_module_version": "~0.10.1", | |
"model_name": "LeafletMapModel", | |
"state": { | |
"_dom_classes": [], | |
"_model_module_version": "~0.10.1", | |
"_view_count": null, | |
"_view_module_version": "~0.10.1", | |
"basemap": { | |
"attribution": "Map data (c) <a href=\"https://openstreetmap.org\">OpenStreetMap</a> contributors", | |
"max_zoom": 19, | |
"url": "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" | |
}, | |
"center": [ | |
50.8465573, | |
4.351697 | |
], | |
"east": 12.94189453125, | |
"interpolation": "bilinear", | |
"layers": [ | |
"IPY_MODEL_25eafc79d1f14352a8dabd93040acac6", | |
"IPY_MODEL_027324bf21bb49a7a2026ffba3eb4908" | |
], | |
"layout": "IPY_MODEL_8b7732f6622544cbbcc360ca16ffb59c", | |
"modisdate": "yesterday", | |
"north": 53.54030739150022, | |
"options": [ | |
"attribution_control", | |
"basemap", | |
"bounce_at_zoom_limits", | |
"box_zoom", | |
"center", | |
"close_popup_on_click", | |
"double_click_zoom", | |
"dragging", | |
"inertia", | |
"inertia_deceleration", | |
"inertia_max_speed", | |
"interpolation", | |
"keyboard", | |
"keyboard_pan_offset", | |
"keyboard_zoom_offset", | |
"max_zoom", | |
"min_zoom", | |
"scroll_wheel_zoom", | |
"tap", | |
"tap_tolerance", | |
"touch_zoom", | |
"world_copy_jump", | |
"zoom", | |
"zoom_animation_threshold", | |
"zoom_control", | |
"zoom_start" | |
], | |
"south": 47.989921667414194, | |
"west": -4.218750000000001, | |
"zoom": 6 | |
} | |
}, | |
"596b1b7ed0f34ca4a27c7468190d1ae1": { | |
"model_module": "jupyter-leaflet", | |
"model_module_version": "~0.10.1", | |
"model_name": "LeafletTileLayerModel", | |
"state": { | |
"_model_module_version": "~0.10.1", | |
"_view_count": null, | |
"_view_module_version": "~0.10.1", | |
"attribution": "Tiles © Esri — Copyright: ©2012 DeLorme", | |
"base": true, | |
"max_zoom": 11, | |
"min_zoom": 1, | |
"name": "Esri.DeLorme", | |
"options": [ | |
"attribution", | |
"detect_retina", | |
"max_zoom", | |
"min_zoom", | |
"tile_size" | |
], | |
"url": "http://server.arcgisonline.com/ArcGIS/rest/services/Specialty/DeLorme_World_Base_Map/MapServer/tile/{z}/{y}/{x}" | |
} | |
}, | |
"72877760c1744c9ab7320bf5912a275b": { | |
"model_module": "jupyter-leaflet", | |
"model_module_version": "~0.10.1", | |
"model_name": "LeafletMarkerModel", | |
"state": { | |
"_model_module_version": "~0.10.1", | |
"_view_count": null, | |
"_view_module_version": "~0.10.1", | |
"draggable": false, | |
"location": [ | |
50.8465573, | |
4.351697 | |
], | |
"options": [ | |
"alt", | |
"draggable", | |
"keyboard", | |
"rise_offset", | |
"rise_on_hover", | |
"rotation_angle", | |
"rotation_origin", | |
"title", | |
"z_index_offset" | |
] | |
} | |
}, | |
"7a7cf44c74e6477ab217a399c628d410": { | |
"model_module": "jupyter-leaflet", | |
"model_module_version": "~0.10.1", | |
"model_name": "LeafletMapModel", | |
"state": { | |
"_dom_classes": [], | |
"_model_module_version": "~0.10.1", | |
"_view_count": null, | |
"_view_module_version": "~0.10.1", | |
"basemap": { | |
"attribution": "Tiles © Esri — Copyright: ©2012 DeLorme", | |
"max_zoom": 11, | |
"min_zoom": 1, | |
"name": "Esri.DeLorme", | |
"url": "http://server.arcgisonline.com/ArcGIS/rest/services/Specialty/DeLorme_World_Base_Map/MapServer/tile/{z}/{y}/{x}" | |
}, | |
"center": [ | |
52, | |
10 | |
], | |
"interpolation": "bilinear", | |
"layers": [ | |
"IPY_MODEL_596b1b7ed0f34ca4a27c7468190d1ae1" | |
], | |
"layout": "IPY_MODEL_8ddcdc3eadc54a1bab17b10d038d13d0", | |
"modisdate": "yesterday", | |
"options": [ | |
"attribution_control", | |
"basemap", | |
"bounce_at_zoom_limits", | |
"box_zoom", | |
"center", | |
"close_popup_on_click", | |
"double_click_zoom", | |
"dragging", | |
"inertia", | |
"inertia_deceleration", | |
"inertia_max_speed", | |
"interpolation", | |
"keyboard", | |
"keyboard_pan_offset", | |
"keyboard_zoom_offset", | |
"max_zoom", | |
"min_zoom", | |
"scroll_wheel_zoom", | |
"tap", | |
"tap_tolerance", | |
"touch_zoom", | |
"world_copy_jump", | |
"zoom", | |
"zoom_animation_threshold", | |
"zoom_control", | |
"zoom_start" | |
], | |
"zoom": 10 | |
} | |
}, | |
"84efcd37c41947518765bec185b211e3": { | |
"model_module": "@jupyter-widgets/base", | |
"model_module_version": "1.1.0", | |
"model_name": "LayoutModel", | |
"state": {} | |
}, | |
"89c5081268a3411596d5395733319435": { | |
"model_module": "@jupyter-widgets/base", | |
"model_module_version": "1.1.0", | |
"model_name": "LayoutModel", | |
"state": {} | |
}, | |
"89c97986ec31450aa6dab9ef0ba32ef3": { | |
"model_module": "jupyter-leaflet", | |
"model_module_version": "~0.10.1", | |
"model_name": "LeafletTileLayerModel", | |
"state": { | |
"_model_module_version": "~0.10.1", | |
"_view_count": null, | |
"_view_module_version": "~0.10.1", | |
"base": true, | |
"max_zoom": 19, | |
"min_zoom": 1, | |
"options": [ | |
"attribution", | |
"detect_retina", | |
"max_zoom", | |
"min_zoom", | |
"tile_size" | |
] | |
} | |
}, | |
"8b7732f6622544cbbcc360ca16ffb59c": { | |
"model_module": "@jupyter-widgets/base", | |
"model_module_version": "1.1.0", | |
"model_name": "LayoutModel", | |
"state": {} | |
}, | |
"8ddcdc3eadc54a1bab17b10d038d13d0": { | |
"model_module": "@jupyter-widgets/base", | |
"model_module_version": "1.1.0", | |
"model_name": "LayoutModel", | |
"state": {} | |
}, | |
"a07931fe99b042eebc1c840b30429c7d": { | |
"model_module": "jupyter-leaflet", | |
"model_module_version": "~0.10.1", | |
"model_name": "LeafletMapModel", | |
"state": { | |
"_dom_classes": [], | |
"_model_module_version": "~0.10.1", | |
"_view_count": null, | |
"_view_module_version": "~0.10.1", | |
"basemap": { | |
"attribution": "Map data (c) <a href=\"https://openstreetmap.org\">OpenStreetMap</a> contributors", | |
"max_zoom": 19, | |
"url": "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" | |
}, | |
"center": [ | |
51.09662294502995, | |
5.152587890625001 | |
], | |
"east": 13.732910156250002, | |
"interpolation": "bilinear", | |
"layers": [ | |
"IPY_MODEL_43177cea57304510b7ab7ca38eaa6350", | |
"IPY_MODEL_72877760c1744c9ab7320bf5912a275b" | |
], | |
"layout": "IPY_MODEL_d90af3b583ab4010a445984eaab3c0e9", | |
"modisdate": "yesterday", | |
"north": 53.77468884583577, | |
"options": [ | |
"attribution_control", | |
"basemap", | |
"bounce_at_zoom_limits", | |
"box_zoom", | |
"center", | |
"close_popup_on_click", | |
"double_click_zoom", | |
"dragging", | |
"inertia", | |
"inertia_deceleration", | |
"inertia_max_speed", | |
"interpolation", | |
"keyboard", | |
"keyboard_pan_offset", | |
"keyboard_zoom_offset", | |
"max_zoom", | |
"min_zoom", | |
"scroll_wheel_zoom", | |
"tap", | |
"tap_tolerance", | |
"touch_zoom", | |
"world_copy_jump", | |
"zoom", | |
"zoom_animation_threshold", | |
"zoom_control", | |
"zoom_start" | |
], | |
"south": 48.25394114463434, | |
"west": -3.4277343750000004, | |
"zoom": 6 | |
} | |
}, | |
"a5109e5349344e15ad149ce2969d9ad0": { | |
"model_module": "jupyter-leaflet", | |
"model_module_version": "~0.10.1", | |
"model_name": "LeafletMapModel", | |
"state": { | |
"_dom_classes": [], | |
"_model_module_version": "~0.10.1", | |
"_view_count": null, | |
"_view_module_version": "~0.10.1", | |
"basemap": { | |
"attribution": "Tiles © Esri — Copyright: ©2012 DeLorme", | |
"max_zoom": 11, | |
"min_zoom": 1, | |
"name": "Esri.DeLorme", | |
"url": "http://server.arcgisonline.com/ArcGIS/rest/services/Specialty/DeLorme_World_Base_Map/MapServer/tile/{z}/{y}/{x}" | |
}, | |
"center": [ | |
52, | |
10 | |
], | |
"interpolation": "bilinear", | |
"layers": [ | |
"IPY_MODEL_de50cf9629cf4b4a9b5e76b1aeb52deb" | |
], | |
"layout": "IPY_MODEL_84efcd37c41947518765bec185b211e3", | |
"modisdate": "yesterday", | |
"options": [ | |
"attribution_control", | |
"basemap", | |
"bounce_at_zoom_limits", | |
"box_zoom", | |
"center", | |
"close_popup_on_click", | |
"double_click_zoom", | |
"dragging", | |
"inertia", | |
"inertia_deceleration", | |
"inertia_max_speed", | |
"interpolation", | |
"keyboard", | |
"keyboard_pan_offset", | |
"keyboard_zoom_offset", | |
"max_zoom", | |
"min_zoom", | |
"scroll_wheel_zoom", | |
"tap", | |
"tap_tolerance", | |
"touch_zoom", | |
"world_copy_jump", | |
"zoom", | |
"zoom_animation_threshold", | |
"zoom_control", | |
"zoom_start" | |
], | |
"zoom": 10 | |
} | |
}, | |
"d404d7542f3d4c3b943093d929261662": { | |
"model_module": "jupyter-leaflet", | |
"model_module_version": "~0.10.1", | |
"model_name": "LeafletMapModel", | |
"state": { | |
"_dom_classes": [], | |
"_model_module_version": "~0.10.1", | |
"_view_count": null, | |
"_view_module_version": "~0.10.1", | |
"basemap": { | |
"attribution": "Tiles © Esri — Copyright: ©2012 DeLorme", | |
"max_zoom": 11, | |
"min_zoom": 1, | |
"name": "Esri.DeLorme", | |
"url": "http://server.arcgisonline.com/ArcGIS/rest/services/Specialty/DeLorme_World_Base_Map/MapServer/tile/{z}/{y}/{x}" | |
}, | |
"center": [ | |
52, | |
10 | |
], | |
"interpolation": "bilinear", | |
"layers": [ | |
"IPY_MODEL_4a6ab2f73fbe480199fb696bdbd5ffbd" | |
], | |
"layout": "IPY_MODEL_d7c4cb7132d0466ebada59a0d913caa8", | |
"modisdate": "yesterday", | |
"options": [ | |
"attribution_control", | |
"basemap", | |
"bounce_at_zoom_limits", | |
"box_zoom", | |
"center", | |
"close_popup_on_click", | |
"double_click_zoom", | |
"dragging", | |
"inertia", | |
"inertia_deceleration", | |
"inertia_max_speed", | |
"interpolation", | |
"keyboard", | |
"keyboard_pan_offset", | |
"keyboard_zoom_offset", | |
"max_zoom", | |
"min_zoom", | |
"scroll_wheel_zoom", | |
"tap", | |
"tap_tolerance", | |
"touch_zoom", | |
"world_copy_jump", | |
"zoom", | |
"zoom_animation_threshold", | |
"zoom_control", | |
"zoom_start" | |
], | |
"zoom": 10 | |
} | |
}, | |
"d5aed5f76e3e4b9bb635eb13b62f46d1": { | |
"model_module": "@jupyter-widgets/base", | |
"model_module_version": "1.1.0", | |
"model_name": "LayoutModel", | |
"state": {} | |
}, | |
"d6139d634a574a86a6281f1a14132303": { | |
"model_module": "jupyter-leaflet", | |
"model_module_version": "~0.10.1", | |
"model_name": "LeafletTileLayerModel", | |
"state": { | |
"_model_module_version": "~0.10.1", | |
"_view_count": null, | |
"_view_module_version": "~0.10.1", | |
"attribution": "", | |
"base": true, | |
"max_zoom": 19, | |
"min_zoom": 1, | |
"options": [ | |
"attribution", | |
"detect_retina", | |
"max_zoom", | |
"min_zoom", | |
"tile_size" | |
], | |
"url": "" | |
} | |
}, | |
"d7c4cb7132d0466ebada59a0d913caa8": { | |
"model_module": "@jupyter-widgets/base", | |
"model_module_version": "1.1.0", | |
"model_name": "LayoutModel", | |
"state": {} | |
}, | |
"d90af3b583ab4010a445984eaab3c0e9": { | |
"model_module": "@jupyter-widgets/base", | |
"model_module_version": "1.1.0", | |
"model_name": "LayoutModel", | |
"state": {} | |
}, | |
"de50cf9629cf4b4a9b5e76b1aeb52deb": { | |
"model_module": "jupyter-leaflet", | |
"model_module_version": "~0.10.1", | |
"model_name": "LeafletTileLayerModel", | |
"state": { | |
"_model_module_version": "~0.10.1", | |
"_view_count": null, | |
"_view_module_version": "~0.10.1", | |
"attribution": "Tiles © Esri — Copyright: ©2012 DeLorme", | |
"base": true, | |
"max_zoom": 11, | |
"min_zoom": 1, | |
"name": "Esri.DeLorme", | |
"options": [ | |
"attribution", | |
"detect_retina", | |
"max_zoom", | |
"min_zoom", | |
"tile_size" | |
], | |
"url": "http://server.arcgisonline.com/ArcGIS/rest/services/Specialty/DeLorme_World_Base_Map/MapServer/tile/{z}/{y}/{x}" | |
} | |
}, | |
"f4ab9cceece64ae7b8bb8136693f53fe": { | |
"model_module": "jupyter-leaflet", | |
"model_module_version": "~0.10.1", | |
"model_name": "LeafletMapModel", | |
"state": { | |
"_dom_classes": [], | |
"_model_module_version": "~0.10.1", | |
"_view_count": null, | |
"_view_module_version": "~0.10.1", | |
"basemap": { | |
"DeLorme": { | |
"attribution": "Tiles © Esri — Copyright: ©2012 DeLorme", | |
"max_zoom": 11, | |
"min_zoom": 1, | |
"name": "Esri.DeLorme", | |
"url": "http://server.arcgisonline.com/ArcGIS/rest/services/Specialty/DeLorme_World_Base_Map/MapServer/tile/{z}/{y}/{x}" | |
}, | |
"NatGeoWorldMap": { | |
"attribution": "Tiles © Esri — National Geographic, Esri, DeLorme, NAVTEQ, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, iPC", | |
"max_zoom": 16, | |
"name": "Esri.NatGeoWorldMap", | |
"url": "http://server.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/tile/{z}/{y}/{x}" | |
}, | |
"WorldImagery": { | |
"attribution": "Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community", | |
"max_zoom": 20, | |
"name": "Esri.WorldImagery", | |
"url": "http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}" | |
}, | |
"WorldStreetMap": { | |
"attribution": "Tiles © Esri — Source: Esri, DeLorme, NAVTEQ, USGS, Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), TomTom, 2012", | |
"max_zoom": 20, | |
"name": "Esri.WoldStreetMap", | |
"url": "http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}" | |
}, | |
"WorldTopoMap": { | |
"attribution": "Tiles © Esri — Esri, DeLorme, NAVTEQ, TomTom, Intermap, iPC, USGS, FAO, NPS, NRCAN, GeoBase, Kadaster NL, Ordnance Survey, Esri Japan, METI, Esri China (Hong Kong), and the GIS User Community", | |
"max_zoom": 20, | |
"name": "Esri.WorldTopoMap", | |
"url": "http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}" | |
} | |
}, | |
"center": [ | |
52, | |
10 | |
], | |
"interpolation": "bilinear", | |
"layers": [ | |
"IPY_MODEL_d6139d634a574a86a6281f1a14132303" | |
], | |
"layout": "IPY_MODEL_89c5081268a3411596d5395733319435", | |
"modisdate": "yesterday", | |
"options": [ | |
"attribution_control", | |
"basemap", | |
"bounce_at_zoom_limits", | |
"box_zoom", | |
"center", | |
"close_popup_on_click", | |
"double_click_zoom", | |
"dragging", | |
"inertia", | |
"inertia_deceleration", | |
"inertia_max_speed", | |
"interpolation", | |
"keyboard", | |
"keyboard_pan_offset", | |
"keyboard_zoom_offset", | |
"max_zoom", | |
"min_zoom", | |
"scroll_wheel_zoom", | |
"tap", | |
"tap_tolerance", | |
"touch_zoom", | |
"world_copy_jump", | |
"zoom", | |
"zoom_animation_threshold", | |
"zoom_control", | |
"zoom_start" | |
], | |
"zoom": 10 | |
} | |
}, | |
"f61d05a142c146108f88fd040b3a272a": { | |
"model_module": "jupyter-leaflet", | |
"model_module_version": "~0.10.1", | |
"model_name": "LeafletMapModel", | |
"state": { | |
"_dom_classes": [], | |
"_model_module_version": "~0.10.1", | |
"_view_count": null, | |
"_view_module_version": "~0.10.1", | |
"basemap": { | |
"attribution": "Tiles © Esri — Copyright: ©2012 DeLorme", | |
"max_zoom": 11, | |
"min_zoom": 1, | |
"name": "Esri.DeLorme", | |
"url": "http://server.arcgisonline.com/ArcGIS/rest/services/Specialty/DeLorme_World_Base_Map/MapServer/tile/{z}/{y}/{x}" | |
}, | |
"center": [ | |
50.855430170230704, | |
4.590933322906495 | |
], | |
"east": -180, | |
"interpolation": "bilinear", | |
"layers": [ | |
"IPY_MODEL_fbd0438ae0104576a865481eb404edcf" | |
], | |
"layout": "IPY_MODEL_d5aed5f76e3e4b9bb635eb13b62f46d1", | |
"modisdate": "yesterday", | |
"north": -90, | |
"options": [ | |
"attribution_control", | |
"basemap", | |
"bounce_at_zoom_limits", | |
"box_zoom", | |
"center", | |
"close_popup_on_click", | |
"double_click_zoom", | |
"dragging", | |
"inertia", | |
"inertia_deceleration", | |
"inertia_max_speed", | |
"interpolation", | |
"keyboard", | |
"keyboard_pan_offset", | |
"keyboard_zoom_offset", | |
"max_zoom", | |
"min_zoom", | |
"scroll_wheel_zoom", | |
"tap", | |
"tap_tolerance", | |
"touch_zoom", | |
"world_copy_jump", | |
"zoom", | |
"zoom_animation_threshold", | |
"zoom_control", | |
"zoom_start" | |
], | |
"south": 90, | |
"west": 180, | |
"zoom": 9 | |
} | |
}, | |
"fbd0438ae0104576a865481eb404edcf": { | |
"model_module": "jupyter-leaflet", | |
"model_module_version": "~0.10.1", | |
"model_name": "LeafletTileLayerModel", | |
"state": { | |
"_model_module_version": "~0.10.1", | |
"_view_count": null, | |
"_view_module_version": "~0.10.1", | |
"attribution": "Tiles © Esri — Copyright: ©2012 DeLorme", | |
"base": true, | |
"max_zoom": 11, | |
"min_zoom": 1, | |
"name": "Esri.DeLorme", | |
"options": [ | |
"attribution", | |
"detect_retina", | |
"max_zoom", | |
"min_zoom", | |
"tile_size" | |
], | |
"url": "http://server.arcgisonline.com/ArcGIS/rest/services/Specialty/DeLorme_World_Base_Map/MapServer/tile/{z}/{y}/{x}" | |
} | |
} | |
}, | |
"version_major": 2, | |
"version_minor": 0 | |
} | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
opencage==1.1.6 | |
ipyleaflet==0.10.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment