Published
Edited
Jan 14, 2020
3 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
location
Insert cell
solar = (await require("solar-calculator@0.2"))(location)
Insert cell
solar2 = (await require("solar-calculator@0.2"))(location2)
Insert cell
formatMonth = d => d.toLocaleString("en", {month: "long", timeZone: "America/Los_Angeles"})
Insert cell
formatHour = d => d.toLocaleString("en", {hour: "numeric", timeZone: "America/Los_Angeles"})
Insert cell
height = width
Insert cell
width = 954 + 28
Insert cell
Insert cell
scale = (width - 120) * 0.5
Insert cell
graticule = d3.geoGraticule().stepMinor([15, 10])()
Insert cell
outline = d3.geoCircle().radius(90).center([0, 90])()
Insert cell
projection = d3.geoProjection((x, y) => d3.geoStereographicRaw(x, -y))
.scale(scale)
.clipExtent([[0, 0], [width, height]])
.rotate([0, -90])
.translate([width / 2, height / 2])
.precision(0.1)
Insert cell
path = d3.geoPath(projection)
Insert cell
Insert cell
Insert cell
Insert cell
update = chart.update(solar, solar2)
Insert cell
updateDate = chart.updateDate(date)
Insert cell
// date = new Date(Date.UTC(2020, 12, 1))
Insert cell
d3.utcMonths(new Date(2014, -1, 1), new Date(2014, 11, 1))
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