W
W
Wet_Dumplings2021-01-13 12:51:29
Python
Wet_Dumplings, 2021-01-13 12:51:29

How to translate the name of the city into coordinates on the repl.it service without any keyapi?

Hello!!

How, if possible, to translate the contents of the file in the spirit:

Москва
Киев

Here is something like this:
Москва, широта_М, долгота_М
Киев, широта_К, долгота_К


On the https://repl.it/ service , when you try to use such a code, an error occurs that requires you to get a Google api key, is it possible to somehow avoid this because it's too complicated ... is there any command for geocoding without such complications available on this service (repl.it) ?
Query: https://maps.google.com/maps/api/geocode/json?addr...
import csv
import pygeocoder
import pandas as pd

from pygeocoder import Geocoder

df = pd.read_csv('./input.csv')
address = df
for a in address:
    result = Geocoder.geocode(a)
    print(result[0].coordinates)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question