<commit_before>/**
 * Map compatibility for the insight dashboard
 *
 * @namespace
 */
niclabs.insight.map = (function () {

    /**
     * Object to represent geographic coordinates
     *
     * @typedef {Object} niclabs.insight.map.LatLng
     * @property {float} lat - latitude
     * @property {float} lng - longitude
     */

     /**
      * Cartesian coordinates
      *
      * @typedef {Object} niclabs.insight.map.Point
      * @property {float} x - horizontal coordinate
      * @property {float} y - vertical coordinate
      */


    /**
     * Helper method to assign/get the map view to/from the dashboard
     *
     * @example
     * ```javascript
     * // Create the map
     * var map = niclabs.insight.map({
     *      'handler': 'google-map', // Map constructor
     *      'lat': 48.8583,
     *      'lng': 2.2944,
     *      'zoom': 15
     * });
     * ```
     *
     * @memberof niclabs.insight
     * @variation 2
     * @param {Object|niclabs.insight.MapView} [obj] - configuration for the map view or map view object
     * @param {String} obj.handler - name of the handler to construct the map view
     * @returns {niclabs.insight.MapView} the dashboard map view
     */
    var map = function (obj) {
        var dashboard = niclabs.insight.dashboard();
        if (typeof dashboard === 'undefined') throw new Error("Dashboard has not been initialized");
        return dashboard.map(obj);
    };

    return map;
})();
<commit_msg>Define radian to degree and back conversion methods<commit_after>/**
 * Map compatibility for the insight dashboard
 *
 * @namespace
 */
niclabs.insight.map = (function () {
    var WORLD_WIDTH = 20037508.34;

    /** Converts numeric degrees to radians */
    if (typeof Number.prototype.toRad === "undefined") {
        Number.prototype.toRad = function() {
            return this * Math.PI / 180;
        };
    }

    /** Converts numeric radians to degrees */
    if (typeof Number.prototype.toDeg === "undefined") {
        Number.prototype.toDeg = function() {
            return this * 180 / Math.PI;
        };
    }

    /**
     * Object to represent geographic coordinates
     *
     * @typedef {Object} niclabs.insight.map.LatLng
     * @property {float} lat - latitude
     * @property {float} lng - longitude
     */

     /**
      * Cartesian coordinates
      *
      * @typedef {Object} niclabs.insight.map.Point
      * @property {float} x - horizontal coordinate
      * @property {float} y - vertical coordinate
      */


    /**
     * Helper method to assign/get the map view to/from the dashboard
     *
     * @example
     * ```javascript
     * // Create the map
     * var map = niclabs.insight.map({
     *      'handler': 'google-map', // Map constructor
     *      'lat': 48.8583,
     *      'lng': 2.2944,
     *      'zoom': 15
     * });
     * ```
     *
     * @memberof niclabs.insight
     * @variation 2
     * @param {Object|niclabs.insight.MapView} [obj] - configuration for the map view or map view object
     * @param {String} obj.handler - name of the handler to construct the map view
     * @returns {niclabs.insight.MapView} the dashboard map view
     */
    var map = function (obj) {
        var dashboard = niclabs.insight.dashboard();
        if (typeof dashboard === 'undefined') throw new Error("Dashboard has not been initialized");
        return dashboard.map(obj);
    };

    return map;
})();

{'fraction_non_alphanumeric': 0.126275882181394, 'fraction_numerical': 0.012831729367162438, 'mean_word_length': 2.1381518755718205, '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': '4012515', 'n_tokens_mistral': 1074, 'n_tokens_neox': 1004, 'n_words': 290}