<commit_before><!DOCTYPE html>
<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]><html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]><html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--><html> <!--<![endif]-->
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title></title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <link rel="stylesheet" href="css/normalize.css">
    <link rel="stylesheet" href="css/foundation.min.css"/>
    <script src="js/vendor/modernizr-2.6.2.min.js"></script>
    <script src="js/vendor/jquery-1.10.2.min.js"></script>
</head>
<body>
<script>
	var results = null;

    function getResultsData(url) {
        var req = new XMLHttpRequest();
        req.open("GET", url, true);
        req.setRequestHeader("Content-type", "application/json");

        req.onreadystatechange = function () {
            if (req.readyState == 4 && req.status == 200) {
                results = JSON.parse(req.responseText);

                // Extract the first and last event years and create a subtitle containing them
			    first_year = new Date(results["1956"]['date']);
			    last_year = new Date(results["2014"]['date']);
			    $("#header").append("<h2>" + first_year.getFullYear() + " - " + last_year.getFullYear() +"</h2>");

			    // Set the slider max and min values to years
			    $("#year-slider").attr("data-options", "start: " + first_year.getFullYear() + "; end: " + last_year.getFullYear() + ";");
			    $('#year-slider').foundation('slider', 'set_value', last_year.getFullYear());
            }
        };

        req.send();
    }
</script>

<div class="row">

    <div class="large-12 columns">
        <div id="header" class="panel">
            <h1>Eurovision Song Contest Results</h1>
        </div>
    </div>
</div>
<div class="row">
    <div class="large-12 columns">
        <div class="large-1 medium-1 columns">
            <h3 id="year-caption">Year</h3>
        </div>
        <div class="large-11 medium-11 columns">
            <div id="year-slider" class="range-slider" data-slider>
                <span class="range-slider-handle"></span>
                <span class="range-slider-active-segment"></span>
                <input type="hidden">
            </div>
        </div>
    </div>
</div>
<div class="row">
    <div id="main-content" class="large-12 columns">
        <table id="results-table">
        </table>
    </div>
</div>

<script src="js/foundation.min.js"></script>
<script>
    $(document).foundation();

	getResultsData('data/results.json');

	$('[data-slider]').on('change', function(){
		$("#year-caption").text($('#year-slider').attr('data-slider'));

        $("#results-table").empty();

        // Loop through every country and make a row for participants
        $.each(results[$('#year-slider').attr('data-slider')]['participants'], function(key, value){
            if (value['performing'] == true) {
                $("#results-table").append("<tr><td>" + key + "</td></tr>");
            }
        });
	});
</script>
</body>
</html><commit_msg>Table header populated with columns<commit_after><!DOCTYPE html>
<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]><html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]><html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--><html> <!--<![endif]-->
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title></title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <link rel="stylesheet" href="css/normalize.css">
    <link rel="stylesheet" href="css/foundation.min.css"/>
    <script src="js/vendor/modernizr-2.6.2.min.js"></script>
    <script src="js/vendor/jquery-1.10.2.min.js"></script>
</head>
<body>
<script>
	var results = null;

    function getResultsData(url) {
        var req = new XMLHttpRequest();
        req.open("GET", url, true);
        req.setRequestHeader("Content-type", "application/json");

        req.onreadystatechange = function () {
            if (req.readyState == 4 && req.status == 200) {
                results = JSON.parse(req.responseText);

                // Extract the first and last event years and create a subtitle containing them
			    first_year = new Date(results["1956"]['date']);
			    last_year = new Date(results["2014"]['date']);
			    $("#header").append("<h2>" + first_year.getFullYear() + " - " + last_year.getFullYear() +"</h2>");

			    // Set the slider max and min values to years
			    $("#year-slider").attr("data-options", "start: " + first_year.getFullYear() + "; end: " + last_year.getFullYear() + ";");
			    $('#year-slider').foundation('slider', 'set_value', last_year.getFullYear());
            }
        };

        req.send();
    }
</script>

<div class="row">

    <div class="large-12 columns">
        <div id="header" class="panel">
            <h1>Eurovision Song Contest Results</h1>
        </div>
    </div>
</div>
<div class="row">
    <div class="large-12 columns">
        <div class="large-1 medium-1 columns">
            <h3 id="year-caption">Year</h3>
        </div>
        <div class="large-11 medium-11 columns">
            <div id="year-slider" class="range-slider" data-slider>
                <span class="range-slider-handle"></span>
                <span class="range-slider-active-segment"></span>
                <input type="hidden">
            </div>
        </div>
    </div>
</div>
<div class="row">
    <div id="main-content" class="large-12 columns">
        <table id="results-table">
        </table>
    </div>
</div>

<script src="js/foundation.min.js"></script>
<script>
    $(document).foundation();

	getResultsData('data/results.json');

	$('[data-slider]').on('change', function(){
		$("#year-caption").text($('#year-slider').attr('data-slider'));

        $("#results-table").empty();

        $("#results-table").append("<thead><tr id=\"results-header\"><th>Performers</th></tr></thead>");

        $.each(results[$('#year-slider').attr('data-slider')]['participants'], function(key, value){
            // Add a cell in the thead for the country
            $("#results-header").append("<th>" + key.charAt(0) + "</th>");

            // If they're performing then add their row
            if (value['performing'] == true) {
                $("#results-table").append("<tr><td>" + key + "</td></tr>");
            }
        });
	});
</script>
</body>
</html>
{'fraction_non_alphanumeric': 0.21554186081467008, 'fraction_numerical': 0.01488050503532241, 'mean_word_length': 2.6946141032759576, 'pattern_counts': {'":': 0, '<': 161, '<?xml version=': 0, '>': 159, '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': '163157', 'n_tokens_mistral': 2248, 'n_tokens_neox': 2104, 'n_words': 430}