<commit_before>app
  .controller('juxtaCtrl', function($scope, authFactory, apiFactory, firebaseFactory, $location, $routeParams, players) {
    // console.log('juxtaCtrl firing')

  // ______ set variables ______
    $scope.playerList = players  // full list of nfl players
    $scope.nameX = $routeParams.paramX // player x name
    $scope.nameY = $routeParams.paramY // player y name
    $scope.week = $routeParams.week


  // _____ radar/bar chart labels _____
    $scope.radarLabels = ["Average projection", "High projection", "Low projection"]
    $scope.barLabels = ["Projected Season Pts", "Actual Season Pts", "Projected Weekly Pts", "Actual Weekly Pts"]
    $scope.series = [$routeParams.paramX, $routeParams.paramY]  // setting series names for bar chart


  // _______ define functions ______
    $scope.setPlayers = function (input, output) { // find input player in playerList, set player object to output
      for (let i = 0; i < $scope.playerList.length; i++) {
        if ($scope[input] === ($scope.playerList[i].player.FirstName + " " + $scope.playerList[i].player.LastName)) {
          $scope[output] = $scope.playerList[i]
        }
      }
    }

    $scope.showProjections = function (guy, letter, pos) {
      apiFactory.getNerdProjections($scope[pos].player.Position, $scope.week)
        .then((projections) => {
          // console.log(projections)
          for (i = 0; i < projections.length; i++) {
            if (projections[i].displayName === guy) {   // find matching player
              $scope[letter] = projections[i]
              // console.log($scope[letter])
            }
          }
        })
    }

    $scope.showRankings = function (dude, letter, pos, posit) {
      apiFactory.getNerdRankings($scope[posit].player.Position, $scope.week)
        .then((rankings) => {
          for (j = 0; j < rankings.length; j++) {
            if (rankings[j].name === dude) {   // find matching player
              $scope[letter] = rankings[j];
              $scope[pos] = j + 1;

              $scope.radarData = [  // inject stat variables into graph
                [$scope.rankingsX.ppr, $scope.rankingsX.pprHigh, $scope.rankingsX.pprLow],
                [$scope.rankingsY.ppr, $scope.rankingsY.pprHigh, $scope.rankingsY.pprLow]
              ]
            }
          }
        })
    }

    $scope.showStats = function (guy, seasonProj, season, weekProj, week) {
      apiFactory.getNflStats($scope.week)
        .then((stats) => {
          for (k = 0; k < stats.length; k++) {<commit_msg>fixed bug with radar data<commit_after>app
  .controller('juxtaCtrl', function($scope, authFactory, apiFactory, firebaseFactory, $location, $routeParams, players) {
    // console.log('juxtaCtrl firing')

  // ______ set variables ______
    $scope.playerList = players  // full list of nfl players
    $scope.nameX = $routeParams.paramX // player x name
    $scope.nameY = $routeParams.paramY // player y name
    $scope.week = $routeParams.week


  // _____ radar/bar chart labels _____
    $scope.radarLabels = ["Average projection", "High projection", "Low projection"]
    $scope.barLabels = ["Projected Season Pts", "Actual Season Pts", "Projected Weekly Pts", "Actual Weekly Pts"]
    $scope.series = [$routeParams.paramX, $routeParams.paramY]  // setting series names for bar chart


  // _______ define functions ______
    $scope.setPlayers = function (input, output) { // find input player in playerList, set player object to output
      for (let i = 0; i < $scope.playerList.length; i++) {
        if ($scope[input] === ($scope.playerList[i].player.FirstName + " " + $scope.playerList[i].player.LastName)) {
          $scope[output] = $scope.playerList[i]
        }
      }
    }

    $scope.showProjections = function (guy, letter, pos) {
      apiFactory.getNerdProjections($scope[pos].player.Position, $scope.week)
        .then((projections) => {
          // console.log(projections)
          for (i = 0; i < projections.length; i++) {
            if (projections[i].displayName === guy) {   // find matching player
              $scope[letter] = projections[i]
              // console.log($scope[letter])
            }
          }
        })
    }

    $scope.showRankings = function (dude, letter, pos, posit) {
      $scope.radarData = []
      apiFactory.getNerdRankings($scope[posit].player.Position, $scope.week)
        .then((rankings) => {
          for (j = 0; j < rankings.length; j++) {
            if (rankings[j].name === dude) {   // find matching player
              $scope[letter] = rankings[j];
              $scope[pos] = j + 1;

              $scope.radarData.push([$scope[letter].ppr, $scope[letter].pprHigh, $scope[letter].pprLow]) // assign data to radar graph
            }
          }
        })
    }

    $scope.showStats = function (guy, seasonProj, season, weekProj, week) {
      apiFactory.getNflStats($scope.week)
        .then((stats) => {
          for (k = 0; k < stats.length; k++) {
{'fraction_non_alphanumeric': 0.14435062324085243, 'fraction_numerical': 0.002010454362685967, 'mean_word_length': 2.447678447678448, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '4525544', 'n_tokens_mistral': 1564, 'n_tokens_neox': 1497, 'n_words': 341}