function makeCommitDataManager(data) {
  /* data: an array of commits, in time order
     a commit:
       date: dateTime
       byDirectory: [{directory: string, additions: num, deletions: num, lines: num}]
       changes: [{fileName: string, directory: string, additions, deletions, lines}]
  returns:
  commits            : an array of commit objects: [name: name, date: date, lines: lines] - FILTER BY DIRECTORY ONLY
  directoryTimeSeries: object mapping from directory name to a DirectoryTimeSeries which is an array of [date, cumulativeLines] objects, filtered by person selector - FILTER BY PERSON ONLY
  linesByContributor : an array of [contributor, lines] lists which have been filtered to the directory selector - FILTER BY DIRECTORY ONLY
  linesByDirectory   : an array of [directory, lines] pairs, filtered by the person selector (if appropriate) - FILTER BY PERSON ONLY

  */
  var contributors = ["danmane", "jlan", "aramaswamy", "derekcicerone"];
  var directories = ["/", "lib", "src", "examples", "typings", "test"];

  var f = function(selector) {
    var isContributorSelector = contributors.indexOf(selector) !== -1;
    var isDirectorySelector   = directories .indexOf(selector) !== -1;

    function personFilter(c) {
      if (isContributorSelector) {
        return c.name === selector;
      }
      return true;
    }

    processedCommits = [];
    directoryTimeSeries = {"/": [], "src": [], "lib": [], "examples": [], "typings": [], "test": []};
    linesByContributor = {"danmane": 0, "jlan": 0, "aramaswamy": 0, "derekcicerone": 0};
    linesByDirectory = {"/": 0, "lib": 0, "examples": 0, "typings": 0, "test": 0};

    data.forEach(function(c) {
      var date = c.date;
      directories.forEach(function(d) {
        directoryTimeSeries[d].push([new Date(date - 1), linesByDirectory[d]]);
      });
      if (personFilter(c)) {
        directories.forEach(function(d) {
          if (c.byDirectory[d] != null) {
            linesByDirectory[d] += c.byDirectory[d].lines;
          }
        });
      }
      directories.forEach(function(d) {
        directoryTimeSeries[d].push([date, linesByDirectory[d]]);
      });

      var directoriesToIterateOver = isDirectorySelector ? [selector] : directories;
      var lines = 0;
      directoriesToIterateOver.forEach(function(d) {
        l = c.byDirectory[d];
        l = (l == null) ? 0 : l.lines;
        lines += l;
      });
      processedCommits.push({name: c.name, date: date, lines: lines});
      linesByContributor[c.name] += lines;
    });




    return {"commits": processedCommits, "linesByContributor": linesByContributor, "directoryTimeSeries": directoryTimeSeries, "linesByDirectory": linesByDirectory}
  }
  f.contributors = contributors;
  f.directories = directories;
  return f;
}

@@ -1490,16 +1490,19 @@
 tributor
+Obj
  = %7B%22dan
@@ -1580,16 +1580,19 @@
 irectory
+Obj
  = %7B%22/%22:
@@ -1808,32 +1808,35 @@
 linesByDirectory
+Obj
 %5Bd%5D%5D);%0A      %7D);
@@ -1973,24 +1973,27 @@
 sByDirectory
+Obj
 %5Bd%5D += c.byD
@@ -2142,16 +2142,19 @@
 irectory
+Obj
 %5Bd%5D%5D);%0A 
@@ -2516,16 +2516,19 @@
 tributor
+Obj
 %5Bc.name%5D
@@ -2547,17 +2547,321 @@
    %7D);%0A%0A
-%0A
+    var linesByDirectory = %5B%5D;%0A    var linesByContributor = %5B%5D;%0A    directories.forEach(function(d) %7B%0A      linesByDirectory.push(%7Bdirectory: d, lines: linesByDirectoryObj%5Bd%5D%7D)%0A    %7D);%0A    contributors.forEach(function(d) %7B%0A      linesByContributor.push(%7Bname: d, lines: linesByContributorObj%5Bd%5D%7D)%0A    %7D);
 %0A%0A    re

Update data manager per justin's request