Session 2, #2: Plotting Cities


We used a coordinate system to plot points to the screen. There is a standard coordinate system for plotting locations on the earth to the screen:

The origin, (0,0), for this coordinate system lies at a point in the Atlantic Ocean, off the coast of Africa. The axes are:

Locations are often described how far east or west and north or south they are of the origin. For example, the location of New York City is 40.7 North and 74.0 West. To plot this, we will use the following convention:

Using this convention, the coordinates for New York City are (-74.0, 40.7).

Here's our map as the background of a Python program (if you do not see the full map on your screen, drag the middle gray bar to the left until you do):

The x-values range from -180 to 180; the y-values range from -90 to 90.

Challenge: Run the program and add the code to stamp out the additional cities:
• Los Angeles: (-118, 34),
• Santo Domingo, DR: (-69, 18),
• Tokyo, Japan: 140 degrees east, 35 degrees north,
• Auckland, New Zealand: 174E, 36S, and
• A city that you would like to visit (latlong search tool).