Public
Edited
Feb 2, 2023
Fork of Base map
2 forks
Importers
32 stars
Insert cell
Insert cell
Insert cell
Plot.plot({
width,
height,
inset: 4,
projection: {
type: () =>
proj4d3(
`+proj=lcc +lat_1=33 +lat_2=45 +lat_0=39 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs`
),
domain: continental_us
},
marks: [
Plot.sphere({ fill: "#fefef6" }),
Plot.geo(continental_us, {
stroke: "currentColor",
strokeWidth: 0.5,
fill: "rgba(0,0,0,0.3)"
}),
Plot.geo(d3.geoGraticule().step([5, 5])(), { strokeOpacity: 0.05 }),
Plot.geo(d3.geoGraticule10(), { strokeOpacity: 0.2 }),
Plot.frame()
]
})
Insert cell
Insert cell
Insert cell
LAMBERT93 = Plot.plot({
width,
height,
inset: 4,
projection: {
type: () =>
proj4d3(
`+proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs`
),
domain: france
},
marks: [
Plot.sphere({ fill: "#fefef6" }),
Plot.geo(france, {
stroke: "currentColor",
strokeWidth: 0.5,
fill: "rgba(0,0,0,0.3)"
}),
Plot.geo(d3.geoGraticule().step([1, 1])(), { strokeOpacity: 0.1 }),
Plot.frame()
]
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Plot.plot({
width,
height,
inset: 2,
margin: -1,
projection: {
type: () =>
proj4d3(
`+proj=stere +lat_0=0 +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs`
)
.clipAngle(30)
.rotate([0, 90]),
domain: antarctica
},
marks: [
Plot.sphere({ fill: "#fefef6" }),
Plot.geo(antarctica, {
stroke: "currentColor",
strokeWidth: 0.5,
fill: "rgba(0,0,0,0.3)"
}),
Plot.graticule(),
Plot.sphere()
]
})
Insert cell
Insert cell
Insert cell
proj4 = require("proj4@2.8")
Insert cell
function proj4d3(proj4string) {
const degrees = 180 / Math.PI,
radians = 1 / degrees,
raw = proj4(proj4string),
p = function (lambda, phi) {
return raw.forward([lambda * degrees, phi * degrees]);
};
p.invert = function (x, y) {
return raw.inverse([x, y]).map(function (d) {
return d * radians;
});
};
const projection = d3.geoProjection(p).scale(1).translate([0, 0]);
projection.raw = raw;
return projection;
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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