Changed Rajasthan's language from Marwari to Hindi

master
Aadhavan Srinivasan 4 weeks ago
parent f65ea1dd8f
commit d8c2b22a46

@ -11,7 +11,6 @@ const languages = {
konkani: {name: "Konkani", color: "#9b7cff", code: "gom", districts: []},
hindi: {name: "Hindi", color: "#d17cff", code: "hi", districts: []},
gujarati: {name: "Gujarati", color: "#7cffee", code: "gu", districts: []},
marwari: {name: "Marwari", color: "#7bc4c9", code: "mwr", districts: []},
oriya: {name: "Oriya", color: "#9bcc9f", code: "or", districts: []},
bengali: {name: "Bengali", color: "#bf9a77", code: "bn", districts: []},
punjabi: {name: "Punjabi", color: "#e84a35", code: "pa", districts: []},
@ -40,7 +39,7 @@ const state2lang = {
"Goa": languages["konkani"],
"Odisha": languages["oriya"],
"Gujarat": languages["gujarati"],
"Rajasthan": languages["marwari"],
"Rajasthan": languages["hindi"],
"Chhattisgarh": languages["hindi"],
"Jharkhand": languages["hindi"], // DEFAULT
"West Bengal": languages["bengali"],
@ -280,10 +279,8 @@ function drawMap(world) {
d3.select(this).remove()
}
})
.text(function(d) {
if (stateOrDistrictOrLanguage(d) == "language") {
return "(" + d.properties.lang_name + ")";
} else {
.each(function(d) {
if (!stateOrDistrictOrLanguage(d) == "language") {
d3.select(this).remove() // Only add this attribute if the element is a language
}
});
@ -301,26 +298,26 @@ function drawMap(world) {
.attr("font-size", "12px")
.attr("fill", "black")
.text("Hello, Map!");
// for (const [langId,lang] of Object.entries(languages)) {
// let geojson = {
// "type": "FeatureCollection",
// "features": lang.districts
// };
//
// let outerBound = getOuterBoundaryPolygon(geojson.features)
// outerBound["id"] = "lang" + lang.name
// outerBound.properties["lang_name"]= lang.name
// outerBound.properties["lang_code"]= lang.code
// allLangs.push(outerBound);
// svg.append("path")
// .datum(outerBound)
// .attr("d", path)
// .attr("fill", "none")
// .attr("stroke", "red")
// .attr("stroke-width", 2)
// }
// console.log(JSON.stringify(allLangs))
// for (const [langId,lang] of Object.entries(languages)) {
// let geojson = {
// "type": "FeatureCollection",
// "features": lang.districts
// };
//
// let outerBound = getOuterBoundaryPolygon(geojson.features)
// outerBound["id"] = "lang" + lang.name
// outerBound.properties["lang_name"]= lang.name
// outerBound.properties["lang_code"]= lang.code
// allLangs.push(outerBound);
//
// svg.append("path")
// .datum(outerBound)
// .attr("d", path)
// .attr("fill", "none")
// .attr("stroke", "red")
// .attr("stroke-width", 2)
// }
// console.log(JSON.stringify(allLangs))
}

Loading…
Cancel
Save