misc functions for munging, summarizing, and analyzing various data sets