Skip to content

Instantly share code, notes, and snippets.

Johan Sundström johan

Block or report user

Report or block johan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@johan
johan / .block
Created Jul 20, 2016 — forked from mbostock/.block
Sleep Cycles
View .block
license: gpl-3.0
View README.md

Hourly solar analemmas (ignoring daylight savings time) as seen from San Francisco in 2014.

View README.md

A recreation of E.J. Marey’s graphical train schedule. Stations are separated vertically in proportion to geography; thus, the slope of the line reflects the speed of the train: the steeper the line, the faster the train. This display also reveals when and where limited service trains (in orange) are passed by baby bullets (in red). This type of plot is sometimes called a “stringline chart”.

See also the earlier Protovis version by Vadim Ogievetsky.

@johan
johan / README.md
Last active Oct 11, 2017 — forked from NV/Readme.md
JS debug breakpoint / log snippets
View README.md

stopBefore.js

2min screencast

These tools inject a breakpoint, console.log or console.count in any function you want to spy on via stopBefore('Element.prototype.removeChild') or ditto stopAfter, logBefore / logAfter / logAround / logCount.

Works in Chrome DevTools and Safari Inspector; Firefox dev tools reportedly less so.

@johan
johan / README.md
Last active Dec 12, 2015 — forked from mbostock/.block
The psy curve
View README.md

This example demonstrates the construction of the psy curve.

@johan
johan / README.md
Last active Dec 11, 2015 — forked from johan/README.md
Sunny side of the Earth, for any date and time.
@johan
johan / README.md
Last active Dec 11, 2015 — forked from mbostock/.block
Solar Terminator on Interrupted Mollweide
@johan
johan / README.md
Last active Dec 11, 2015 — forked from benelsen/README.md
Earth, night and day sides.
View README.md
@johan
johan / README.md
Last active Dec 11, 2015 — forked from mbostock/.block
Why you arrive from the North when flying to the US from Iceland.
View README.md

When flying to the US via Iceland, you never arrive from the East, but always cross the North US border. This two-point equidistant projection focused on Keflavik airport, Iceland (red) and San José airport, USA (blue) demonstrates why.

The circles are great circles centered on either airport spaced at 10° intervals.

The projection implementation is still a work in progress, hence the visual artifacts; it requires elliptical clipping. Based on a gist by Mike Bostock.

You can’t perform that action at this time.