|
15 | 15 | "execution_count": null, |
16 | 16 | "source": [ |
17 | 17 | "import os\n", |
18 | | - "os.environ[\"LS_API_KEY\"] = \"MY-API-KEY\" # replace your API key here." |
| 18 | + "\n", |
| 19 | + "os.environ[\"LS_API_KEY\"] = \"MY-API-KEY\" # replace your API key here." |
19 | 20 | ], |
20 | 21 | "outputs": [], |
21 | 22 | "metadata": {} |
|
108 | 109 | "source": [ |
109 | 110 | "# Isoline routing example\n", |
110 | 111 | "\n", |
111 | | - "from here_location_services.config.isoline_routing_config import RANGE_TYPE, ISOLINE_ROUTING_TRANSPORT_MODE\n", |
| 112 | + "from here_location_services.config.isoline_routing_config import (\n", |
| 113 | + " RANGE_TYPE,\n", |
| 114 | + " ISOLINE_ROUTING_TRANSPORT_MODE,\n", |
| 115 | + ")\n", |
112 | 116 | "from datetime import datetime\n", |
113 | 117 | "\n", |
114 | | - "iso_response = ls.calculate_isoline(origin=[52.53086, 13.38469],\n", |
| 118 | + "iso_response = ls.calculate_isoline(\n", |
| 119 | + " origin=[52.53086, 13.38469],\n", |
115 | 120 | " range=\"1800\",\n", |
116 | 121 | " departure_time=datetime.now(),\n", |
117 | 122 | " range_type=RANGE_TYPE.time,\n", |
118 | | - " transport_mode=ISOLINE_ROUTING_TRANSPORT_MODE.car,)\n", |
| 123 | + " transport_mode=ISOLINE_ROUTING_TRANSPORT_MODE.car,\n", |
| 124 | + ")\n", |
119 | 125 | "\n", |
120 | 126 | "data = iso_response.to_geojson()\n", |
121 | 127 | "geo_layer = GeoJSON(data=data)\n", |
|
125 | 131 | "m = Map(api_key=LS_API_KEY, center=[52.53086, 13.38469], zoom=9)\n", |
126 | 132 | "m.add_layer(geo_layer)\n", |
127 | 133 | "m.add_object(iso_marker)\n", |
128 | | - "m\n" |
| 134 | + "m" |
129 | 135 | ], |
130 | 136 | "outputs": [], |
131 | 137 | "metadata": {} |
|
168 | 174 | "source": [ |
169 | 175 | "from here_location_services.config.search_config import PLACES_CATEGORIES\n", |
170 | 176 | "\n", |
171 | | - "browse_response = ls.browse(center=[52.53086, 13.38469], bounding_box=[13.08836,52.33812,13.761,52.6755],\n", |
172 | | - " categories=[PLACES_CATEGORIES.restaurant])\n", |
| 177 | + "browse_response = ls.browse(\n", |
| 178 | + " center=[52.53086, 13.38469],\n", |
| 179 | + " bounding_box=[13.08836, 52.33812, 13.761, 52.6755],\n", |
| 180 | + " categories=[PLACES_CATEGORIES.restaurant],\n", |
| 181 | + ")\n", |
173 | 182 | "\n", |
174 | 183 | "data = browse_response.to_geojson()\n", |
175 | 184 | "geo_layer = GeoJSON(data=data)\n", |
|
194 | 203 | "cell_type": "code", |
195 | 204 | "execution_count": null, |
196 | 205 | "source": [ |
197 | | - "lookup = ls.lookup(location_id=browse_response.items[0]['id'])\n", |
| 206 | + "lookup = ls.lookup(location_id=browse_response.items[0][\"id\"])\n", |
198 | 207 | "\n", |
199 | 208 | "lookup.response" |
200 | 209 | ], |
|
0 commit comments