<commit_before>/**
 * Takes a map and a set of streets, and visualizes them as segments on the map.
 * @param map Map on which the streets are rendered.
 * @param params Object that includes properties that can change the process of street rendering.
 * @param params.labelPopup {boolean} whether to include a validation popup on labels on the map.
 * @param params.auditedStreetColor {string} color to use for audited streets on the map.
 * @param params.unauditedStreetColor {string} optional color to use for unaudited streets on the map.
 * @param streetData Data about streets to visualize.
*/
function InitializeStreets(map, params, streetData) {
    let streetLayer;
    let distanceAudited = 0;  // Distance audited in km.
    let hasUnauditedStreets = params.unauditedStreetColor != null;

    function onEachStreetFeature(feature, layer) {
        let popupContent = `<a href="/audit/street/${feature.properties.street_edge_id}">Explore this street!</a>`;
        layer.bindPopup(popupContent);
        layer.on({
            'mouseover': function () {
                this.setStyle({ weight: 5 });
                },
            'mouseout': function() {
                this.setStyle({ weight: 3 });
            }
        });
    }
    // Render street segments.
    streetLayer = L.geoJson(streetData, {
        pointToLayer: L.mapbox.marker.style,
        style: function (feature) {
            let style = {
                color: !hasUnauditedStreets || feature.properties.audited ? params.auditedStreetColor : params.unauditedStreetColor,
                opacity: 0.75,
                'stroke-width': 3,
                weight: 3
            };
            return style;
        },
        onEachFeature: onEachStreetFeature
    })
        .addTo(map);
    if (params.useTotalAuditedDistance) {<commit_msg>updates style of explore this street popup on LabelMap<commit_after>/**
 * Takes a map and a set of streets, and visualizes them as segments on the map.
 * @param map Map on which the streets are rendered.
 * @param params Object that includes properties that can change the process of street rendering.
 * @param params.labelPopup {boolean} whether to include a validation popup on labels on the map.
 * @param params.auditedStreetColor {string} color to use for audited streets on the map.
 * @param params.unauditedStreetColor {string} optional color to use for unaudited streets on the map.
 * @param streetData Data about streets to visualize.
*/
function InitializeStreets(map, params, streetData) {
    let streetLayer;
    let distanceAudited = 0;  // Distance audited in km.
    let hasUnauditedStreets = params.unauditedStreetColor != null;

    function onEachStreetFeature(feature, layer) {
        let popupContent = `<a href="/audit/street/${feature.properties.street_edge_id}">Click here</a> to explore this street!`;
        layer.bindPopup(popupContent);
        layer.on({
            'mouseover': function () { this.setStyle({ weight: 6 }); },
            'mouseout': function() { this.setStyle({ weight: 3 }); }
        });
    }
    // Render street segments.
    streetLayer = L.geoJson(streetData, {
        pointToLayer: L.mapbox.marker.style,
        style: function (feature) {
            let style = {
                color: !hasUnauditedStreets || feature.properties.audited ? params.auditedStreetColor : params.unauditedStreetColor,
                opacity: 0.75,
                'stroke-width': 3,
                weight: 3
            };
            return style;
        },
        onEachFeature: onEachStreetFeature
    })
        .addTo(map);
    if (params.useTotalAuditedDistance) {
{'fraction_non_alphanumeric': 0.09552566566017019, 'fraction_numerical': 0.0043919846280538015, 'mean_word_length': 2.5866141732283463, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '2646361', 'n_tokens_mistral': 1040, 'n_tokens_neox': 977, 'n_words': 319}