Web-native data visualisation code examples written with the D3 javascript library.

These examples are hosted as Github Gists for reference. Click on a thumbnail to view the visualisation and the code.

Least Squares Fit

Plots data from a CSV file and fits a straight line to the data using the Least Squares method.

Random Scatter

A set of 100 points are given a new uniform random distribution every 5 seconds.

Building a Normal Distribution Histogram

A randomly-generated normal distribution with a mean of 0 and a standard deviation of 3 on an ordinal x-axis. The histogram will add one datapoint at a time until it has reached 100 datapoints.

Highest Peaks of EU States

A bar chart of the highest points of each EU member state. Note: I’ve ignored peaks that aren’t on the European continent.