diff --git a/Choropleth.html b/Choropleth.html
new file mode 100644
index 0000000..b8c0171
--- /dev/null
+++ b/Choropleth.html
@@ -0,0 +1,41342 @@
+
+
+
+
+ PyconMap2
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Pycon 2020 (Online).ipynb b/Pycon 2020 (Online).ipynb
new file mode 100644
index 0000000..4fcd444
--- /dev/null
+++ b/Pycon 2020 (Online).ipynb
@@ -0,0 +1,794 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "\n",
+ "\n",
+ "## A Deep Dive into Interactive Geospatial Visualization in Python using IpyLeaflet \n",
+ "### Pycon Africa, 2020 (Online)\n",
+ "By `Olawale V. Abimbola` abimbolaolawale41@gmail.com\n",
+ "##### Tutorial notebook is available at `https://github.com/olawale0254/Pycon-Africa-2020-Online-`"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## 1. Introduction \n",
+ "\n",
+ "Geospatial analysis and visualisation has become a very great part of Data Science as it is a great approach to storytelling. IpyLeaflet is a Python library which could be use to create interactive and unique visualisation of geospatial data. This talk will be based on creating Interactive maps using IpyLeaflet and also implementing unique Widget\n",
+ "to our maps.\n",
+ "\n",
+ "\n",
+ "\n",
+ "Geospatial Information System (GIS) is a conceptualized framework that provides the ability to capture, store, manipulate, analyze, manage, and present all types of geographical data spatial and Geographic data. Python as a programming language has a lot of libraries which are used for different types of geospatial analysis and each of it has different strengths and limitations. In this talk we will be looking at building interesting and interactive geospatial visualisations using IpyLeaflet, how we could use Ipyleaflet widget to design our maps, creating single and multiple markers on map and exporting the interactive visualization in html."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## 1.1 Format of Geospatial Data\n",
+ "| Format | Extension |\n",
+ "| :- | -: |\n",
+ "| Esri Shapefile | .SHP,.DBF,.SHX |\n",
+ "| Geographic JavaScript Object Notation (GeoJSON) | .GEOJSON, .JSON |\n",
+ "| Tabular | .csv|\n",
+ "| Geography Markup Language (GML) | .GML |\n",
+ "| Google Keyhole Markup Language | .KML, .KMZ |\n",
+ "| GPS eXchange Format | .GPX |\n",
+ "| Geography Markup Language (GML) | .GML |\n",
+ "| OpenStreetMap OSM XML | \t.OSM |\n",
+ "| Rasters | .TIF, .TIFF, .OVR |"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## 1.2 IpyLeaflet (Installation process and Documentation)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ " \n",
+ " "
+ ],
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "from IPython.display import IFrame\n",
+ "documentation = IFrame(src='https://ipyleaflet.readthedocs.io/en/latest/', width=1000, height=600)\n",
+ "display(documentation)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "*Note!!!* IpyLeaflet is not yet supported on Google Colab"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## 2.0 Creating Basic Maps With IpyLeaflet\n",
+ "\n",
+ "### 2.1 Basemaps in IpyLeaflet"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "79abece04ef44328a617147180c9bfdb",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "interactive(children=(RadioButtons(description='map types:', index=12, options=('WorldTopoMap', 'WorldImagery'…"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "text/plain": [
+ ""
+ ]
+ },
+ "execution_count": 2,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "import ipyleaflet\n",
+ "import ipywidgets\n",
+ "from ipyleaflet import basemaps, Map\n",
+ "\n",
+ "button = ipywidgets.RadioButtons(options=[ 'WorldTopoMap', 'WorldImagery', 'NatGeoWorldMap', 'HikeBike', \n",
+ " 'HyddaFull', 'Night', 'ModisTerra', 'Mapnik', 'HOT', 'OpenTopoMap', \n",
+ " 'Toner', 'Watercolor','Positron', 'DarkMatter', 'WorldStreetMap', 'DeLorme'],\n",
+ " value='Positron', \n",
+ " description='map types:')\n",
+ "\n",
+ "def toggle_maps(map):\n",
+ " if map == 'WorldTopoMap': m = Map(center=(11.8033935,19.9756852), zoom=2, basemap=basemaps.Esri.WorldTopoMap)\n",
+ " if map == 'WorldImagery': m = Map(center=(11.8033935,19.9756852), zoom=2, basemap=basemaps.Esri.WorldImagery)\n",
+ " if map == 'NatGeoWorldMap': m = Map(center=(11.8033935,19.9756852), zoom=2, basemap=basemaps.Esri.NatGeoWorldMap)\n",
+ " if map == 'HikeBike': m = Map(center=(11.8033935,19.9756852), zoom=2, basemap=basemaps.HikeBike.HikeBike)\n",
+ " if map == 'HyddaFull': m = Map(center=(11.8033935,19.9756852), zoom=2, basemap=basemaps.Hydda.Full)\n",
+ " if map == 'Night': m = Map(center=(11.8033935,19.9756852), zoom=2, basemap=basemaps.NASAGIBS.ViirsEarthAtNight2012)\n",
+ " if map == 'ModisTerra': m = Map(center=(11.8033935,19.9756852), zoom=2, basemap=basemaps.NASAGIBS.ModisTerraTrueColorCR)\n",
+ " if map == 'Mapnik': m = Map(center=(11.8033935,19.9756852), zoom=2, basemap=basemaps.OpenStreetMap.Mapnik)\n",
+ " if map == 'HOT': m = Map(center=(11.8033935,19.9756852), zoom=2, basemap=basemaps.OpenStreetMap.HOT)\n",
+ " if map == 'OpenTopoMap': m = Map(center=(11.8033935,19.9756852), zoom=2, basemap=basemaps.OpenTopoMap)\n",
+ " if map == 'Toner': m = Map(center=(11.8033935,19.9756852), zoom=2, basemap=basemaps.Stamen.Toner)\n",
+ " if map == 'Watercolor': m = Map(center=(11.8033935,19.9756852), zoom=2, basemap=basemaps.Stamen.Watercolor)\n",
+ " if map == 'Positron': m = Map(zoom=2, basemap=basemaps.CartoDB.Positron)\n",
+ " if map == 'DarkMatter': m = Map(zoom=1, basemap=basemaps.CartoDB.DarkMatter)\n",
+ " if map == 'WorldStreetMap': m = Map(center=(11.8033935,19.9756852), zoom=2, basemap=basemaps.Esri.WorldStreetMap)\n",
+ " if map == 'DeLorme': m = Map(center=(11.8033935,19.9756852), zoom=2, basemap=basemaps.Esri.DeLorme)\n",
+ " display(m)\n",
+ " \n",
+ "ipywidgets.interact(toggle_maps, map=button)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "### 2.2 Creating Basic Maps"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "5796cc5b9f314ff88ffcbae748005fe1",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Map(center=[0.0, 0.0], controls=(ZoomControl(options=['position', 'zoom_in_text', 'zoom_in_title', 'zoom_out_t…"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "import ipyleaflet\n",
+ "from ipyleaflet import Map\n",
+ "\n",
+ "basicmap = ipyleaflet.Map(zoom=2)\n",
+ "\n",
+ "display(basicmap)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "### 2.3 Basic Maps using Different Basemaps"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "3615251354f844a6817f15fef907c452",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Map(center=[0.0, 0.0], controls=(ZoomControl(options=['position', 'zoom_in_text', 'zoom_in_title', 'zoom_out_t…"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "# map1 = ipyleaflet.Map(zoom=2, basemap=basemaps.Esri.WorldTopoMap)\n",
+ "# map1 = ipyleaflet.Map(zoom=2, basemap=basemaps.NASAGIBS.ModisTerraTrueColorCR)\n",
+ "# map1 = ipyleaflet.Map(zoom=2, basemap=basemaps.OpenStreetMap.Mapnik)\n",
+ "map1 = ipyleaflet.Map(zoom=2, basemap=basemaps.Stamen.Watercolor)\n",
+ "display(map1)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "### 3.0 Adding Markers to the Maps"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "### 3.1 Single Marker"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "from ipyleaflet import Map, Marker\n",
+ "import geocoder\n",
+ "\n",
+ "# Ashesi University Ghana\n",
+ "# Agege Lagos\n",
+ "# Yaba Lagos\n",
+ "# location address\n",
+ "location = geocoder.osm('Ashesi University Ghana')\n",
+ "\n",
+ "# latitude and longitude of location\n",
+ "latlng = [location.lat, location.lng]\n",
+ "\n",
+ "# create map\n",
+ "map_location = Map(center=latlng,zoom=4,basemap=basemaps.OpenStreetMap.Mapnik)\n",
+ "\n",
+ "# marker\n",
+ "marker = Marker(location=latlng, title='Ashesi University Ghana')\n",
+ "map_location.add_layer(marker)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "c79215b1b102474f8dcab3dfc3a0e2c5",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Map(center=[5.7596758, -0.2201002841451991], controls=(ZoomControl(options=['position', 'zoom_in_text', 'zoom_…"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "map_location "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "### 3.2 Adding Mutiple Markers\n",
+ "\n",
+ "We will be using a dataset of locations of schools in `Lagos, Ogun, Delta, Akwa-ibom and Kaduna` which are gotten from `https://grid3.gov.ng/`"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "ba781c0047d54c77bf805d2fe5df42dc",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Map(center=[8.2137899, 5.9311192], controls=(ZoomControl(options=['position', 'zoom_in_text', 'zoom_in_title',…"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "from ipyleaflet import Map, Marker\n",
+ "import pandas as pd \n",
+ "data = pd.read_csv('Data/Data.csv')\n",
+ "# create map\n",
+ "schools = Map(center=(8.2137899,5.9311192), zoom=7)\n",
+ "\n",
+ "# plot Schools locations\n",
+ "for (index, row) in data.iterrows():\n",
+ " marker = Marker(location=[row.loc['latitude'], row.loc['longitude']], \n",
+ " title=row.loc['name'] + '|' + row.loc['sub_type'] + '|' + row.loc['state_name'] )\n",
+ " schools.add_layer(marker)\n",
+ "# display map \n",
+ "schools"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "### 3.3 Overlaying Spatial files"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "707dad374eb345849252ad06aea0667e",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Map(center=[7.6500865, -1.6546043], controls=(ZoomControl(options=['position', 'zoom_in_text', 'zoom_in_title'…"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "import ipyleaflet\n",
+ "from ipyleaflet import Map, GeoJSON\n",
+ "import json\n",
+ "\n",
+ "with open('Data/africa.geojson') as f:\n",
+ " geo_json_africa = json.load(f)\n",
+ "\n",
+ "# create map \n",
+ "geo_json_africa_map = ipyleaflet.Map(center=(7.6500865,-1.6546043), zoom=3)\n",
+ "\n",
+ "# create geo_json layer with style attributes\n",
+ "geo_json_africa_layer = GeoJSON(data=geo_json_africa,\n",
+ " style = {'color': 'red', \n",
+ " 'opacity': 1.0, \n",
+ " 'weight': 1.1,\n",
+ " 'fill': 'yellow',\n",
+ " 'fillOpacity': 0.2})\n",
+ "\n",
+ "\n",
+ "# add geo_json layer to map\n",
+ "geo_json_africa_map.add_layer(geo_json_africa_layer)\n",
+ "geo_json_africa_map\n",
+ "\n",
+ "# display map\n",
+ "# display(geo_json_africa_map)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "### 3.4 Choropleth"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "bdf47e8bafad4339bfca13287552f102",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Map(center=[7.6500865, -1.6546043], controls=(ZoomControl(options=['position', 'zoom_in_text', 'zoom_in_title'…"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "import ipyleaflet\n",
+ "import json\n",
+ "import pandas as pd\n",
+ "import numpy as np\n",
+ "import os\n",
+ "import requests\n",
+ "from ipywidgets import link, FloatSlider\n",
+ "import branca.colormap as cm\n",
+ "from branca.colormap import linear\n",
+ "from ipyleaflet import Map, LegendControl ### Legend\n",
+ "from ipyleaflet import Map, SearchControl, Marker, AwesomeIcon ### Search Marker \n",
+ "\n",
+ "\n",
+ "def load_data(url, filename, file_type):\n",
+ " r = requests.get(url)\n",
+ " with open(filename, 'w') as f:\n",
+ " f.write(r.content.decode(\"utf-8\"))\n",
+ " with open(filename, 'r') as f:\n",
+ " return file_type(f)\n",
+ "\n",
+ "with open('Data/countries.geojson') as f:\n",
+ " geo_json_africa = json.load(f)\n",
+ "\n",
+ "pop_df = pd.read_csv('Data/popnew.csv')\n",
+ "choro_map_data = dict(zip(pop_df['Country'].tolist(), pop_df['Population'].tolist()))\n",
+ "\n",
+ "for i in geo_json_africa['features']:\n",
+ " i['id'] = i['properties']['name']\n",
+ "\n",
+ "\n",
+ "# create choropleth layer\n",
+ "layer = ipyleaflet.Choropleth(\n",
+ " geo_data=geo_json_africa,\n",
+ " choro_data=choro_map_data,\n",
+ " colormap=linear.YlOrRd_04,\n",
+ " border_color='black',\n",
+ " style={'fillOpacity': 0.8, 'dashArray': '5, 5'})\n",
+ "\n",
+ "mapc = ipyleaflet.Map(center = (7.6500865,-1.6546043), zoom = 2.5)\n",
+ "\n",
+ "## Add legend \n",
+ "legend = LegendControl({\"low\":\"#FFFDD0\", \"medium\":\"#FCF4A3\",\"Modrate\":\"#FDA50F\", \"High\":\"B80F0A\"}, name=\"Population\", position=\"topright\")\n",
+ "mapc.add_control(legend)\n",
+ "mapc.add_layer(layer)\n",
+ "### Add search marker \n",
+ "marker = Marker(icon=AwesomeIcon(name=\"check\", marker_color='green', icon_color='darkgreen'))\n",
+ "\n",
+ "mapc.add_control(SearchControl(\n",
+ " position=\"topleft\",\n",
+ " url='https://nominatim.openstreetmap.org/search?format=json&q={s}',\n",
+ " zoom=5,\n",
+ " marker=marker\n",
+ "))\n",
+ "mapc"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "### 4.0 Playing with Ipywidget and Control\n",
+ "#### 4.1 Basemap Ipywidget"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "from ipyleaflet import basemaps,basemap_to_tiles, Map, WidgetControl\n",
+ "from ipywidgets import Dropdown"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.jupyter.widget-view+json": {
+ "model_id": "394805f4057a4d129eb34c1770d1ebdd",
+ "version_major": 2,
+ "version_minor": 0
+ },
+ "text/plain": [
+ "Map(center=[7.6500865, -1.6546043], controls=(ZoomControl(options=['position', 'zoom_in_text', 'zoom_in_title'…"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "m = Map(center=[7.6500865,-1.6546043], zoom=2)\n",
+ "\n",
+ "ee_basemaps={}\n",
+ "\n",
+ "# Loops through all ipyleaflet basemaps\n",
+ "for item in basemaps.values():\n",
+ " try:\n",
+ " name = item['name']\n",
+ " basemap = 'basemaps.{}'.format(name)\n",
+ " ee_basemaps[name] = basemap_to_tiles(eval(basemap))\n",
+ " except:\n",
+ " for sub_item in item:\n",
+ " name = item[sub_item]['name']\n",
+ " basemap = 'basemaps.{}'.format(name)\n",
+ " basemap = basemap.replace('Mids', 'Modis')\n",
+ " ee_basemaps[name] = basemap_to_tiles(eval(basemap))\n",
+ "\n",
+ "# Adds a Dropdown widget\n",
+ "dropdown = Dropdown(\n",
+ " options=list(ee_basemaps.keys()),\n",
+ " value='OpenStreetMap.Mapnik',\n",
+ " description='Basemaps'\n",
+ ")\n",
+ "\n",
+ "# Handles Dropdown control event\n",
+ "def on_click(change):\n",
+ " basemap_name = change['new']\n",
+ " old_basemap = m.layers[-1]\n",
+ " m.substitute_layer(old_basemap, ee_basemaps[basemap_name])\n",
+ " \n",
+ "dropdown.observe(on_click, 'value')\n",
+ "\n",
+ "# Adds control to the map\n",
+ "basemap_control = WidgetControl(widget=dropdown, position='topright')\n",
+ "m.add_control(basemap_control)\n",
+ "m"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#### 4.2 Draw Control Widget"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "import ipyleaflet\n",
+ "from ipyleaflet import DrawControl\n",
+ "# create control\n",
+ "draw_control = DrawControl()\n",
+ "\n",
+ "# add control to map\n",
+ "m.add_control(draw_control)\n",
+ "\n",
+ "# add extra options to control\n",
+ "draw_control.circle = {\n",
+ " \"shapeOptions\": {\n",
+ " \"fillColor\": \"blue\",\n",
+ " \"color\": \"blue\",\n",
+ " \"fillOpacity\": 0.5\n",
+ " }\n",
+ "}\n",
+ "\n",
+ "draw_control.rectangle = {\n",
+ " \"shapeOptions\": {\n",
+ " \"fillColor\": \"blue\",\n",
+ " \"color\": \"blue\",\n",
+ " \"fillOpacity\": 0.5\n",
+ " }\n",
+ "}"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#### 4.3 Serch Control "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "from ipyleaflet import Map, SearchControl, Marker, AwesomeIcon \n",
+ "marker = Marker(icon=AwesomeIcon(name=\"check\", marker_color='green', icon_color='darkgreen'))\n",
+ "search = SearchControl(\n",
+ " position=\"topleft\",\n",
+ " url='https://nominatim.openstreetmap.org/search?format=json&q={s}',\n",
+ " zoom=5,\n",
+ " marker=marker)\n",
+ "\n",
+ "m.add_control(search)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#### 4.4 Full Control Wedget"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "from ipyleaflet import Map, FullScreenControl\n",
+ "# create control\n",
+ "control = FullScreenControl()\n",
+ "# add control to map\n",
+ "m.add_control(control)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#### 4.5 Circle marker"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "from ipyleaflet import Map, basemaps, basemap_to_tiles, CircleMarker\n",
+ "\n",
+ "watercolor = basemap_to_tiles(basemaps.Stamen.Watercolor)\n",
+ "\n",
+ "circle_marker = CircleMarker()\n",
+ "circle_marker.location = (7.6500865,-1.6546043)\n",
+ "circle_marker.radius = 50\n",
+ "circle_marker.color = \"red\"\n",
+ "circle_marker.fill_color = \"red\"\n",
+ "\n",
+ "m.add_layer(circle_marker)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#### 4.6 Split Control Widget "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "import ipyleaflet\n",
+ "from ipyleaflet import basemaps, basemap_to_tiles, SplitMapControl\n",
+ "# create right and left layers\n",
+ "right_layer = basemap_to_tiles(basemaps.Esri.WorldStreetMap)\n",
+ "left_layer = basemap_to_tiles(basemaps.NASAGIBS.ViirsEarthAtNight2012)\n",
+ "\n",
+ "# create control\n",
+ "control = SplitMapControl(left_layer=left_layer, right_layer=right_layer)\n",
+ "\n",
+ "# add control to map\n",
+ "m.add_control(control)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#### 5.0 Save Map as HTML"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "# ### Save Widget Map\n",
+ "m.save(\"Widgetmap.html\", title = 'PyconMap1')"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "# ### Save Choropleth Map\n",
+ "mapc.save(\"Choropleth.html\", title = 'PyconMap2')"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ ""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "### Contact \n",
+ "+ `Twitter` : *https://twitter.com/bimbolawale* \n",
+ "+ `Linkdin` : *https://www.linkedin.com/in/bimbolawale/*\n",
+ "+ `Github` : *https://github.com/olawale0254*\n",
+ "+ `Gmail` : *abimbolaolawale41@gmail.com*"
+ ]
+ }
+ ],
+ "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.7.4"
+ },
+ "latex_envs": {
+ "LaTeX_envs_menu_present": true,
+ "autoclose": false,
+ "autocomplete": true,
+ "bibliofile": "biblio.bib",
+ "cite_by": "apalike",
+ "current_citInitial": 1,
+ "eqLabelWithNumbers": true,
+ "eqNumInitial": 1,
+ "hotkeys": {
+ "equation": "Ctrl-E",
+ "itemize": "Ctrl-I"
+ },
+ "labels_anchors": false,
+ "latex_user_defs": false,
+ "report_style_numbering": false,
+ "user_envs_cfg": false
+ },
+ "toc": {
+ "base_numbering": 1,
+ "nav_menu": {},
+ "number_sections": true,
+ "sideBar": true,
+ "skip_h1_title": false,
+ "title_cell": "Table of Contents",
+ "title_sidebar": "Contents",
+ "toc_cell": false,
+ "toc_position": {},
+ "toc_section_display": true,
+ "toc_window_display": false
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 4
+}
diff --git a/Widgetmap.html b/Widgetmap.html
new file mode 100644
index 0000000..5496cf4
--- /dev/null
+++ b/Widgetmap.html
@@ -0,0 +1,41342 @@
+
+
+
+
+ PyconMap1
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/gis.JPG b/gis.JPG
new file mode 100644
index 0000000..70abe04
Binary files /dev/null and b/gis.JPG differ
diff --git a/pycon.png b/pycon.png
new file mode 100644
index 0000000..236073f
Binary files /dev/null and b/pycon.png differ