Published
Edited
Jul 28, 2020
Importers
1 star
Insert cell
Insert cell
Insert cell
letterToShow = 0
Insert cell
animatedLetterToShow = Generators.observe(notify => {
let i = 0;

notify(i);
let interval = setInterval(() => {
i = i + 1;
if (i === 13) i = 0;
notify(i);
}, 2500);
return () => clearInterval(interval);
})
Insert cell
ltr = d3
.select(logoSVG)
.selectAll("path")
.nodes()[letterToShow]
Insert cell
ltrpoints = getPoints(ltr)
Insert cell
height = 400
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
california = stateShapes.features[25]
Insert cell
californiaSvg = d3
.create("svg")
.append("path")
.attr("d", path(california))
.node()
Insert cell
californiaPoints = getPoints(californiaSvg)
Insert cell
md`## Geo stuff`
Insert cell
Insert cell
Insert cell
Insert cell
md` <img src="${await FileAttachment(
"Screenshot 2020-07-27 23.55.55.png"
).url()}">`
Insert cell
FileAttachment("Screenshot 2020-07-27 23.55.55.png")
Insert cell
path = d3.geoPath(projection)
Insert cell
projection = d3.geoAlbersUsa().fitSize([width, height], stateShapes)
// The default projection parameters used by most other county map examples instead of fitSize:
// .scale(1300)
// .translate([975/2, 610/2])
Insert cell
stateShapes = topojson.feature(us, us.objects.states) //.features
Insert cell
stateShapes.features.map(d => d.properties.name)
Insert cell
Insert cell
md`# References

* https://observablehq.com/@ajur/threejs
* https://observablehq.com/@fil/export-a-three-js-scene-to-stl
`
Insert cell
Insert cell
Insert cell
Insert cell
topojson = require("topojson-client@3")
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