Python - getting a city population named after it

What is a good python API that I can use to get the population of a city? I tried using a geocoder, but it doesn’t work - I don’t know why.

geocoder.population('San Francisco, California')

returns

'module' object has no attribute 'population'

Why is this happening, and how can I fix it?

Alternatively, is there another python api I can use for this?

+4
source share

Source: https://habr.com/ru/post/1670254/


All Articles