Published
Edited
May 9, 2022
Insert cell
Insert cell
map = {
// basic settings
const height = width/1.6
const svg = d3.select(DOM.svg(width, height))

const projection = d3.geoMercator()
.center([15.8, 50.13])
.scale(50000)
.rotate([0,0])

console.log(projection)

const path = d3.geoPath()
.projection(projection)

const g = svg.append("g")

svg.attr("style", "background-color:#aea79f")

g.selectAll(".point")
.data(data)
.enter()
.append("circle")
.attr("cx", function(d) { return projection([d['lng'], d['lat']])[0] })
.attr("cy", function(d) { return projection([d['lng'], d['lat']])[1] })
.attr("r", 1)
.attr("fill", "#652347")

return svg.node()
}
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more