Due: Friday, October 1, 2021
Reading from Learning Python by Building Data Science Applications: First Script - Geocoding with Web APIs. The Jupyter notebook named Using a Web API in the class sample repository demonstrates the code.
Write a Python program named homework-02.py that accepts a city name as a command line argument (you will have to enclose the argument in quotes if it contains spaces). It should then use the Nominatim API to look up the "boundingbox" property of that city. Compute the distance along the north/south edge of that box and along the east/west edge of the box using the formula shown in the Jupyter notebook. Compute the area (in square miles) of the region occupied by that city (here you can assume the region is flat... disregard the curvature of the Earth).
Which is physically larger, New York City or Mexico City?
Submit your homework-02.py to Canvas.
Last Revised: 2025-01-09
© Copyright 2025 by Peter Chapin <peter.chapin@vermontstate.edu>