python でジオコーディング

住所から緯度と経度を取得する。

参考

Pythonでジオコーディング(Geocoder/Googlemaps)

インストール

pip install geocoder

サンプルコード

import geocoder

def geocoding(address):
    result = geocoder.osm(address, timeout=5.0)
    return result.lat, result.lng
YouTube