<commit_before>app.controller('schoolkindsController', function ($scope,  $location, states) {
    var relevantYears = ['2007', '2015'];

    $scope.init = function(state){
        $scope.state = state;
        states.get($scope.state, function (err, statedata) {
            var data = relevantYears.map(function (year) {
                return statedata.schularten[year]
            });
            var keys = Object.keys(data[0]);
            var nvd3data = keys.map(function (key) {
                var result = {key: key};
                for (var i = 0; i < data.length; i++) {
                    result[relevantYears[i]] = data[i][key];
                }
                return result;
            });

            $scope.nvd3data = _.filter(nvd3data, function (elem) {
                var delta = Math.abs(elem[relevantYears[0]] - elem[relevantYears[1]]);
                return (delta / elem[relevantYears[0]] > 0.08 && delta > 10) &&
                    elem.key !== "Keine Zuordung zu einer Schulart möglich";
            });
            var keys = _.map($scope.nvd3data, "key");
            var firstYear = _.map($scope.nvd3data, "2007");
            var secondYear = _.map($scope.nvd3data, "2015");
            $scope.teacher_data = {labels: keys, series: [{name: "2007", "data": firstYear},
                                                          {name: "2015", "data":  secondYear}]};

            $scope.teacher_options = {
                seriesBarDistance: 30,
                height: '200px',
                chartPadding: {
                    top: 0,
                    right: 0,
                    bottom: 16,
                    left: 0
                },
                plugins: [
                    Chartist.plugins.legend({
                        clickable: false
                    }),<commit_msg>bar series space too large on tiny screens<commit_after>app.controller('schoolkindsController', function ($scope,  $location, states) {
    var relevantYears = ['2007', '2015'];

    $scope.init = function(state){
        $scope.state = state;
        states.get($scope.state, function (err, statedata) {
            var data = relevantYears.map(function (year) {
                return statedata.schularten[year]
            });
            var keys = Object.keys(data[0]);
            var nvd3data = keys.map(function (key) {
                var result = {key: key};
                for (var i = 0; i < data.length; i++) {
                    result[relevantYears[i]] = data[i][key];
                }
                return result;
            });

            $scope.nvd3data = _.filter(nvd3data, function (elem) {
                var delta = Math.abs(elem[relevantYears[0]] - elem[relevantYears[1]]);
                return (delta / elem[relevantYears[0]] > 0.08 && delta > 10) &&
                    elem.key !== "Keine Zuordung zu einer Schulart möglich";
            });
            var keys = _.map($scope.nvd3data, "key");
            var firstYear = _.map($scope.nvd3data, "2007");
            var secondYear = _.map($scope.nvd3data, "2015");
            $scope.teacher_data = {labels: keys, series: [{name: "2007", "data": firstYear},
                                                          {name: "2015", "data":  secondYear}]};

            $scope.teacher_options = {
                seriesBarDistance: 20,
                height: '200px',
                chartPadding: {
                    top: 0,
                    right: 8,
                    bottom: 16,
                    left: 0
                },
                plugins: [
                    Chartist.plugins.legend({
                        clickable: false
                    }),
{'fraction_non_alphanumeric': 0.12774018944519622, 'fraction_numerical': 0.02706359945872801, 'mean_word_length': 1.3571428571428572, 'pattern_counts': {'":': 4, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3100777', 'n_tokens_mistral': 1078, 'n_tokens_neox': 957, 'n_words': 223}