R Programming, how to replicate for districts in a city I am new to R Programming and just learned basics through codeschool.com

Our network spans the city, and it is divided into districts.

I would like to create a map that assigns a value (based on ratio of outdated software and new software) to each district.

This website has sample of 3-D maps that were created by R Programming, and I see one I am very interested in replicating, but for our city only. 

But when I see the source code, I don't see any mention of latitude or longitude. 

My head is spinning, trying to figure out how I will input this, i.e latitude and longitude of a district in our city, versus an assigned ratio, which I believe will be read from a spreadsheet.

Thanks for any guidance.
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].