Published unlisted
Edited
Jun 14, 2021
1 fork
Importers
2 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
import {get_journeys} from "529140a6d468cf32"
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
isochrone_color = d3
.scaleLinear()
.domain([0, max_duration])
.range(["white", "royalblue"])
Insert cell
Insert cell
Insert cell
Insert cell
function predecessor(i) {
const duration = +data[i].duration;
// which is the nearest among points that are bigger than me
return d3.scan(
data.map((d, j) =>
+d.duration < duration
? d3.geoDistance(points[i], points[j]) *
Math.sqrt(duration / +d.duration)
: Infinity
)
);
}
Insert cell
// How many seconds walking, per pixel?
walkingtime = {
// At the equator 40000km ~= 960px * projection.scale() / d3.geoMercator().scale()
// multiply by cos(latitude)
const scale =
walkingspeed /
(((40000 * Math.cos(projection.center()[1] * radians)) /
960 /
projection.scale()) *
d3.geoMercator().scale() *
3600);
return function(T) {
return T * scale;
};
}
Insert cell
Insert cell
Insert cell
Insert cell
path = d3.geoPath().projection(projection)
Insert cell
rawpath = d3.geoPath()
Insert cell
Insert cell
Insert cell
import {tile, nextzenapikey} with {largeprojection as projection} from "17564db3a49dd521"
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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