Published
Edited
Jul 7, 2021
1 star
Food clockDisambiguating selection in a 2D treePerceptually more-uniform diverging color scatterplotDays since a U.S. President was last shotSingle-serving sitesDo you feel old?Dynamic scales deprive dashboards of institutional memoryNesting chevron pillsColumnar group byDe Moivre by generatorsShowing ESPN Receiver Tracking Metrics using weighted radar chartsCombine consecutive stringsDollar spectrumThe Feedback BathtubIs Visnu’s hex random?Dual axes are a great way to show correlation 🔥Promise.raceHealthcare plan payoff curvePlot image beeswarmGenerations on Google TrendsFor i of myriadChatterjee correlationChecking invariance of round trip-0 and 0Norms and central tendencyDisordering ULsData-driven table sort iconPlot: weather with sunrise and sunsetRecreating Östling’s regression visualizationsMixing knowledge and random guessesHow many five digit numbers are prime?Warping gridspaceSampling moodLow IDsTesting for OmicronAll Too WellDistance from square root to nearest factorSuper BogosortParrots of Telegraph HillNudibranch sightingsDecimal watershedsFirst Ladies of the United StatesEval-in-PlaceClassic Research in Data VisualizationResponsive PrettierObsv, obvsGenerating All Natural Numbers
Daily Café Picker
Concentration of MeasureDivide SeriesMultiply SeriesMultiplication and Division by Similar TrianglesRecursive typed table (sketch!)Lorenz CurveThe “Select cells” buttonRecursive viewof testBubble Map RaceSensitivity and Specificity (sketch)Reactive transition sketchHow to crash ObservableSpilhaus World TourSimpson’s paradox: CalendarsThe Cauchy DistributionEmoji frequenciesThe Man Comes AroundNot what I meant to doSVG numeral sketchesRSAMandelbrot’s binomial time bending??Re: “Can Moons Have Moons?”Continuous cursorParenthesis matching with vertical offsetsA filter icon that shows filtering instead of funnelingFlag of the Popular VoteFlag of the Popular VoteFlag of the Popular VoteTrailing zeroes in factorialsBitcoin fractal bubbles (animated)Bitcoin fractal bubbles
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
seed = +d3.timeDay.floor(new Date())
Insert cell
place = d3.shuffler(d3.randomLcg(seed))(places.slice(0))[0]
Insert cell
places = results.filter(d => d.rating >= 3).sort((a, b) => d3.descending(a.id, b.id))
Insert cell
Math.sqrt(area) / 2
Insert cell
results = {
let results = [];
let n = 0;
while (true) {
const page = await search(category, n);
results = results.concat(page.businesses);
if (results.length >= page.total) break;
if (n++ > 10) break;
}
return results;
}
Insert cell
Insert cell
categories = (
await (
await fetch(
`https://cors-proxy.visnup.vercel.app/api.yelp.com/v3/categories`,
{
headers: { authorization: `Bearer ${yelpKey}` }
}
)
).json()
).categories.map((d) => d.alias)
Insert cell
// Docs: https://www.yelp.com/developers/documentation/v3/business_search
yelpKey = "n4MdpSiiFKFAukCljMUheeOWjBXygRXSXGsCyuVqJnhxv3yXwOzPXKXWhClXIenujoNRRDP1nMHFwHUxN6Gm1g872bDyGT3k5UWyDGvSyQawYPz9jXnESXjWLP_kYHYx"
Insert cell
// Docs: https://developers.google.com/maps/documentation/embed/map-generator
gmapsKey = "AIzaSyBz_sOVfuXMJsi5YLkNW0SJv3VqklumDAc"
Insert cell
// Adapted from https://www.johndcook.com/how_big_is_a_degree.html. All lengths in miles. This is only approximate, because it assumes the area is small relative to the surface of the earth, and treats it as rectangular, which it totally isn’t. That sloppiness is of course mine (Toph’s), not John D. Cook’s.
area = {
const { latitude, longitude } = yourLocation;
const unit = 1 / 10 ** precision;

// "A degree of latitude, one degree north or south, is about the same distance anywhere"
const latLength = 69;

// Compute spherical coordinates to find length of one degree of longitude
const earthCircumference = 24902.0;
const longLength =
(Math.cos((latitude * Math.PI) / 180.0) * earthCircumference) / 360.0;

return latLength * longLength * unit ** 2;
}
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