Public
Edited
Jan 4, 2023
4 forks
7 stars
Insert cell
Insert cell
Insert cell
Insert cell
frames = {
const end = interval(d3.utcMinute.offset(new Date, -10));
const start = d3.utcHour.offset(end, -6);
return (await Promise.all(interval.range(start, end)
.map(async date => [date, await image(date)])))
.filter(([, image]) => image !== null);
}
Insert cell
function image(date) {
return new Promise((resolve, reject) => {
const image = new Image;
image.onload = () => resolve(image);
image.onerror = () => resolve(null); // missing imagery
image.src = `https://cdn.star.nesdis.noaa.gov/GOES18/ABI/SECTOR/wus/GEOCOLOR/${formatDate(interval(date))}_GOES18-ABI-wus-GEOCOLOR-${resolution.join("x")}.jpg`;
});
}
Insert cell
interval = d3.utcMinute.every(10)
Insert cell
formatDate = d3.utcFormat("%Y%j%H%M")
Insert cell
resolution = width * devicePixelRatio >= 1500 ? [2000, 2000] : [1000, 1000]
Insert cell
d3 = require("d3-time@2", "d3-time-format@3")
Insert cell
import {Scrubber} from "@mbostock/scrubber"
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