matplotlib - Convert str( location ) to tuple of (Longitude,Latitude) in Python 3? -


i'm doing webscraping list of locations. want try , convert these respective longitude , latitude coordinates. found geopy looks right stuff.

with or without geopy, how can convert list respective coordinates (lon: (from -180,180) , lat: (from -90,90)) within python 3.5?

preferably precise coordinates if not possible, general area coordinates work well.

i found resource trying mimic https://pypi.python.org/pypi/geopy

#convert longitude/latitude geopy.geocoders import nominatim  geolocator = nominatim()  locations = ['kahekili beach/old airport beach, leeward shore maui', 'outside honokohau harbor south / naia / ripoff reef, north kona coast', 'ulua beach, leeward shore maui', 'kaiwi pt./arch cave/wash rock/sand channel/kamanu/devils doorway, north kona coast', 'honolua bay mlcd, leeward shore maui', 'golden arches', 'lone tree arch / freeze face cave, north kona coast', 'old airport', 'turtle heaven, north kona coast', 'turtle pinnacle/turtle towers/north of honokohau harbor entrance/terrapin station/turtle pai, north kona coast']     location in locations:     location = geolocator.geocode(location)   error  +service timed out 


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -