Skip to content

Latest commit

 

History

History
46 lines (28 loc) · 1.57 KB

Python_Locate_coordinates.md

File metadata and controls

46 lines (28 loc) · 1.57 KB



Template request | Bug report | Generate Data Product

Tags: #python #snippet #naas #geocoder

Author: Suhas B

Description: This notebook provides a way to find the geographic coordinates of a given location using Python.

Input

Import libraries

try:
    import geocoder
except:
    !pip install geocoder --user
    import geocoder

Setup Variables

latitude = 12.30215530579874
longitude = 76.65306751341747

Model

Get location from coordinates

location_from_coordinates = geocoder.arcgis([latitude, longitude], method="reverse")

Output

Display location from coordinates

print(f"Location from coordinates: {location_from_coordinates[0]}")