{"id":11011,"date":"2020-07-02T00:32:15","date_gmt":"2020-07-02T00:32:15","guid":{"rendered":"https:\/\/holypython.com\/?p=11011"},"modified":"2021-03-30T21:21:25","modified_gmt":"2021-03-30T21:21:25","slug":"locations-in-python-geocoding-w-geopy","status":"publish","type":"post","link":"https:\/\/holypython.com\/locations-in-python-geocoding-w-geopy\/","title":{"rendered":"Locations in Python (Geocoding w\/Geopy)"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"11011\" class=\"elementor elementor-11011\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-494a5f78 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"494a5f78\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-268a62aa\" data-id=\"268a62aa\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-inner-section elementor-element elementor-element-7b4a8994 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"7b4a8994\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-50 elementor-inner-column elementor-element elementor-element-1b6d2e09\" data-id=\"1b6d2e09\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-74c3697e elementor-widget elementor-widget-menu-anchor\" data-id=\"74c3697e\" data-element_type=\"widget\" data-widget_type=\"menu-anchor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-menu-anchor\" id=\"intro\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-78633aa2 elementor-widget elementor-widget-image\" data-id=\"78633aa2\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"683\" height=\"831\" src=\"https:\/\/holypython.com\/wp-content\/uploads\/2020\/07\/43f70d20e48a-CC.jpg\" class=\"attachment-large size-large wp-image-11028\" alt=\"\" srcset=\"https:\/\/holypython.com\/wp-content\/uploads\/2020\/07\/43f70d20e48a-CC.jpg 683w, https:\/\/holypython.com\/wp-content\/uploads\/2020\/07\/43f70d20e48a-CC-247x300.jpg 247w\" sizes=\"(max-width: 683px) 100vw, 683px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<div class=\"elementor-column elementor-col-50 elementor-inner-column elementor-element elementor-element-5a14331a\" data-id=\"5a14331a\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-6e06347c elementor-position-left elementor-view-default elementor-mobile-position-top elementor-vertical-align-top elementor-widget elementor-widget-icon-box\" data-id=\"6e06347c\" data-element_type=\"widget\" data-widget_type=\"icon-box.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-icon-box-wrapper\">\n\n\t\t\t\t\t\t<div class=\"elementor-icon-box-icon\">\n\t\t\t\t<span  class=\"elementor-icon\">\n\t\t\t\t<i aria-hidden=\"true\" class=\"far fa-clock\"><\/i>\t\t\t\t<\/span>\n\t\t\t<\/div>\n\t\t\t\n\t\t\t\t\t\t<div class=\"elementor-icon-box-content\">\n\n\t\t\t\t\t\t\t\t\t<h4 class=\"elementor-icon-box-title\">\n\t\t\t\t\t\t<span  >\n\t\t\t\t\t\t\tEstimated Time\t\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/h4>\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t<p class=\"elementor-icon-box-description\">\n\t\t\t\t\t\t10 mins\t\t\t\t\t<\/p>\n\t\t\t\t\n\t\t\t<\/div>\n\t\t\t\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-40a1ff4c elementor-widget elementor-widget-raven-divider\" data-id=\"40a1ff4c\" data-element_type=\"widget\" data-widget_type=\"raven-divider.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"raven-widget-wrapper\">\r\n\t\t\t<div class=\"raven-divider\">\r\n\t\t\t\t<span class=\"raven-divider-line raven-divider-solid\"><\/span>\r\n\t\t\t<\/div>\r\n\t\t<\/div>\r\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-77932d5e elementor-position-left elementor-view-default elementor-mobile-position-top elementor-vertical-align-top elementor-widget elementor-widget-icon-box\" data-id=\"77932d5e\" data-element_type=\"widget\" data-widget_type=\"icon-box.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-icon-box-wrapper\">\n\n\t\t\t\t\t\t<div class=\"elementor-icon-box-icon\">\n\t\t\t\t<span  class=\"elementor-icon\">\n\t\t\t\t<i aria-hidden=\"true\" class=\"far fa-thumbs-up\"><\/i>\t\t\t\t<\/span>\n\t\t\t<\/div>\n\t\t\t\n\t\t\t\t\t\t<div class=\"elementor-icon-box-content\">\n\n\t\t\t\t\t\t\t\t\t<h4 class=\"elementor-icon-box-title\">\n\t\t\t\t\t\t<span  >\n\t\t\t\t\t\t\tSkill Level\t\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/h4>\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t<p class=\"elementor-icon-box-description\">\n\t\t\t\t\t\tIntermediate\t\t\t\t\t<\/p>\n\t\t\t\t\n\t\t\t<\/div>\n\t\t\t\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-18877162 elementor-widget elementor-widget-raven-divider\" data-id=\"18877162\" data-element_type=\"widget\" data-widget_type=\"raven-divider.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"raven-widget-wrapper\">\r\n\t\t\t<div class=\"raven-divider\">\r\n\t\t\t\t<span class=\"raven-divider-line raven-divider-solid\"><\/span>\r\n\t\t\t<\/div>\r\n\t\t<\/div>\r\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1c0485e4 elementor-position-left elementor-view-default elementor-mobile-position-top elementor-vertical-align-top elementor-widget elementor-widget-icon-box\" data-id=\"1c0485e4\" data-element_type=\"widget\" data-widget_type=\"icon-box.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-icon-box-wrapper\">\n\n\t\t\t\t\t\t<div class=\"elementor-icon-box-icon\">\n\t\t\t\t<span  class=\"elementor-icon\">\n\t\t\t\t<i aria-hidden=\"true\" class=\"far fa-bookmark\"><\/i>\t\t\t\t<\/span>\n\t\t\t<\/div>\n\t\t\t\n\t\t\t\t\t\t<div class=\"elementor-icon-box-content\">\n\n\t\t\t\t\t\t\t\t\t<h4 class=\"elementor-icon-box-title\">\n\t\t\t\t\t\t<span  >\n\t\t\t\t\t\t\tExercises\t\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/h4>\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t<p class=\"elementor-icon-box-description\">\n\t\t\t\t\t\tna\t\t\t\t\t<\/p>\n\t\t\t\t\n\t\t\t<\/div>\n\t\t\t\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5552f07a elementor-widget elementor-widget-raven-divider\" data-id=\"5552f07a\" data-element_type=\"widget\" data-widget_type=\"raven-divider.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"raven-widget-wrapper\">\r\n\t\t\t<div class=\"raven-divider\">\r\n\t\t\t\t<span class=\"raven-divider-line raven-divider-solid\"><\/span>\r\n\t\t\t<\/div>\r\n\t\t<\/div>\r\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7ab1a24a elementor-position-left elementor-vertical-align-middle elementor-view-default elementor-mobile-position-top elementor-widget elementor-widget-icon-box\" data-id=\"7ab1a24a\" data-element_type=\"widget\" data-widget_type=\"icon-box.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-icon-box-wrapper\">\n\n\t\t\t\t\t\t<div class=\"elementor-icon-box-icon\">\n\t\t\t\t<span  class=\"elementor-icon\">\n\t\t\t\t<i aria-hidden=\"true\" class=\"fas fa-book\"><\/i>\t\t\t\t<\/span>\n\t\t\t<\/div>\n\t\t\t\n\t\t\t\t\t\t<div class=\"elementor-icon-box-content\">\n\n\t\t\t\t\t\t\t\t\t<h4 class=\"elementor-icon-box-title\">\n\t\t\t\t\t\t<span  >\n\t\t\t\t\t\t\tContent Sections\t\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/h4>\n\t\t\t\t\n\t\t\t\t\n\t\t\t<\/div>\n\t\t\t\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6f55083 elementor-vertical-align-middle elementor-widget elementor-widget-icon-box\" data-id=\"6f55083\" data-element_type=\"widget\" data-widget_type=\"icon-box.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-icon-box-wrapper\">\n\n\t\t\t\n\t\t\t\t\t\t<div class=\"elementor-icon-box-content\">\n\n\t\t\t\t\t\t\t\t\t<h4 class=\"elementor-icon-box-title\">\n\t\t\t\t\t\t<a href=\"#install\" >\n\t\t\t\t\t\t\tGeopy Installation\t\t\t\t\t\t<\/a>\n\t\t\t\t\t<\/h4>\n\t\t\t\t\n\t\t\t\t\n\t\t\t<\/div>\n\t\t\t\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1504b6e elementor-vertical-align-middle elementor-widget elementor-widget-icon-box\" data-id=\"1504b6e\" data-element_type=\"widget\" data-widget_type=\"icon-box.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-icon-box-wrapper\">\n\n\t\t\t\n\t\t\t\t\t\t<div class=\"elementor-icon-box-content\">\n\n\t\t\t\t\t\t\t\t\t<h4 class=\"elementor-icon-box-title\">\n\t\t\t\t\t\t<a href=\"#geocoders\" >\n\t\t\t\t\t\t\tGeocoders\t\t\t\t\t\t<\/a>\n\t\t\t\t\t<\/h4>\n\t\t\t\t\n\t\t\t\t\n\t\t\t<\/div>\n\t\t\t\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e537e9d elementor-vertical-align-middle elementor-widget elementor-widget-icon-box\" data-id=\"e537e9d\" data-element_type=\"widget\" data-widget_type=\"icon-box.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-icon-box-wrapper\">\n\n\t\t\t\n\t\t\t\t\t\t<div class=\"elementor-icon-box-content\">\n\n\t\t\t\t\t\t\t\t\t<h4 class=\"elementor-icon-box-title\">\n\t\t\t\t\t\t<a href=\"#using\" >\n\t\t\t\t\t\t\tGeopy Usage + Examples\t\t\t\t\t\t<\/a>\n\t\t\t\t\t<\/h4>\n\t\t\t\t\n\t\t\t\t\n\t\t\t<\/div>\n\t\t\t\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7726bbed elementor-widget elementor-widget-raven-divider\" data-id=\"7726bbed\" data-element_type=\"widget\" data-widget_type=\"raven-divider.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"raven-widget-wrapper\">\r\n\t\t\t<div class=\"raven-divider\">\r\n\t\t\t\t<span class=\"raven-divider-line raven-divider-solid\"><\/span>\r\n\t\t\t<\/div>\r\n\t\t<\/div>\r\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5a91e720 elementor-widget elementor-widget-heading\" data-id=\"5a91e720\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h4 class=\"elementor-heading-title elementor-size-default\">Course Provider<\/h4>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b99dd66 elementor-widget elementor-widget-text-editor\" data-id=\"b99dd66\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Provided by HolyPython.com<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-eb1019d elementor-widget elementor-widget-image\" data-id=\"eb1019d\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"398\" height=\"344\" src=\"https:\/\/holypython.com\/wp-content\/uploads\/2020\/10\/holypython_side_logo_img.jpg\" class=\"attachment-full size-full wp-image-15177\" alt=\"\" srcset=\"https:\/\/holypython.com\/wp-content\/uploads\/2020\/10\/holypython_side_logo_img.jpg 398w, https:\/\/holypython.com\/wp-content\/uploads\/2020\/10\/holypython_side_logo_img-300x259.jpg 300w\" sizes=\"(max-width: 398px) 100vw, 398px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<div class=\"elementor-element elementor-element-d987d0f elementor-widget elementor-widget-text-editor\" data-id=\"d987d0f\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Geocoding is the application when you type 5th Ave. New York, NY, 10010 and you get coordinates like this: (40.740200, -73.990586).<\/p><p>Geocoding process maps open addresses to coordinates consisted of longitude and latitude and vice versa.<\/p><p>Since the new millenia started and especially after the first Iphone 2g came out, gps applications have exponentially surged. Today it&#8217;s crazy to think that people used to carry big printed foldable maps in the glow compartments of their cars and routinely stop to look up roads and cities and figure out where they are headed.<\/p><p>Today, there are so many applications for geocoding and it&#8217;s making people&#8217;s lives better every single day. We are also witnessing different technologies being blended for an even better optimized service such as Voice Input technology in Google maps.<\/p><p>As a developer you might have a specific task at hand or you might just want to learn geo-coding basics thinking you&#8217;ll probably need it sometime anyway.<\/p><p>Let&#8217;s take a look at how this technology can be implemented in Python.<\/p><p>\u00a0<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1a0322e8 elementor-widget elementor-widget-heading\" data-id=\"1a0322e8\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Used Where?<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ab78f74 elementor-widget elementor-widget-text-editor\" data-id=\"ab78f74\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<ul><li>Maps<\/li><li>Location apps<\/li><li>Activity tracking<\/li><li>Emergency tracking<\/li><li>Food delivery<\/li><li>e-commerce<\/li><li>Games<\/li><li>Social Media<\/li><li>Photo geo-tagging<\/li><\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-2f2cd2a elementor-widget elementor-widget-menu-anchor\" data-id=\"2f2cd2a\" data-element_type=\"widget\" data-widget_type=\"menu-anchor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-menu-anchor\" id=\"install\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<section class=\"elementor-section elementor-inner-section elementor-element elementor-element-10a765f4 elementor-section-content-middle elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"10a765f4\" data-element_type=\"section\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-50 elementor-inner-column elementor-element elementor-element-241e5313\" data-id=\"241e5313\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-320a681b elementor-view-default elementor-widget elementor-widget-icon\" data-id=\"320a681b\" data-element_type=\"widget\" data-widget_type=\"icon.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-icon-wrapper\">\n\t\t\t<div class=\"elementor-icon\">\n\t\t\t<i aria-hidden=\"true\" class=\"fas fa-code\"><\/i>\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<div class=\"elementor-column elementor-col-50 elementor-inner-column elementor-element elementor-element-101eb5c2\" data-id=\"101eb5c2\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-56e26575 elementor-widget elementor-widget-heading\" data-id=\"56e26575\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">How to install geopy<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<div class=\"elementor-element elementor-element-bd168ed elementor-widget elementor-widget-text-editor\" data-id=\"bd168ed\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Geopy is a Python library that makes geocoding operations very accessible and practical. You can check if you have geopy in your libraries by using this code in <em><strong>Python<\/strong><\/em>:<\/p><p><code>help(\"modules\")<\/code><\/p><p>If you can&#8217;t see geopy in your library selection, it might be time to have it installed. You can do so simply by opening the <em><strong>Anaconda Command Prompt<\/strong><\/em> and typing the command below:<\/p><p><code>pip install geopy<\/code><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8248d78 elementor-widget elementor-widget-image\" data-id=\"8248d78\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t<figure class=\"wp-caption\">\n\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"978\" height=\"507\" src=\"https:\/\/holypython.com\/wp-content\/uploads\/2020\/07\/geopy-pip-install.jpg\" class=\"attachment-large size-large wp-image-11031\" alt=\"\" srcset=\"https:\/\/holypython.com\/wp-content\/uploads\/2020\/07\/geopy-pip-install.jpg 978w, https:\/\/holypython.com\/wp-content\/uploads\/2020\/07\/geopy-pip-install-300x156.jpg 300w, https:\/\/holypython.com\/wp-content\/uploads\/2020\/07\/geopy-pip-install-768x398.jpg 768w\" sizes=\"(max-width: 978px) 100vw, 978px\" \/>\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">Geopy installation using pip (already installed)<\/figcaption>\n\t\t\t\t\t\t\t\t\t\t<\/figure>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-106aa50 elementor-widget elementor-widget-menu-anchor\" data-id=\"106aa50\" data-element_type=\"widget\" data-widget_type=\"menu-anchor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-menu-anchor\" id=\"geocoders\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4e85796 elementor-widget__width-auto elementor-widget elementor-widget-heading\" data-id=\"4e85796\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Supported Geocoders (<i>Full list<\/i>)<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-722fa70 elementor-widget elementor-widget-text-editor\" data-id=\"722fa70\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Geopy supports majority of the major geocoders straight out of the box.\u00a0<\/p><p>Geocoders are a bit like APIs but for coding and they offer more services than a simple API. But you can make database calls using their APIs to retrieve data for your app, website, commercial or individual use. They usually differ in pricing, accuracy, coverage, technology, daily limits and compatibility.<\/p><p><i>Here is the full list of supported geocoders:<\/i><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-56de8e3 elementor-widget elementor-widget-text-editor\" data-id=\"56de8e3\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Specifying Parameters Once<br \/>Geopy Is Not a Service<br \/>Async Mode<br \/>Accessing Geocoders<br \/>Default Options Object<br \/>Usage with Pandas<br \/>AlgoliaPlaces<br \/>ArcGIS<br \/>AzureMaps<br \/>Baidu<br \/>BaiduV3<br \/>BANFrance<br \/>Bing<br \/>DataBC<br \/>GeocodeEarth<br \/>GeocodeFarm<br \/>Geolake<\/p><p>GeoNames<br \/>GoogleV3<br \/>HERE<br \/>IGNFrance<br \/>MapBox<br \/>MapQuest<br \/>MapTiler<br \/>OpenCage<br \/>OpenMapQuest<br \/>Nominatim<br \/>Pelias<br \/>Photon<br \/>PickPoint<br \/>LiveAddress<br \/>TomTom<br \/>What3Words<br \/>Yandex<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-684a48f elementor-widget elementor-widget-menu-anchor\" data-id=\"684a48f\" data-element_type=\"widget\" data-widget_type=\"menu-anchor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-menu-anchor\" id=\"using\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<section class=\"elementor-section elementor-inner-section elementor-element elementor-element-18e7d04 elementor-section-content-middle elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"18e7d04\" data-element_type=\"section\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-50 elementor-inner-column elementor-element elementor-element-d353c1a\" data-id=\"d353c1a\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-c64e481 elementor-view-default elementor-widget elementor-widget-icon\" data-id=\"c64e481\" data-element_type=\"widget\" data-widget_type=\"icon.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-icon-wrapper\">\n\t\t\t<div class=\"elementor-icon\">\n\t\t\t<i aria-hidden=\"true\" class=\"fas fa-code\"><\/i>\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<div class=\"elementor-column elementor-col-50 elementor-inner-column elementor-element elementor-element-8cd6fd3\" data-id=\"8cd6fd3\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-4acb9c0 elementor-widget elementor-widget-heading\" data-id=\"4acb9c0\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Using geopy<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<div class=\"elementor-element elementor-element-729f4c4 elementor-widget elementor-widget-text-editor\" data-id=\"729f4c4\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Geocoders usually use a technique called <strong>address interpolation.\u00a0<\/strong>This technique allows matching street, avenue, door number (street geographic information) type of parameters with geographic coordinate space that&#8217;s included in the map.<\/p><p>GPS is another obviously common geocoding process technique and there might be other specialized methods as well.<\/p><p>OpenStreetMap (OSM) is a collaborative project that offers a great geodata and map of\u00a0 Earth while Nominatim is a cool geocoder that makes use of OSM geodata and it can do both <i>geocoding <\/i>and <i>reverse geocoding.\u00a0<\/i>Now we will explore Nominatim with Python&#8217;s geopy library.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f50c365 elementor-widget elementor-widget-html\" data-id=\"f50c365\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<pre rel=\"Python\"><code>from geopy.geocoders import Nominatim\r\n<\/code><\/pre>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d9488bc elementor-widget elementor-widget-text-editor\" data-id=\"d9488bc\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Normally, geocoders accept a properly written address with street name and zip code. But, let&#8217;s test Nominatim and OpenStreetMap a little.<\/p><p>Ben &amp; Jerry&#8217;s is a very successful ice cream brand in the Northeastern United States. What would happen if we just pass &#8220;Ben &amp; Jerry&#8217;s&#8221; as the address to Nominatim using geopy?<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-82ee342 elementor-widget elementor-widget-html\" data-id=\"82ee342\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<pre rel=\"Python\"><code>from geopy.geocoders import Nominatim\r\ngeolocator = Nominatim(user_agent=\"name\")\r\naddress = \"Ben & Jerry's, VT\"\r\nlocation = geolocator.geocode(address)\r\n\r\nprint(location.address)\r\n\r\n<\/code><\/pre>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f50e20a elementor-widget elementor-widget-text-editor\" data-id=\"f50e20a\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<pre>Ben &amp; Jerry's, Newbury Street, Back Bay, Boston, Suffolk County, Massachusetts, 02116, United States of America<\/pre>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9d478d7 elementor-widget elementor-widget-image\" data-id=\"9d478d7\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t<figure class=\"wp-caption\">\n\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"375\" height=\"500\" src=\"https:\/\/holypython.com\/wp-content\/uploads\/2020\/07\/photo-1572974201645-64d84597e4b3-Custom.jpg\" class=\"attachment-large size-large wp-image-11039\" alt=\"\" srcset=\"https:\/\/holypython.com\/wp-content\/uploads\/2020\/07\/photo-1572974201645-64d84597e4b3-Custom.jpg 375w, https:\/\/holypython.com\/wp-content\/uploads\/2020\/07\/photo-1572974201645-64d84597e4b3-Custom-225x300.jpg 225w\" sizes=\"(max-width: 375px) 100vw, 375px\" \/>\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">Ice cream at Cafe with strawberry, mint and sorbet<\/figcaption>\n\t\t\t\t\t\t\t\t\t\t<\/figure>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3e9962c elementor-widget elementor-widget-text-editor\" data-id=\"3e9962c\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Interestingly it returns a Ben &amp; Jerry&#8217;s franchise in Boston, MA. Let&#8217;s try &#8220;Ben &amp; Jerry&#8217;s. VT&#8221; and &#8220;Ben &amp; Jerry&#8217;s NY&#8221; consecutively.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-56238ad elementor-widget elementor-widget-html\" data-id=\"56238ad\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<pre rel=\"Python\"><code>from geopy.geocoders import Nominatim\r\ngeolocator = Nominatim(user_agent=\"name\")\r\naddress1 = \"Ben & Jerry's, VT\"\r\naddress2 = \"Ben & Jerry's, NY\"\r\n\r\nlocation = geolocator.geocode(address1)\r\nprint(location.address)\r\n\r\nlocation = geolocator.geocode(address2)\r\nprint(location.address)\r\n<\/code><\/pre>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d7c8408 elementor-widget elementor-widget-text-editor\" data-id=\"d7c8408\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<pre>Ben &amp; Jerry's, Cherry Street, Church Street Marketplace, Burlington, Chittenden County, Vermont, 05401, United States of America<br \/>Ben &amp; Jerry's, Lomb Memorial Drive, Genesee Junction, Henrietta Town, Monroe County, New York, 14624-4721, United States of America<\/pre>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-704ea12 elementor-widget elementor-widget-text-editor\" data-id=\"704ea12\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>We get 2 seemingly random stores again. The one in Burlington seems pretty cool on Google Maps.<\/p><p>So, this is good enough on Nominatim&#8217;s part. Without even completing the address we are getting accurate results. Let&#8217;s try some other places from the world and see if non-US data is as accurate:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ff5b02b elementor-widget elementor-widget-html\" data-id=\"ff5b02b\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<pre rel=\"Python\"><code>from geopy.geocoders import Nominatim\r\ngeolocator = Nominatim(user_agent=\"name\")\r\naddress1 = \"Moulin Rouge\"\r\naddress2 = \"Noma\"\r\n\r\nlocation = geolocator.geocode(address1)\r\nprint(location.address)\r\n\r\nlocation = geolocator.geocode(address2)\r\nprint(location.address)\r\n<\/code><\/pre>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3f22ebf elementor-widget elementor-widget-text-editor\" data-id=\"3f22ebf\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<pre>Le Moulin Rouge, Boulevard de Clichy, Quartier des Grandes-Carri\u00e8res, Paris, \u00cele-de-France, France m\u00e9tropolitaine, 75018, France<br \/>Noma, Refshalevej, Margretheholm, Christianshavn, K\u00f8benhavn, K\u00f8benhavns Kommune, Region Hovedstaden, 1440, Danmark<\/pre>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-569d0ac elementor-widget elementor-widget-text-editor\" data-id=\"569d0ac\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Okay, pretty impressive. It even recognizes Denmark&#8217;s award winning Michelin Restaurant and shows up the address for only typing <em><strong>Noma. Let&#8217;s try to run &#8220;latitude&#8221;, &#8220;longitude&#8221; and &#8220;raw&#8221; properties for Noma as well.<\/strong><\/em><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-80f3114 elementor-widget elementor-widget-html\" data-id=\"80f3114\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<pre rel=\"Python\"><code>from geopy.geocoders import Nominatim\r\ngeolocator = Nominatim(user_agent=\"name\")\r\naddress = \"Noma\"\r\nlocation = geolocator.geocode(address)\r\n\r\nprint((location.latitude, location.longitude))\r\n\r\n<\/code><\/pre>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b1ee1a9 elementor-widget elementor-widget-text-editor\" data-id=\"b1ee1a9\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<pre>(55.6829314, 12.6104818)<\/pre>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7aa0e17 elementor-widget elementor-widget-html\" data-id=\"7aa0e17\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<pre rel=\"Python\"><code>print(location.raw)<\/code><\/pre>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6690b70 elementor-widget elementor-widget-text-editor\" data-id=\"6690b70\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<pre>{'place_id': 62456056, 'licence': 'Data \u00a9 OpenStreetMap contributors, ODbL 1.0. https:\/\/osm.org\/copyright', 'osm_type': 'node', 'osm_id': 5416925514, 'boundingbox': ['55.6828814', '55.6829814', '12.6104318', '12.6105318'], 'lat': '55.6829314', 'lon': '12.6104818', 'display_name': 'Noma, Refshalevej, Margretheholm, Christianshavn, K\u00f8benhavn, K\u00f8benhavns Kommune, Region Hovedstaden, 1440, Danmark', 'class': 'amenity', 'type': 'restaurant', 'importance': 0.46778439681543516, 'icon': 'https:\/\/nominatim.openstreetmap.org\/images\/mapicons\/food_restaurant.p.20.png'}<\/pre>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9e237b0 elementor-widget elementor-widget-text-editor\" data-id=\"9e237b0\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>It makes more sense to print this one with Python&#8217;s <b>pretty print library:<\/b><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d212a2f elementor-widget elementor-widget-html\" data-id=\"d212a2f\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<pre rel=\"Python\"><code>import pprint\npprint.pprint(location.raw)<\/code><\/pre>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e023671 elementor-widget elementor-widget-text-editor\" data-id=\"e023671\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<pre>{'boundingbox': ['55.6828814', '55.6829814', '12.6104318', '12.6105318'],<br \/> 'class': 'amenity',<br \/> 'display_name': 'Noma, Refshalevej, Margretheholm, Christianshavn, K\u00f8benhavn, '<br \/>                 'K\u00f8benhavns Kommune, Region Hovedstaden, 1440, Danmark',<br \/> 'icon': 'https:\/\/nominatim.openstreetmap.org\/images\/mapicons\/food_restaurant.p.20.png',<br \/> 'importance': 0.46778439681543516,<br \/> 'lat': '55.6829314',<br \/> 'licence': 'Data \u00a9 OpenStreetMap contributors, ODbL 1.0. '<br \/>            'https:\/\/osm.org\/copyright',<br \/> 'lon': '12.6104818',<br \/> 'osm_id': 5416925514,<br \/> 'osm_type': 'node',<br \/> 'place_id': 62456056,<br \/> 'type': 'restaurant'}<\/pre>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-50ff5c9 elementor-widget elementor-widget-text-editor\" data-id=\"50ff5c9\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>In raw data from geopy we can see bunch of useful information such as type (shown as restaurant here), latitude, longitude, class (shown as amenity) and importance.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9a6f7e8 elementor-widget__width-auto elementor-widget elementor-widget-heading\" data-id=\"9a6f7e8\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Distance calculations with Geopy<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1157632 elementor-widget elementor-widget-text-editor\" data-id=\"1157632\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>You can also calculate the distance between two locations or points using <b>geopy.distance <\/b>module.<\/p><p>Let&#8217;s see the distance between a Department Store with Tesla Supercharger near Orly Airport and Paris&#8217; finest ice-cream shop Berthillon. Geopy has been very successful at reverse geocoding place names to coordinates, let&#8217;s see if it can identify exact locations with little information again such as name.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5a5391e elementor-widget elementor-widget-html\" data-id=\"5a5391e\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<pre rel=\"Python\"><code>from geopy import distance\r\nimport geopy\r\n\r\nlocation1 = geolocator.geocode(\"Belle \u00c9pine, Thiais\")\r\nlocation2 = geolocator.geocode(\"Berthillon\")\r\na=(location1.latitude, location1.longitude)\r\nb=(location2.latitude, location2.longitude)\r\n\r\nprint(distance.distance(a, b).miles)<\/code><\/pre>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7120e09 elementor-widget elementor-widget-text-editor\" data-id=\"7120e09\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>&#8220;Belle Epine&#8221; wasn&#8217;t being picked up by Geopy by itself so adding the district&#8217;s name was a good idea. It&#8217;s probably always a good idea to be as explicit as possible with addresses anyways.\u00a0<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-843e599 elementor-widget elementor-widget-text-editor\" data-id=\"843e599\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<pre>6.630156139356959<\/pre>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d700c85 elementor-widget elementor-widget-text-editor\" data-id=\"d700c85\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>The distance can be expressed in many differeny measurement units other than miles. Let&#8217;s take a look at what <strong>help()<\/strong> function returns on <b>geopy.distance.distance<\/b>:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-22929de elementor-widget elementor-widget-html\" data-id=\"22929de\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<pre rel=\"Python\"><code>help(geopy.distance.distance)<\/code><\/pre>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9537025 elementor-widget elementor-widget-text-editor\" data-id=\"9537025\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<pre> |  feet<br \/> |  <br \/> |  ft<br \/> |  <br \/> |  kilometers<br \/> |  <br \/> |  km<br \/> |  <br \/> |  m<br \/> |  <br \/> |  meters<br \/> |  <br \/> |  mi<br \/> |  <br \/> |  miles<br \/> |  <br \/> |  nautical<br \/> |  <br \/> |  nm<\/pre>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d562fd9 elementor-widget elementor-widget-text-editor\" data-id=\"d562fd9\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Great, there are tons of options! Let&#8217;s try <b>km<\/b>, since <b>miles<\/b> won&#8217;t make a lot of sense in France.<\/p><p>\u00a0<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-baa2c68 elementor-widget elementor-widget-html\" data-id=\"baa2c68\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<pre rel=\"Python\"><code>from geopy import distance\r\nimport geopy\r\n\r\nlocation1 = geolocator.geocode(\"Belle \u00c9pine, Thiais\")\r\nlocation2 = geolocator.geocode(\"Berthillon\")\r\na=(location1.latitude, location1.longitude)\r\nb=(location2.latitude, location2.longitude)\r\n\r\nprint(distance.distance(a, b).km)<\/code><\/pre>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d54ba6c elementor-widget elementor-widget-text-editor\" data-id=\"d54ba6c\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<pre>10.670202001937287<\/pre>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Estimated Time 10 mins Skill Level Intermediate Exercises na Content Sections Geopy Installation Geocoders Geopy Usage + Examples Course Provider Provided by HolyPython.com Geocoding is the application when you type 5th Ave. New York, NY, 10010 and you get coordinates like this: (40.740200, -73.990586). Geocoding process maps open addresses to coordinates consisted of longitude and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":11020,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[34,52],"tags":[],"class_list":["post-11011","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-intermediate","category-tutorials"],"acf":[],"_links":{"self":[{"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/posts\/11011","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/comments?post=11011"}],"version-history":[{"count":0,"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/posts\/11011\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/media\/11020"}],"wp:attachment":[{"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/media?parent=11011"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/categories?post=11011"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/tags?post=11011"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}