<commit_before>var NumberOfSecondsBetweenReloadingData = 120;

// ============================

var intTemperature = 0;
var intHumidity = 0;
var intPressure = 0;
var intPrCh1h = 0;
var intPrCh6h = 0;
var intPrCh12h = 0;
var intPrCh24h = 0;
var intPrCh48h = 0;

var chtPC1h = new chartSet();
var chtPC6h = new chartSet();
var chtPC12h = new chartSet();
var chtPC24h = new chartSet();
var chtPC48h = new chartSet();
var chtTemp = new chartSet();
var chtHumidity = new chartSet();
var chtPressure = new chartSet();

// Load the gauge from the Google Chart API. Details at
// https://developers.google.com/chart/interactive/docs/gallery/gauge#configuration-options
google.charts.load('current', {
    'packages': ['gauge']
});
google.charts.setOnLoadCallback(loadData(setupDataAndCharts));

function loadData(callback) {
    console.log("loadData");
    var jsonPath = "current.php";
    $.getJSON(jsonPath, callback);
}

function setupDataAndCharts(result) {
    console.log("setupDataAndCharts");
    setupData(result);
    setupCharts();
    setTimeout(loadData, NumberOfSecondsBetweenReloadingData * 1000, updateDataAndCharts);
}

function setupData(result) {
    console.log("setupData");
    var obj = result.WeatherObservations.Observation1;
    intTemperature = obj.AMBIENT_TEMPERATURE;
    intHumidity = obj.HUMIDITY;
    intPressure = obj.AIR_PRESSURE;
    intPrCh1h = obj.AIR_PRESSURE - result.WeatherObservations.Observation2.AIR_PRESSURE;
    intPrCh6h = obj.AIR_PRESSURE - result.WeatherObservations.Observation3.AIR_PRESSURE;
    intPrCh12h = obj.AIR_PRESSURE - result.WeatherObservations.Observation4.AIR_PRESSURE;
    intPrCh24h = obj.AIR_PRESSURE - result.WeatherObservations.Observation5.AIR_PRESSURE;
    intPrCh48h = obj.AIR_PRESSURE - result.WeatherObservations.Observation6.AIR_PRESSURE;
    
    $("#rawData").empty();
    for (var property in obj) {
        if (obj.hasOwnProperty(property)) {
            $("#rawData").append(property + ": " + obj[property] + "<br>");
        }<commit_msg>Add all of the daily stats results to the raw data output<commit_after>var NumberOfSecondsBetweenReloadingData = 120;

// ============================

var intTemperature = 0;
var intHumidity = 0;
var intPressure = 0;
var intPrCh1h = 0;
var intPrCh6h = 0;
var intPrCh12h = 0;
var intPrCh24h = 0;
var intPrCh48h = 0;

var chtPC1h = new chartSet();
var chtPC6h = new chartSet();
var chtPC12h = new chartSet();
var chtPC24h = new chartSet();
var chtPC48h = new chartSet();
var chtTemp = new chartSet();
var chtHumidity = new chartSet();
var chtPressure = new chartSet();

// Load the gauge from the Google Chart API. Details at
// https://developers.google.com/chart/interactive/docs/gallery/gauge#configuration-options
google.charts.load('current', {
    'packages': ['gauge']
});
google.charts.setOnLoadCallback(loadData(setupDataAndCharts));

function loadData(callback) {
    console.log("loadData");
    var jsonPath = "current.php";
    $.getJSON(jsonPath, callback);
}

function setupDataAndCharts(result) {
    console.log("setupDataAndCharts");
    setupData(result);
    setupCharts();
    setTimeout(loadData, NumberOfSecondsBetweenReloadingData * 1000, updateDataAndCharts);
}

function setupData(result) {
    console.log("setupData");
    var obj = result.WeatherObservations.Observation1;
    intTemperature = obj.AMBIENT_TEMPERATURE;
    intHumidity = obj.HUMIDITY;
    intPressure = obj.AIR_PRESSURE;
    intPrCh1h = obj.AIR_PRESSURE - result.WeatherObservations.Observation2.AIR_PRESSURE;
    intPrCh6h = obj.AIR_PRESSURE - result.WeatherObservations.Observation3.AIR_PRESSURE;
    intPrCh12h = obj.AIR_PRESSURE - result.WeatherObservations.Observation4.AIR_PRESSURE;
    intPrCh24h = obj.AIR_PRESSURE - result.WeatherObservations.Observation5.AIR_PRESSURE;
    intPrCh48h = obj.AIR_PRESSURE - result.WeatherObservations.Observation6.AIR_PRESSURE;
    
    $("#rawData").empty();
    for (var property in obj) {
        if (obj.hasOwnProperty(property)) {
            $("#rawData").append(property + ": " + obj[property] + "<br>");
        }
    }
    for (var property in result.DailyStats) {
        if (obj.hasOwnProperty(property)) {
            $("#rawData").append(property + ": " + obj[property] + "<br>");
        }
{'fraction_non_alphanumeric': 0.13317647058823529, 'fraction_numerical': 0.021176470588235293, 'mean_word_length': 4.394670050761421, 'pattern_counts': {'":': 3, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 2, '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': '560915', 'n_tokens_mistral': 1488, 'n_tokens_neox': 1425, 'n_words': 279}