Sorting a list of CSV lines is easier if you make every line a tuple (doesn't the csv module give you the rows as tuples already?) and put the tuples in a list. Then you can sort the list with a key to sort by a specific tuple element:
geodata = ... # List of rows (tuples) from the CSV file
# Make a sorted copy of geodata, sorted by the third entry in each row (the population)
sorted_geodata = sorted(geodata, key=lambda row: row[2])
# Or sort geodata in place (this overwrites geodata with the sorted version)
geodata.sort(key=lambda row: row[2])
If you don't know what lambda means, it's a shorthand for defining a function. You could also write:
def get_pop_from_row(row):
return row[2]
sorted_geodata = sorted(geodata, key=get_pop_from_row)
Here you can also see what get_pop_from_row does. For example, if you run get_pop_from_row(geodata[0]) in the console (after running your script), it returns 189120 (assuming that Aberdeen is first in the list). The sorted function does this for every row, and compares the values returned by get_pop_from_row.
But for very short functions, like sort keys, lambda is more convenient.