Public
Edited
Dec 16, 2022
1 fork
9 stars
Contour Labels (canvas)Coordinated mapsgeoformatSmall circle testKruskal MazeAll the geoshapes
Reprojecting Vector Tiles
Cloud ContoursHello h3-jsClipping AlbersTranslucent EarthThe truth about the Mercator projectionUsing d3-inertia with observableMercator projection of a Mercator globeD3 Vector Tiles (WIP)Finding intersections between the graticule and the clip sphere of the stereographic projection, method 2Plate tectonicsAnother hex mapEquateur & tropiquesTissot's indicatrixDistance to shoreMultiPolygon clippingSouth Africa’s medial axisSpherical intersectionVolcano Semis (points circulaires)Pencil Airocean45° mapNetCDFBlue noise sphereRubber DymaxionSpherical quasi-random (R2) distributionAutomated label placement (countries)Automated label placement (France)Automated label placement (cities)d3.geoIntersectArcDelaunay.findTriangled3-geo-voronoi and gridded dataElevation vtk.jsMapfillKrigingSpherical HeatmapReproject elevation tiles — detailReproject elevation tiles — worldFisheye Conformal MapSpherical KDE InterpolationSpherical kernel interpolation with nearest neighborsShepard’s methodModified Shepard’s methodSpherical contoursGeo Voronoi interpolationBlurry contoursHow much warmer? (BBC)H3 hexagons & geoContoursHillshading & supersamplingH3 odditiesManhattan VoronoiManhattan Voronoi IIGeoJSON feature editorColorized Manhattan Spanning Treelegra mapslegra country mapsThe complex logarithm projectionCountries small multipleThe 2D approximate Newton-Raphson methodOceanAttitudeCount visible objectsThe Gray-Fuller spatial gridGray-Fuller grid metricsGray-Fuller grid odditiesSpherical smallest-circle problemBounding CirclesCountries Enclosing CirclesFullscreen Seamless Zoomable Map TilesMap Pan & ZoomSpherical EllipsesSynchronized projectionsThe closest countryTriangular tiling of icosahedronHello, polygon-clippingCorées / KoreasHello, procedural-glHello, placekeyZoom World ChoroplethClipping spherical polygonsSpherical phyllotaxisFour-color world map with ClingoHello, jsgeoda!The Sun’s analemmaWorld of squaresWorld of squares (spherical)A map of AfricaTagged bordersClipped geoVoronoiBlue noise sphere IISpherical Perlin NoiseSpherical Delaunay triangulationDynamic simplificationRewindPlot: Voronoi labelsAoC 12: shortest path under constraintsHello, pixi.jsFlight PathsRay out of a convex hullDistance to a segment
Insert cell
Insert cell
Insert cell
land = ({
type: "FeatureCollection",
features: d3.merge(tiles.map(d => !d.layers.earth ? [] : geojson(d, d.layers.earth).features))
})
Insert cell
import { map } with { land } from "@fil/base-map"
Insert cell
Insert cell
Insert cell
srcprojection = d3.geoMercator()
.scale(1024 / (2 * Math.PI))
.translate([width / 2, height / 2])
Insert cell
tiles = Promise.all(
tile().map(async (d) => {
const [x, y, z] = d;
d.layers = new VectorTile(
new Protobuf(
await d3
.buffer(
`https://tile.nextzen.org/tilezen/vector/v1/256/all/${z}/${x}/${y}.mvt?api_key=${apikey}`
)
.catch((_) => ({}))
)
).layers; // Sign up for an API key: https://www.nextzen.org
return d;
})
)
Insert cell
tile = d3.tile()
.size([width, height])
.scale(srcprojection.scale() * 2 * Math.PI)
.translate(srcprojection([0, 0]))
Insert cell
function geojson([x, y, z], layer) {
if (!layer) return;
const features = new Array(layer.length);
for (let i = 0; i < layer.length; ++i)
features[i] = layer.feature(i).toGeoJSON(x, y, z);
return resample({ type: "FeatureCollection", features });
}
Insert cell
Insert cell
VectorTile = (await require("https://bundle.run/@mapbox/vector-tile@1.3.1"))
.VectorTile
Insert cell
Protobuf = require("pbf@3.1.0/dist/pbf.js")
Insert cell
d3 = require("d3@7", "d3-tile@1")
Insert cell
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