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

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