Latitude and longitude are calculated as population-weighted averages of the latitude and longitude of individual blocks. Similar methods can be used to obtain the average latitude and longitude of other geographic areas, for example block groups.
The example given is for a UNIX computer which has an "unzip" utility and "cut" program for extracting files from a comma-delimited file. (At Lawrence Berkeley National Laboratory (LBNL), type "module load unzip" to access unzip.)
unzip -p ak.zip |cut -f32,34-36 -d, >ak.tmp; rm ak.zip