py4e.com - Chapter 13 - Google geocoding web service/Exercise 1
The section "Google geocoding web service" in Chapter 13 has not been updated to match the code change from Google services to OpenStreetMap.
geojson.py has been commented to point the user to opengeo.py.
The instructions for Exercise 1 no longer match the format of the data being returned. Exercise 1: "Change [geojson.py] (https://www.py4e.com/code3/geojson.py) to print out the two-character country code from the retrieved data." OpenStreetMap returns the full country name and not a two-letter code.
Examples included below:
Retrieving https://py4e-data.dr-chuck.net/opengeo?q=Ann+Arbor%2C+MI Retrieved 1318 characters {"type":"FeatureColl lat 42.2813722 lon -83.7484616 Ann Arbor, MI, United States of America
Retrieving https://py4e-data.dr-chuck.net/opengeo?q=Birmingham%2C+England Retrieved 1366 characters {"type":"FeatureColl lat 52.4796992 lon -1.9026911 Birmingham, ENG, United Kingdom
Retrieving https://py4e-data.dr-chuck.net/opengeo?q=Atlantic+Ocean Retrieved 993 characters {"type":"FeatureColl lat 13.581921 lon -38.320312 Atlantic Ocean
Retrieving https://py4e-data.dr-chuck.net/opengeo?q=Zwanenburg Retrieved 1261 characters {"type":"FeatureColl lat 52.3779288 lon 4.7436402 Zwanenburg, NH, Netherlands
Retrieving https://py4e-data.dr-chuck.net/opengeo?q=Reudnitz Retrieved 1262 characters {"type":"FeatureColl lat 51.4128223 lon 13.0692273 Reudnitz (Reudnitz), Saxony, Germany