<commit_before>(function (env) {
    'use strict';
    env.ddg_spice_quandl_home_values = function(api_result){
        if (!api_result || api_result.data.length < 2 ) {
            return Spice.failed('quandl_home_values');
        }

        // url to the data set page
        // add title tag for link:
        // get recent and previous data values
        var url = 'https://quandl.com/' + api_result.source_code + "/" + api_result.code,
            urlTitle = 'View more home values data at Quandl',
            recentValue = DDG.getProperty(api_result.data,'0.1'),
            previousValue = DDG.getProperty(api_result.data,'1.1');
        
        // check we have both data values
        if (!recentValue || !previousValue) {
           return Spice.failed('quandl_home_values');
        }<commit_msg>quandl home values: result data tested for null<commit_after>(function (env) {
    'use strict';
    env.ddg_spice_quandl_home_values = function(api_result){

        if (!api_result) {
            return Spice.failed('quandl_home_values');
        }

        var result = api_result;
        
        if (result.data == null) {
            return Spice.failed('quandl_home_values');
        }
        
        // we need two data points to get percent change
        if (result.data.length < 2) {
            return Spice.failed('quandl_home_values');
        }

        // url to the data set page
        // add title tag for link:
        // get recent and previous data values
        var url = 'https://quandl.com/' + api_result.source_code + "/" + api_result.code,
            urlTitle = 'View more home values data at Quandl',
            recentValue = DDG.getProperty(api_result.data,'0.1'),
            previousValue = DDG.getProperty(api_result.data,'1.1');
        
        // check we have both data values
        if (!recentValue || !previousValue) {
           return Spice.failed('quandl_home_values');
        }
{'fraction_non_alphanumeric': 0.11122554067971163, 'fraction_numerical': 0.005149330587023687, 'mean_word_length': 2.0550314465408803, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '671743', 'n_tokens_mistral': 576, 'n_tokens_neox': 566, 'n_words': 141}