Public
Edited
Jan 18, 2024
Insert cell
Insert cell
voies = FileAttachment("voie.geojson").json()
Insert cell
prenoms = d3.dsvFormat(";", "ISO-8859-5").parse(await FileAttachment("Prenoms.csv").text())
Insert cell
// voie.features[0].properties.l_longmin
prenoms.filter(e => voies.features[22].properties.l_longmin.toLowerCase().includes(e["01_prenom"].toLowerCase()))
Insert cell
voies_plus = voies.features.map(function (e) {
var prenom = prenoms.filter(function (p) {
e.properties.l_longmin.toLowerCase().replace(" (1)","").includes(p["01_prenom"].toLowerCase())
})
if (prenom.length > 0) e.prenom = prenom;
return e;
})
Insert cell
voies_plus[22].properties.l_longmin.toLowerCase()
Insert cell
prenoms.filter(e => e["01_prenom"].toLowerCase().replace(" (1)","") == "jean")
Insert cell
prenoms[1]["01_prenom"].toLowerCase() == "aapeli"
Insert cell
Plot.carto({ // Initialize the plot
// projection: "albers-usa", // Set the projection
marks: [
Plot.feature(voie)
],
height: 500, // Update canvas height
width: 800, // Update canvas width
margin: 50 // Update margins
})
Insert cell
import {Plot} from "614ce4064960878c"
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more