<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Chinazo-Anebelundu</title>
    <description>The latest articles on DEV Community by Chinazo-Anebelundu (@chinazoanebelundu).</description>
    <link>https://dev.to/chinazoanebelundu</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F308687%2F437b2b89-a187-4bce-89d4-71b35811affe.jpeg</url>
      <title>DEV Community: Chinazo-Anebelundu</title>
      <link>https://dev.to/chinazoanebelundu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/chinazoanebelundu"/>
    <language>en</language>
    <item>
      <title>Know your Lagos market. How to create a web map showing images with QGIS and host it for free.</title>
      <dc:creator>Chinazo-Anebelundu</dc:creator>
      <pubDate>Tue, 03 May 2022 19:14:13 +0000</pubDate>
      <link>https://dev.to/chinazoanebelundu/know-your-lagos-market-how-to-create-a-web-map-showing-images-with-qgis-and-host-it-for-free-3h9c</link>
      <guid>https://dev.to/chinazoanebelundu/know-your-lagos-market-how-to-create-a-web-map-showing-images-with-qgis-and-host-it-for-free-3h9c</guid>
      <description>&lt;p&gt;&lt;a href="http://chinazo.epizy.com/?i=1#15/6.4537/3.3928"&gt;Major Markets in Lagos&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note that I lay no claims to any of these images as they were all obtained from the internet.&lt;/p&gt;

&lt;p&gt;In this article, you will learn how to create a map, similar to the one above, that displays locations of interests showing their images. You will also learn how to convert the map into a web map and host it, all on QGIS software.&lt;/p&gt;

&lt;p&gt;Specifically, I will show you how I created a web map showing all the major markets in Lagos state, Nigeria. Once you learn the steps, you can replicate it with any project of your choice.&lt;/p&gt;

&lt;p&gt;QGIS is a free and open-source cross-platform desktop geographic information system (GIS) application that supports viewing, editing, printing, and analysis of geospatial data. QGIS allows for analysis of different of geospatial file formats. Please read further on geospatial file formats &lt;a href="https://dev.to/chinazoanebelundu/plotting-interactive-map-in-python-using-folium-beginner-friendly-6ni/edit"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For this article we will learn how to:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;1) Define your project goal.&lt;br&gt;
2) Source images on the internet.&lt;br&gt;
3) Geotag images.&lt;br&gt;
4) Create a web map in QGIS&lt;br&gt;
5) Host the web map for free.&lt;/p&gt;

&lt;p&gt;Note that there are numerous ways to achieve the same result. This is just the way I did mine.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://chinazo.epizy.com/?i=1#15/6.4537/3.3928"&gt;Major Markets in Lagos&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Define your project goal&lt;/strong&gt;&lt;br&gt;
For me, I was casually strolling through the streets of social media when I stumbled upon a post that listed all the major markets in Lagos. Immediately, I thought of how I can improve on it and make it readily available to a wider audience. That was how I defined my goal to create a web map that will show all the major markets in Lagos while displaying images to depict the category of goods sold. I made a list of major markets in Lagos from that post, including the comment section.&lt;br&gt;
&lt;strong&gt;Action:&lt;/strong&gt; Define a project goal and draw a list.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Source images on the internet&lt;/strong&gt;&lt;br&gt;
Armed with a list, I went to the internet to source images to represent each major market. For example, for baby wear market at Dosunmu - Lagos Island, I simply browsed for a picture of babywear market and saved. I also made sure the images represented the typical Nigerian market. Nothing foreign or artificial.&lt;br&gt;
&lt;strong&gt;Action:&lt;/strong&gt; Source images that represent each category. Ensure they are in jpg or jpeg format. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Geotag images.&lt;/strong&gt; &lt;br&gt;
This means adding coordinates (longitude and latitude) to images. I geotagged the images with the coordinate of the market. To geotag the images, I used a software called Geosetter. Watch how on &lt;a href="https://www.youtube.com/watch?v=M0QMavS9WQA&amp;amp;t=194s"&gt;YouTube&lt;/a&gt;. &lt;br&gt;
&lt;strong&gt;Action:&lt;/strong&gt; Geotag and save the images in a folder.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Create a web map in QGIS.&lt;/strong&gt; &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I will break this down in steps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Install QGIS software on your computer and launch.&lt;br&gt;
&lt;strong&gt;Step 2:&lt;/strong&gt; Select a basemap.&lt;br&gt;
&lt;strong&gt;Step 3:&lt;/strong&gt; Click on plugins in the menu bar and search for ImportPhotos plugin. After installation, two icons will appear on your task bar &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OutreB2U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ot22lc2fd2susbiqe57u.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OutreB2U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ot22lc2fd2susbiqe57u.PNG" alt="Image description" width="880" height="115"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; Click on the first of the two icons and select the Input Folder Location (folder housing geotagged images) and Output File Location (where the output will be placed) and click ok. Once there are no issues plus a relatively small number of images, this runs under 5 seconds&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---SeijtQF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/44ujacrd7sunfpymc5c3.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---SeijtQF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/44ujacrd7sunfpymc5c3.PNG" alt="Image description" width="812" height="512"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://chinazo.epizy.com/?i=1#15/6.4537/3.3928"&gt;Major Markets in Lagos&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5:&lt;/strong&gt; Right-click on the image layer and select properties. Here, you can customize the picture markers to suit you. Click on the second of the two photo icons then click on each of the marker to view the images.&lt;br&gt;
Step 6: Go to plugins and install qgis2web. After installation, click on Web - qgis2web - Create web map. In the interphase that shows, select leaflet below and preview the web map by the right.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_mfMJaEv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bytdj93vvb90wjaoifeb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_mfMJaEv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bytdj93vvb90wjaoifeb.png" alt="Image description" width="793" height="491"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 7:&lt;/strong&gt; Click export. The web map will open on a browser. Note that the web map is not hosted at this stage and will not display beyond your personal browser.&lt;br&gt;
&lt;strong&gt;Action:&lt;/strong&gt; Follow this &lt;a href="https://www.youtube.com/watch?v=WFO3Xe0uD5k"&gt;YouTube video&lt;/a&gt; for guidance.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Host the web map for free.&lt;/strong&gt;
Sign up on infinityfree.net and create an account. You can create up to three accounts under your username
&lt;strong&gt;Action:&lt;/strong&gt; Follow this &lt;a href="https://www.youtube.com/watch?v=eVT0UfeurOE&amp;amp;t=7s"&gt;YouTube video&lt;/a&gt; for guidance.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="http://chinazo.epizy.com/?i=1#15/6.4537/3.3928"&gt;Major Markets in Lagos&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tips to help you navigate the map.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click on any of the orange dots/marker to view the image.&lt;/li&gt;
&lt;li&gt;When the image opens, the name of the image describes the type of goods sold in the market.&lt;/li&gt;
&lt;li&gt;When you close the image, note the location of the dot/marker on the map. This helps you find your way to the market physically.&lt;/li&gt;
&lt;li&gt;To pan the map from a laptop, left-click and hold with your index finger then drag the map in different directions - Left, Right, Up, Down.&lt;/li&gt;
&lt;li&gt;Use the + and - icon to zoom in and out of the map.&lt;/li&gt;
&lt;li&gt;Use the search icon (below the - icon) to search for a keyword. For instance, while searching for Okirika, the images that have the name will pop up. You can click on the pop up to take you to the particular dot so that you can view the details.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This web map is not an exhaustive list of all the major markets in Lagos. If you need me to update the map with a market that is missing from it, kindly send me a mail on &lt;a href="mailto:stillmem.kyrian@gmail.com"&gt;stillmem.kyrian@gmail.com&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Please note that you will have sourced the image. You may or may not geotag it. So your email should have samples of images representing the markets that you want me to update on the list.&lt;/p&gt;

&lt;p&gt;Thank you for reading.&lt;/p&gt;

</description>
      <category>geospatial</category>
      <category>qgis</category>
      <category>coordinates</category>
      <category>location</category>
    </item>
    <item>
      <title>Plotting interactive map in python using Folium. Beginner friendly</title>
      <dc:creator>Chinazo-Anebelundu</dc:creator>
      <pubDate>Mon, 13 Jul 2020 08:21:10 +0000</pubDate>
      <link>https://dev.to/chinazoanebelundu/plotting-interactive-map-in-python-using-folium-beginner-friendly-6ni</link>
      <guid>https://dev.to/chinazoanebelundu/plotting-interactive-map-in-python-using-folium-beginner-friendly-6ni</guid>
      <description>&lt;p&gt;Here we are going to learn how to plot maps in jupyter notebook (or any other coding interface you prefer). This is very useful for doing some geospatial analysis. This is by no means an exhaustive work on geospatial analysis. But this article promises to be fun, super practical... and interactive. Okay, I already said interactive in the title. Plus you will learn other cool things you can do with your map.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For this article we will learn how to:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;1) Get a location coordinate.&lt;br&gt;
2) View a location on a map&lt;br&gt;
3) Add markers to a map. &lt;br&gt;
4) Add MarkerCluster to a map.&lt;br&gt;
5) Add Circle to a map.&lt;br&gt;
6) Add choropleth to a map.&lt;br&gt;
7) Measure distances between points on a map.&lt;br&gt;
8) Create buffers on a map.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Worthy of note;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;1) There are many different geospatial file formats such as shapefile, GeoJSON, KML, and GPKG.&lt;br&gt;
2) Geopandas is a library for reading geolocation data such as mentioned in 1 in python programming language. Install geopandas or use google colab to replicate what we are doing.&lt;br&gt;
3) Shapefile is the most common file type used.&lt;br&gt;
4) All of these file types can be quickly loaded with the gpd.read_file() function. Here you will have a geoDataFrame&lt;br&gt;
5) You require the longitude and latitude values as different columns.&lt;br&gt;
6) You also require a column that combines both latitude and longitude into a geometry. When you plot, this geometry can either be a &lt;br&gt;
point&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qpyXh67G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/tx395aen5cmwamgq9llm.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qpyXh67G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/tx395aen5cmwamgq9llm.PNG" alt="Alt Text" width="14" height="38"&gt;&lt;/a&gt;, linestring &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7aECCTiq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/axh4xlm7rf94szcat6ql.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7aECCTiq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/axh4xlm7rf94szcat6ql.PNG" alt="Alt Text" width="50" height="53"&gt;&lt;/a&gt;or polygon &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TC6ubPFO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qf639uzrna4hwxo70jd7.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TC6ubPFO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qf639uzrna4hwxo70jd7.PNG" alt="Alt Text" width="57" height="49"&gt;&lt;/a&gt;&lt;br&gt;
7) Every GeoDataFrame contains a special "geometry" (comprising of the cordinates) column. It contains all of the geometric objects that are displayed when we call the plot() method.&lt;br&gt;
8) All the datasets used in this article is obtained from Kaggle.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;First we import our dependencies&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hrr9BKGe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6o3ravpvzd8rveqj8xx9.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hrr9BKGe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6o3ravpvzd8rveqj8xx9.PNG" alt="Image 1" width="442" height="155"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note that Folium is a powerful Python library that helps you create several types of Leaflet maps. The fact that the Folium results are interactive makes this library very useful for dashboard building.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1) Get a location coordinate&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;First off, you need a coordinate of any location before you can visualize it on a map. This means you need two values, one for the latitude and the other for the longitude of the location. Don’t fret. That’s easy to obtain using the code snippet below. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oDxAS8CU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/sgc1r6ndjetozascmxq5.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oDxAS8CU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/sgc1r6ndjetozascmxq5.PNG" alt="Alt Text" width="709" height="187"&gt;&lt;/a&gt;&lt;br&gt;
Image 1&lt;/p&gt;

&lt;p&gt;Image 1, we used OpenStreetMap API to extract the coordinates. Other APIs are available and the list and code syntax can be found &lt;a href="https://geopy.readthedocs.io/en/stable/"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;2) View a location on a map&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Now that we have our coordinates and our dependencies are imported, let us proceed to plotting our map.&lt;br&gt;
Plotting your first map is as simple as running this one line of code&lt;/p&gt;

&lt;p&gt;world_map = folium.Map()&lt;br&gt;
World_map &lt;/p&gt;

&lt;p&gt;Let us use the coordinates of Canada to view Canada and also add some arguments to the basic&lt;br&gt;
Canada = folium.Map(location = [56.130,106.35], &lt;br&gt;
                    tiles='openstreetmap', &lt;br&gt;
                    zoom_start = 4)&lt;br&gt;
Canada&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QxM5Q7i7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/hnzg6rmxavdp0lk7iway.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QxM5Q7i7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/hnzg6rmxavdp0lk7iway.PNG" alt="Alt Text" width="880" height="386"&gt;&lt;/a&gt;&lt;br&gt;
Image 2&lt;/p&gt;

&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Location sets the initial center of the map. We use the latitude (56.130° N) and longitude (106.35° E) for the country of Canada.&lt;/p&gt;

&lt;p&gt;Tiles changes the styling of the map. Here we used the OpenStreetMap style. &lt;a href="https://github.com/pythonvisualization/folium/tree/master/folium/templates/tiles"&gt;Find other tile styles here&lt;/a&gt;. Just copy the name of each folder and insert in the tiles parameter. You can play around with different tiles. Below images are a few others.&lt;/p&gt;
&lt;/blockquote&gt;


&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--EoF94mst--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/q6uresxilj0uxlyzd9xh.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EoF94mst--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/q6uresxilj0uxlyzd9xh.PNG" alt="Alt Text" width="880" height="393"&gt;&lt;/a&gt;&lt;br&gt;
Image 2a&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tLSwp4PQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/xj17r7embhry5wp6manu.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tLSwp4PQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/xj17r7embhry5wp6manu.PNG" alt="Alt Text" width="880" height="429"&gt;&lt;/a&gt;&lt;br&gt;
Image 2b&lt;/p&gt;

&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Zoom_start sets the initial level of zoom of the map, where higher values zoom in closer to the map. You can play with different values.&lt;/p&gt;
&lt;/blockquote&gt;


&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;3) Add markers to a map&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Markers are used to denote exact locations on a map. Next we load our dataset which has a geometry column for coordinates. We will use this column to see the points on the map. We will achieve this by adding what is called marker to our map.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1VP52hg4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/5lkdwuqcthkxp259xfzx.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1VP52hg4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/5lkdwuqcthkxp259xfzx.PNG" alt="Alt Text" width="880" height="478"&gt;&lt;/a&gt;&lt;br&gt;
Image 3&lt;/p&gt;

&lt;p&gt;Sometimes we may have a marker-packed map like the image below&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9RpKzV4W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/vidvjkwrnf01g6xr042m.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9RpKzV4W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/vidvjkwrnf01g6xr042m.PNG" alt="Alt Text" width="880" height="477"&gt;&lt;/a&gt;&lt;br&gt;
Image 3a&lt;/p&gt;

&lt;p&gt;To make maps like this more appealing, this will lead us to MarkerClusters&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;4) Adding MarkerCluster to a map&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If we have a lot of markers to add, MarkerCluster can help to declutter the map. Each marker is added to a MarkerCluster object and each cluster displays the number of markers in it. When you click on each cluster, it expands and shows the markers in the cluster.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--M67nBjMs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/2c6k9hyfpyi41krwuibq.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--M67nBjMs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/2c6k9hyfpyi41krwuibq.PNG" alt="Alt Text" width="880" height="438"&gt;&lt;/a&gt;&lt;br&gt;
Image 4&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;5) Adding circles to a map&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Here we use circles instead of markers. By varying the size and color of each circle, we can also show the relationship between location and any other variable.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4uAip7Lp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/57z9qx6f8sztpp8386l1.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4uAip7Lp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/57z9qx6f8sztpp8386l1.PNG" alt="Alt Text" width="880" height="496"&gt;&lt;/a&gt;&lt;br&gt;
Image 5&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;6) Visualizing a Choropleth&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Choropleth is a type of thematic map in which areas are shaded or patterned in proportion to a statistical variable that represents an aggregate summary of a geographic characteristic within each area, such as population density or per-capita income. This means that regions with higher numbers (of your chosen variable) take a darker shade and gets lighter as the number decreases.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wkSJvoSy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/phfy97iyjbmw2fohff24.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wkSJvoSy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/phfy97iyjbmw2fohff24.PNG" alt="Alt Text" width="880" height="501"&gt;&lt;/a&gt;&lt;br&gt;
Image 6&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;7) Measuring distance on a map&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;To measure distances between points from two different GeoDataFrames, we first have to make sure that they use the same coordinate reference system (CRS). &lt;/p&gt;

&lt;p&gt;Check CRS: print(df.crs) &lt;br&gt;
Convert from one CRS to another (also called reprojecting): df.to_crs(espg : 2272)&lt;/p&gt;

&lt;p&gt;Also check the &lt;a href="https://epsg.io/"&gt;unit&lt;/a&gt; of the CRS. Insert the CRS in the search column.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OiV2iTNR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/jkng3l03s6s4d9o9gkdf.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OiV2iTNR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/jkng3l03s6s4d9o9gkdf.PNG" alt="Alt Text" width="704" height="520"&gt;&lt;/a&gt;&lt;br&gt;
Image 7&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zqgzy59I--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/b4vy92g76byewe60x5ib.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zqgzy59I--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/b4vy92g76byewe60x5ib.PNG" alt="Alt Text" width="880" height="257"&gt;&lt;/a&gt;&lt;br&gt;
Image 7a&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;8) Creating a buffer in a map&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Buffer is used for getting all points within a specified distance away from a point of interest (POI).&lt;/p&gt;

&lt;p&gt;Firstly, we create a buffer around all the monitoring air stations (POI). The code cell below creates a GeoSeries two_mile_buffer containing 12 different Polygon objects. Each polygon is a buffer of 2 miles (or, 2*5280 feet) around a different air monitoring station.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0IjSSlYZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ef62ye6cp9s4mtdhcvpo.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0IjSSlYZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ef62ye6cp9s4mtdhcvpo.PNG" alt="Alt Text" width="560" height="187"&gt;&lt;/a&gt;&lt;br&gt;
Image 8&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--86Ne1nyI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/06o4mc49o40lhsdwdauu.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--86Ne1nyI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/06o4mc49o40lhsdwdauu.PNG" alt="Alt Text" width="880" height="511"&gt;&lt;/a&gt;&lt;br&gt;
Image 8a&lt;/p&gt;

&lt;p&gt;To test if a toxic release occurred within 2 miles of any monitoring air station, we will first collapse all of the polygons into a MultiPolygon object. We do this with the unary_union attribute.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--e-qkfBls--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/witqwl30gk42nj778v6j.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--e-qkfBls--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/witqwl30gk42nj778v6j.PNG" alt="Alt Text" width="688" height="482"&gt;&lt;/a&gt;&lt;br&gt;
Image 8b&lt;/p&gt;

&lt;p&gt;We use the contains() method to check if the multipolygon contains a toxic release point. We will use the toxic release incident from earlier, which we know is roughly 3781 feet to the closest monitoring station. We will also check other random toxic release points&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YmNDaJt8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/f97rcyfgatlt9wlik4ng.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YmNDaJt8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/f97rcyfgatlt9wlik4ng.PNG" alt="Alt Text" width="623" height="264"&gt;&lt;/a&gt;&lt;br&gt;
Image 8c&lt;/p&gt;

&lt;p&gt;I hope you enjoyed this article. I'm still learning and will appreciate your critique.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Find me online&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Twitter: @rKyrian&lt;br&gt;
LinkedIn: Chinazo Anebelundu&lt;br&gt;
Instagram: @chinazo-anebel&lt;br&gt;
Facebook: Chinazo Anebelundu&lt;/p&gt;

&lt;p&gt;Find the notebook and datasets &lt;a href="https://github.com/Chinazo-Anebelundu/Interactive-maps-with-folium.-Beginner-friendly"&gt;here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>geospatial</category>
      <category>python</category>
      <category>folium</category>
      <category>mapsvisualization</category>
    </item>
  </channel>
</rss>
