Published
Edited
Jul 20, 2020
5 forks
Importers
70 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
nycOpenData = d3.json(nycOpenDataLookup[datasets])
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
path = d3.geoPath()
.projection(d3.geoConicConformal()
.parallels([33, 45])
.rotate([96, -39])
.fitSize([width, height], nyc))
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
contoursData = {
let values = [];
nyc.features.map(neighborhood => {
const lookupVal = "$" + nycNeighborhoodLookupMap[neighborhood["properties"]["neighborhood"]];
const numPopulation = neighborhoodLookup[lookupVal];

d3.range(numPopulation/1000).map(Object).forEach((d,i) => {
values.push({"neighborHoodD": neighborhood, popID: i});
})
})
return values;
}
Insert cell
Insert cell
Insert cell
Insert cell
densityContours = d3.contourDensity()
.x(d => path.centroid(d.neighborHoodD)[0])
.y(d => path.centroid(d.neighborHoodD)[1])
.size([width, height])
.cellSize(contourCellSize)
.bandwidth(bandWidth)
(contoursData)
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
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