|
46 | 46 | "source": [ |
47 | 47 | "import folium\n", |
48 | 48 | "\n", |
49 | | - "folium_map = folium.Map(location=[44.43225, 26.10626])" |
| 49 | + "folium_map = folium.Map(location=[-34.603722, -58.381592])" |
50 | 50 | ] |
51 | 51 | }, |
52 | 52 | { |
53 | 53 | "cell_type": "markdown", |
54 | 54 | "metadata": {}, |
55 | 55 | "source": [ |
56 | | - "To display it in a Jupyter notebook, simply ask for the object representation:\n" |
| 56 | + "The `location` keyword argument (there are many more, with sensible defaults) provides the Map centre in Latitude and Longitude (Northing, Easting). To display the Map in a Jupyter notebook, simply ask for its object representation:\n" |
57 | 57 | ] |
58 | 58 | }, |
59 | 59 | { |
|
124 | 124 | "countries = f'../data/countries.json'\n", |
125 | 125 | "\n", |
126 | 126 | "folium_map2 = folium.Map(\n", |
127 | | - " location=[44.43225, 26.10626],\n", |
| 127 | + " location=[0, 0],\n", |
128 | 128 | " zoom_start=2 \n", |
129 | 129 | ")\n", |
130 | 130 | "\n", |
|
206 | 206 | "source": [ |
207 | 207 | "from ipyleaflet import *\n", |
208 | 208 | "\n", |
209 | | - "m = Map(center=(44.4, 26.1), zoom=4, basemap=basemaps.OpenStreetMap.Mapnik)\n", |
| 209 | + "m = Map(center=(-34.603722, -58.381592), zoom=3, basemap=basemaps.OpenStreetMap.Mapnik)\n", |
210 | 210 | "m" |
211 | 211 | ] |
212 | 212 | }, |
213 | 213 | { |
214 | 214 | "cell_type": "markdown", |
215 | 215 | "metadata": {}, |
216 | 216 | "source": [ |
217 | | - "### ipyleaflet - add overlay tiles\n" |
| 217 | + "### ipyleaflet - add overlay tiles\n", |
| 218 | + "This basemap is now transparently overlayed with tiles from the [Strava heatmap](https://www.strava.com/heatmap)." |
218 | 219 | ] |
219 | 220 | }, |
220 | 221 | { |
|
341 | 342 | "source": [ |
342 | 343 | "import ipywidgets\n", |
343 | 344 | " \n", |
344 | | - "ipywidgets.HBox([m, Map(center=[44.4, 26.1], zoom=8)])" |
| 345 | + "ipywidgets.HBox([m, Map(center=[-34.603722, -58.381592], zoom=8)])" |
345 | 346 | ] |
346 | 347 | }, |
347 | 348 | { |
|
563 | 564 | "tile_provider = get_provider(Vendors.CARTODBPOSITRON)\n", |
564 | 565 | "\n", |
565 | 566 | "# range bounds supplied in web mercator coordinates\n", |
566 | | - "p = figure(tools='pan, wheel_zoom', x_range=(-2000000, 6000000), y_range=(-1000000, 7000000),\n", |
| 567 | + "p = figure(tools='pan, wheel_zoom', x_range=(-10000000, -3000000), y_range=(-6000000, 0),\n", |
567 | 568 | " x_axis_type='mercator', y_axis_type='mercator')\n", |
568 | 569 | "p.add_tile(tile_provider)\n", |
569 | 570 | "\n", |
|
599 | 600 | "source": [ |
600 | 601 | "import geopandas as gpd\n", |
601 | 602 | "\n", |
602 | | - "# Read the data (already in Web Mercator projection\n", |
| 603 | + "# Read the data (already in Web Mercator projection (ignore the warning)\n", |
603 | 604 | "points = gpd.read_file('../data/populated_places.3857.gpkg')" |
604 | 605 | ] |
605 | 606 | }, |
|
0 commit comments