<commit_before>// a simple test file to assert coherence of data set 'zones.json'

var fs = require('fs'),
    assert = require('assert'),
    _ = require('lodash'),
    turf = require('turf');


var zones = JSON.parse(fs.readFileSync('zones.json', 'utf-8')),
    zone_1 = _.find(zones.features, {id : '1'}),
    zone_2 = _.find(zones.features, {id : '2'}),
    zone_3 = _.find(zones.features, {id : '3'}),
    zone_4 = _.find(zones.features, {id : '4'});

// long lat !! order when defining points in GeoJson

// should be in zone 1
var pt1 = turf.point([2.357530296, 48.850952711]);
assert(turf.inside(pt1, zone_1));

// should be in zone 2
var pt2 = turf.point([2.355159223, 48.851736342]);
assert(turf.inside(pt2, zone_2));

// should be in zone 3
var pt3 = turf.point([2.355845869, 48.852421126]);
assert(turf.inside(pt3, zone_3));

// should be in zone 4
var pt4 = turf.point([2.358109653, 48.851637506]);
assert(turf.inside(pt4, zone_4));
<commit_msg>cleanup<commit_after>// a simple test file to assert coherence of data set 'zones.json'

var fs = require('fs'),
    assert = require('assert'),
    _ = require('lodash'),
    turf = require('turf');


var zones = JSON.parse(fs.readFileSync('zones.json', 'utf-8')),
    zone_1 = _.find(zones.features, {id : '1'}),
    zone_2 = _.find(zones.features, {id : '2'}),
    zone_3 = _.find(zones.features, {id : '3'}),
    zone_4 = _.find(zones.features, {id : '4'});

// long lat !! order when defining points in GeoJson

// pt1 should be in zone 1
var pt1 = turf.point([2.357530296, 48.850952711]);
assert(turf.inside(pt1, zone_1));

// pt2 should be in zone 2
var pt2 = turf.point([2.355159223, 48.851736342]);
assert(turf.inside(pt2, zone_2));

// pt3 should be in zone 3
var pt3 = turf.point([2.355845869, 48.852421126]);
assert(turf.inside(pt3, zone_3));

// pt4 should be in zone 4
var pt4 = turf.point([2.358109653, 48.851637506]);
assert(turf.inside(pt4, zone_4));

// we get here alive then all is ok…

console.log("all assertions passed");
{'fraction_non_alphanumeric': 0.17932067932067933, 'fraction_numerical': 0.1108891108891109, 'mean_word_length': 3.921375921375921, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6297253', 'n_tokens_mistral': 909, 'n_tokens_neox': 763, 'n_words': 199}