Skip to content

Instantly share code, notes, and snippets.

View sathomas's full-sized avatar

Stephen A Thomas sathomas

View GitHub Profile
@sathomas
sathomas / README.md
Last active May 9, 2021 04:37
A Material Design Gauge in Pure CSS/HTML

As a change of pace from complex visualizations, here's simple Material Design gauge control implemented in pure CSS/HTML. The implementation includes an optional JavaScript component to change the gauge value dynamically. If you'd like to use the gauge on your web pages (it's open source), you can download it from GitHub, where you'll also find documentation on how to use it. In this post we'll walk through the implementation to understand how it works.

@sathomas
sathomas / README.md
Last active March 23, 2021 13:04
Visualizing Bayes, Markov Chain Monte Carlo

Thanks to the excellent bayes.js library from Rasmus Bååth it's now possible to experiment with Bayesian statistics in JavaScript. We'll take advantage of that library in this series of posts, which demonstrate Bayesian statistics visually for anyone with a web browser.

This first post covers Markov Chain Monte Carlo (MCMC), algorithms which are fundamental to modern Bayesian analysis. MCMC is also critical to many machine learning applications. Since this is the first post, though, we'll start with a brief introduction to Bayesian statistics.

@sathomas
sathomas / README.md
Last active August 27, 2016 23:11
Variations on a Random Walk

Can seemingly trivial differences at a small scale have noticeable effects at larger scales? Certainly, as we've learned from chaos theory. This visualization considers another perspective on the same question. It shows the results of three variations of a random walk. The difference between the variations might seem insignificant, yet the resulting large-scale behavior is not at all the same.

// ### Ready
//
// This module provides a convenient way to register
// a callback when the document is ready. The callback
// is called immediately if the document is ready
// when the module's API is called.
//
// > This really shouldn't be necessary as a library
// module, but IE10 and below have a nasty bug in how
// they report `document.readyState`. The workaround