<commit_before>
/******************************************************/
/* Importing data and putting name on marker          */


function onEachFeatureMusees(features, layer) {
    //link name to the popup of the marker
        layer.bindPopup(features.properties.nom_du_musee);
}

function onEachFeatureHotels(features, layer) {
    //link name to the popup of the marker
        layer.bindPopup(features.properties.nom_commercial);
}

function onEachFeatureHopitaux(features, layer) {
    //link name to the popup of the marker
        layer.bindPopup(features.properties.raison_sociale);
}
function onEachFeatureCommissariats(features, layer) {
    //link name to the popup of the marker
        layer.bindPopup("Commissariat");
}

//import museum data and put the name in the popup
/*var museesLayer = L.geoJson(musees, {
    onEachFeature: onEachFeatureMusees
});*/

/*var hotelsLayer = L.geoJson(hotels, {
    onEachFeature: onEachFeatureHotels
});

var hopitauxLayer = L.geoJson(hopitaux, {
    onEachFeature: onEachFeatureHopitaux
});

var commissariatsLayer = L.geoJson(commissariats, {
    onEachFeature: onEachFeatureCommissariats
});*/

var museesLayer = L.featureGroup();
var hopitauxLayer = L.featureGroup();
var commissariatsLayer = L.featureGroup();
//var hotelsLayer = L.layerGroup();
var pubsLayer = L.featureGroup();

var baseMaps = {
};

var overlayMaps = {
    "Commissariats": commissariatsLayer,
    "Hopitaux": hopitauxLayer, 
    //"Hotels": hotelsLayer,
    "Musees": museesLayer,
    "Pub": pubsLayer
};

var markerMusees = [];
var markerCommissariats = [];
var markerHopitaux = [];
var markerPub = [];

museesLayer.addTo(map);
hopitauxLayer.addTo(map);
commissariatsLayer.addTo(map);
//hotelsLayer.addTo(map);
pubsLayer.addTo(map);

L.control.layers(baseMaps, overlayMaps).addTo(map);


/** Alternative import of museums*/
for (var i = 0; i < musees.features.length; i++) {
            markerMusees[i] = new L.marker([musees.features[i].properties.wgs84[0],musees.features[i].properties.wgs84[1]])
                .bindPopup(musees.features[i].properties.nom_du_musee);
}

for (var i = 0; i < commissariats.features.length; i++) {
            markerCommissariats[i] = new L.marker([commissariats.features[i].properties.coordinates[0],commissariats.features[i].properties.coordinates[1]])
                .bindPopup("Commissariat");
}

for (var i = 0; i < hopitaux.features.length; i++) {

            markerHopitaux[i] = new L.marker([hopitaux.features[i].geometry.coordinates[1], hopitaux.features[i].geometry.coordinates[0]])
                .bindPopup(hopitaux.features[i].properties.raison_sociale);
}

for (var i = 0; i < pub.elements.length; i++) {
    /*console.log('ok');*/
    if(pub.elements[i].lat && pub.elements[i].lon){ //Protect if data corrumpted

        /*if(pub.elements[i].tags.name){//If there is a name
            markerPub[i] = new L.marker([pub.elements[i].lat, pub.elements[i].lon])
                .bindPopup(pub.elements[i].tags.name);
        }
        else{*/
            markerPub[i] = new L.marker([pub.elements[i].lat, pub.elements[i].lon])
                .bindPopup("Pub");
        /*}*/
       
                /*.addTo(map);*/
               // console.log(markerPub[i]);
        //console.log('coordinates: ' + pub.elements[i].lat + pub.elements[i].lon);
    }
            
}
/*    if(!pub.elements[i].lat  || !pub.elements[i].lon)
    {
        console.log('Found');
    }*/


/*console.log('musees: ' + musees);
*/
/*console.log('coords: ' + L.geoJson(commissariats, {
    onEachFeature: onEachFeatureCommissariats
}).coordsToLatLngs(commissariats, 1, 0) );*/

<commit_msg>Cleaned old stuff from data manager<commit_after>
/******************************************************/
/* Importing data and putting name on marker          */

var museesLayer = L.featureGroup();
var hopitauxLayer = L.featureGroup();
var commissariatsLayer = L.featureGroup();
//var hotelsLayer = L.layerGroup();
var pubsLayer = L.featureGroup();

var baseMaps = {
};

var overlayMaps = {
    "Commissariats": commissariatsLayer,
    "Hopitaux": hopitauxLayer, 
    //"Hotels": hotelsLayer,
    "Musees": museesLayer,
    "Pub": pubsLayer
};

var markerMusees = [];
var markerCommissariats = [];
var markerHopitaux = [];
var markerPub = [];

museesLayer.addTo(map);
hopitauxLayer.addTo(map);
commissariatsLayer.addTo(map);
//hotelsLayer.addTo(map);
pubsLayer.addTo(map);

L.control.layers(baseMaps, overlayMaps).addTo(map);


/** Alternative import of museums*/
for (var i = 0; i < musees.features.length; i++) {
        markerMusees[i] = new L.marker([musees.features[i].properties.wgs84[0],musees.features[i].properties.wgs84[1]])
            .bindPopup(musees.features[i].properties.nom_du_musee);
}

for (var i = 0; i < commissariats.features.length; i++) {
        markerCommissariats[i] = new L.marker([commissariats.features[i].properties.coordinates[0],commissariats.features[i].properties.coordinates[1]])
            .bindPopup("Commissariat");
}

for (var i = 0; i < hopitaux.features.length; i++) {

        markerHopitaux[i] = new L.marker([hopitaux.features[i].geometry.coordinates[1], hopitaux.features[i].geometry.coordinates[0]])
            .bindPopup(hopitaux.features[i].properties.raison_sociale);
}

for (var i = 0; i < pub.elements.length; i++) {

    if(pub.elements[i].lat && pub.elements[i].lon){ //Protect if data corrumpted

        markerPub[i] = new L.marker([pub.elements[i].lat, pub.elements[i].lon])
            .bindPopup("Pub");
    }
            
}

{'fraction_non_alphanumeric': 0.17238886881098664, 'fraction_numerical': 0.005421033610408385, 'mean_word_length': 3.5555555555555554, 'pattern_counts': {'":': 10, '<': 11, '<?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': '5129969', 'n_tokens_mistral': 1916, 'n_tokens_neox': 1860, 'n_words': 328}