''' Purpose: determine a rough estimate of the geocenter of the continental USA ''' # get access to web-based data support import url # specify dataset web location CSV_WEB_FOLDER = 'http://www.cs.virginia.edu/~cs1112/datasets/csv/' USA_DATASET = CSV_WEB_FOLDER + 'continental-usa.csv' # get the dataset of interest dataset = url.get_dataset( USA_DATASET ) # determine webfile header and location data header = dataset[ 0 ] locations = dataset[ 1 : ] # determine geocenter # a loop that might be helpful for solving the problem for entry in locations : zipcode, town, state, latitude, longitude = entry