R Programming, how to replicate for districts in a city
The latitude and longitude are stored in a text file that is read into a table, Dat.  It has the form:

lat long climate-group


For your particular case, you would calculate Dat[, 3].