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

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