<commit_before>Template.dashboardChartsAgeGroup.onCreated(function () {
  this.subscribe('childRegistrantCount');
  this.subscribe('youthRegistrantCount');
  this.subscribe('teenRegistrantCount');
  this.subscribe('youngAdultRegistrantCount');
  this.subscribe('adultRegistrantCount');
});
Template.dashboardChartsAgeGroup.onRendered(function () {
  // Get reference to template instance
  const instance = this;

  instance.autorun(function () {
    if (instance.subscriptionsReady()){
      // Create an empty counts object
      const ageGroupData = {};

      // Get the values for each count
      ageGroupData.child = Counts.get('childRegistrantCount');
      ageGroupData.youth = Counts.get('youthRegistrantCount');
      ageGroupData.teen = Counts.get('teenRegistrantCount');
      ageGroupData.youngAdult = Counts.get('youngAdultRegistrantCount');
      ageGroupData.adult = Counts.get('adultRegistrantCount');

      // Get all age groups
      const ageGroupKeys = _.keys(ageGroupData);

      // Create an object with ageGroup and count keys
      const parsedAgeGroupData = _.map(ageGroupKeys, function (ageGroup) {
        // Create a placeholder object
        const ageGroupCount = {};

        // Humanize the age group
        const humanizedAgeGroup = S(ageGroup).humanize().s

        // Set ageGroup value to humanized age group
        ageGroupCount.ageGroup = humanizedAgeGroup;

        // Set age group count to corresponding value from ageGroupData
        ageGroupCount.count = ageGroupData[ageGroup];

        return ageGroupCount;
      });

      // Get reference to template svg placeholder
      const svg = dimple.newSvg("#chartContainer", "100%", "100%");

      // Construct a dimple chart
      const ageGroupChart = new dimple.chart(svg, parsedAgeGroupData);
      ageGroupChart.setBounds("7%", "5%", "90%", "80%")
      ageGroupChart.addCategoryAxis("x", "ageGroup");
      const yAxis = ageGroupChart.addMeasureAxis("y", "count");
      yAxis.tickFormat = "d";
      ageGroupChart.addSeries(null, dimple.plot.bar);
      ageGroupChart.draw();
    }
  });
});<commit_msg>Uppercase y axis label<commit_after>Template.dashboardChartsAgeGroup.onCreated(function () {
  this.subscribe('childRegistrantCount');
  this.subscribe('youthRegistrantCount');
  this.subscribe('teenRegistrantCount');
  this.subscribe('youngAdultRegistrantCount');
  this.subscribe('adultRegistrantCount');
});
Template.dashboardChartsAgeGroup.onRendered(function () {
  // Get reference to template instance
  const instance = this;

  instance.autorun(function () {
    if (instance.subscriptionsReady()){
      // Create an empty counts object
      const ageGroupData = {};

      // Get the values for each count
      ageGroupData.child = Counts.get('childRegistrantCount');
      ageGroupData.youth = Counts.get('youthRegistrantCount');
      ageGroupData.teen = Counts.get('teenRegistrantCount');
      ageGroupData.youngAdult = Counts.get('youngAdultRegistrantCount');
      ageGroupData.adult = Counts.get('adultRegistrantCount');

      // Get all age groups
      const ageGroupKeys = _.keys(ageGroupData);

      // Create an object with ageGroup and count keys
      const parsedAgeGroupData = _.map(ageGroupKeys, function (ageGroup) {
        // Create a placeholder object
        const ageGroupCount = {};

        // Humanize the age group
        const humanizedAgeGroup = S(ageGroup).humanize().s

        // Set ageGroup value to humanized age group
        ageGroupCount.ageGroup = humanizedAgeGroup;

        // Set age group count to corresponding value from ageGroupData
        ageGroupCount.count = ageGroupData[ageGroup];

        return ageGroupCount;
      });

      // Get reference to template svg placeholder
      const svg = dimple.newSvg("#chartContainer", "100%", "100%");

      // Construct a dimple chart
      const ageGroupChart = new dimple.chart(svg, parsedAgeGroupData);
      ageGroupChart.setBounds("7%", "5%", "90%", "80%")
      ageGroupChart.addCategoryAxis("x", "ageGroup");
      const yAxis = ageGroupChart.addMeasureAxis("y", "count");
      yAxis.tickFormat = "d";
      yAxis.title = "Count";
      ageGroupChart.addSeries(null, dimple.plot.bar);
      ageGroupChart.draw();
    }
  });
});
{'fraction_non_alphanumeric': 0.11583646616541353, 'fraction_numerical': 0.005639097744360902, 'mean_word_length': 3.397727272727273, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6742177', 'n_tokens_mistral': 1251, 'n_tokens_neox': 1191, 'n_words': 267}