<commit_before>{% extends "layout.html" %}

{% block content %}
<div id="graph-container">
    <div class="row">
        <div class="col-md-6">
            <div id="graph-temp">
            </div>
        </div>
        <div class="col-md-6">
            <div id="graph-press">
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-md-6">
            <div id="graph-height">
            </div>
        </div>
        <div class="col-md-6">
            <div id="graph-gyr">
            </div>
        </div>
    </div>
</div>
{% endblock %}

{% block scripts %}
{{super()}}
<script>
all_data = {{ graph_data|safe }}
$(function () {

    Highcharts.setOptions({
        global : {
            useUTC : false,
        }
    });

    // Create the chart
    $('#graph-temp').highcharts('StockChart', {
        title: {
            text: "Temperature"
        },
        rangeSelector: {
            enabled: false
        },

        exporting: {
            enabled: false
        },

        xAxis: {
            ordinal: false,
            title: {
                text: "Seconds since boot"
            },
            labels: {
                enabled: true,
                formatter: function(){return this.value;},
            }
        },

        yAxis: {
            title: {
                text: "Temperature in degrees celsius"
            }
        },

        series: [
            {
                name: 'NTC',
                data: all_data["Temp"]
            },
        ]
    });

    // Create the chart
    $('#graph-press').highcharts('StockChart', {
        title: {
            text: "Pressure"
        },
        rangeSelector: {
            enabled: false
        },

        exporting: {
            enabled: false
        },

        xAxis: {
            ordinal: false,
            title: {
                text: "Seconds since boot"
            },
            labels: {
                enabled: true,
                formatter: function(){return this.value;},
            }
        },

        yAxis: {
            title: {
                text: "Pressure in kilopascal"
            }
        },

        series: [{
            name: 'Pressure',
            data: all_data["Press"]
        }]
    });

    // Create the chart
    $('#graph-height').highcharts('StockChart', {
        title: {
            text: "Height"
        },
        rangeSelector: {
            enabled: false
        },

        exporting: {
            enabled: false
        },

        xAxis: {
            title: {
                text: "Seconds since boot",
            },
            ordinal: false,
            labels: {
                enabled: true,
                formatter: function(){return this.value;},
            }
        },

        yAxis: {
            title: {
                text: "Height in metres"
            }
        },

        series: [{
            name: 'Height',
            data: all_data["Height"]
        }]
    });

    // Create the chart
    $('#graph-gyr').highcharts('StockChart', {
        title: {
            text: "Rotational speed"
        },
        rangeSelector: {
            enabled: false
        },

        exporting: {
            enabled: false
        },

        xAxis: {
            ordinal: false,
            title: {
                text: "Seconds since boot"
            },
            labels: {
                enabled: true,
                formatter: function(){return this.value;},
            }
        },

        yAxis: {
            title: {
                text: "Rounds per minute"
            }
        },

        series: [{
            name: 'Gyr',
            data: all_data["Gyro"]
        }]
    });
});


</script>
{% endblock %}<commit_msg>Updated graph.html to use new, abstraction-based structure<commit_after>{% extends "graph_base.html" %}

{% block scripts %}
{{super()}}
<script>
all_data = {{ graph_data|safe }}
$(function () {
    createGraph("#graph-temp", "NTC", "Temperature", "Seconds since boot",
                "Temperature in degrees celsius", all_data["Temp"]);

    createGraph("#graph-press", "Pressure", "Pressure", "Seconds since boot",
                "Pressure in kilopascal", all_data["Press"]);

    createGraph("#graph-height", "Height", "Height", "Seconds since boot",
                "Height in metres", all_data["Height"]);

    createGraph("#graph-gyr", "Gyroscope", "Rotational speed", "Seconds since boot",
                "Rounds per minute", all_data["Gyro"]);
});


</script>
{% endblock %}
{'fraction_non_alphanumeric': 0.14235423542354236, 'fraction_numerical': 0.0008800880088008801, 'mean_word_length': 1.2100145843461352, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, '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': '123614', 'n_tokens_mistral': 1306, 'n_tokens_neox': 1225, 'n_words': 266}