Skip to main content
100%

Reproducible Randomness

✓ Published0🌍 Public
WWaseem Medhat
Last edited Dec 13, 2022
Created on Dec 13, 2022
Forked from D3 Starter

Five gold horizontal bars of varying length represent five random decimals generated with the `seedrandom` library, making the sequence reproducible via `Math.seedrandom('hello')`. Each bar's width and its corresponding numeric label are drawn using D3 v7 selections and SVG `rect` and `text` elements. The visualization demonstrates how setting a random seed produces consistent, deterministic output in an otherwise stochastic process.

AI-generated description

Testing out the randomseed JS library for making a reproducible random number generator.

Setting a random seed makes the "random" number generation process reproducible so that the same sequence is generated every time the script is run.

The sequence can be changed by changing the random seed (the string in the Math.seedrandom() call at line 3 in main.js).

MIT Licensed

Similar vizzes