jasondavies/science.js

Scientific and statistical computing in JavaScript.

JavaScript

896

82 commits

updated Mar 6, 2026

See the code

See what people are saying

SourceMessageScoreDate

Try interrupted sinusoidal, ot will be less edgy. https://www.jasondavies.com/maps/interrupted-sinusoidal/ This is a beautiful site. Don't miss it if you haven't been there before

on Folding Paper Globes

0

Aug 2, 2026

The framerate and latency on this visualization is absolute magic. Hover the mouse around over the sphere: https://www.jasondavies.com/maps/voronoi/

on World Capitals Voronoi

0

Jun 11, 2026

World Capitals Voronoi

133

Jun 8, 2026

> Arguably, every classroom (and home with children) should have a globe Or even better is to build one. It is a lot of fun. It is very instructive to understand why you need to shape the gores that you cut out of flat paper to stick them to the sphere. The boundaries of the gores need to curve so…

on Spherical Voronoi Diagram

0

Jun 8, 2026

I remember seeing something similar to https://www.jasondavies.com/maps/voronoi/capitals/. But the areas were weighted by the populations of the capitals. You ended up with something quite close to real political maps IIRC.

on Spherical Voronoi Diagram

0

Jun 8, 2026

Spherical Voronoi Diagram

118

Jun 3, 2026

32-Bit Integer Multiplication on Tenstorrent

2

Nov 20, 2025

Optimal "where" on Tenstorrent

2

Nov 12, 2025

It's common to want some minimum spacing between your random points, so they don't get clumped together, i.e. approximating uniform spacing rather than uniform probability distribution. For that, Poisson-disk sampling is good. See e.g. https://www.jasondavies.com/maps/random-points/,…

on A simple way to generate random points on a sphere

0

Aug 24, 2025

Map Projection Transitions

2

Aug 14, 2025

README

Science.js

Science.js is a JavaScript library for scientific and statistical computing.

Currently, there are two modules:

  • science.stats, containing various implementations of statistical methods similar to those provided by R;
  • science.lin, for linear algebra.

Development

To help develop Science.js, you need to have Node.js and NPM installed. Once you have done that, run the following from the root directory of this repository to install the development dependencies:

make install

Thanks

I originally started this in order to add a reusable statistics module to D3.js, but now it's grown into a whole new project of its own!

The project structure and Makefile is based on that of D3, so a big thank you goes to Mike Bostock for this.

jasondavies/science.js

Scientific and statistical computing in JavaScript.

JavaScript

896

82 commits

updated Mar 6, 2026

See the code

See what people are saying

SourceMessageScoreDate

Try interrupted sinusoidal, ot will be less edgy. https://www.jasondavies.com/maps/interrupted-sinusoidal/ This is a beautiful site. Don't miss it if you haven't been there before

on Folding Paper Globes

0

Aug 2, 2026

The framerate and latency on this visualization is absolute magic. Hover the mouse around over the sphere: https://www.jasondavies.com/maps/voronoi/

on World Capitals Voronoi

0

Jun 11, 2026

World Capitals Voronoi

133

Jun 8, 2026

> Arguably, every classroom (and home with children) should have a globe Or even better is to build one. It is a lot of fun. It is very instructive to understand why you need to shape the gores that you cut out of flat paper to stick them to the sphere. The boundaries of the gores need to curve so…

on Spherical Voronoi Diagram

0

Jun 8, 2026

I remember seeing something similar to https://www.jasondavies.com/maps/voronoi/capitals/. But the areas were weighted by the populations of the capitals. You ended up with something quite close to real political maps IIRC.

on Spherical Voronoi Diagram

0

Jun 8, 2026

Spherical Voronoi Diagram

118

Jun 3, 2026

32-Bit Integer Multiplication on Tenstorrent

2

Nov 20, 2025

Optimal "where" on Tenstorrent

2

Nov 12, 2025

It's common to want some minimum spacing between your random points, so they don't get clumped together, i.e. approximating uniform spacing rather than uniform probability distribution. For that, Poisson-disk sampling is good. See e.g. https://www.jasondavies.com/maps/random-points/,…

on A simple way to generate random points on a sphere

0

Aug 24, 2025

Map Projection Transitions

2

Aug 14, 2025

README

Science.js

Science.js is a JavaScript library for scientific and statistical computing.

Currently, there are two modules:

  • science.stats, containing various implementations of statistical methods similar to those provided by R;
  • science.lin, for linear algebra.

Development

To help develop Science.js, you need to have Node.js and NPM installed. Once you have done that, run the following from the root directory of this repository to install the development dependencies:

make install

Thanks

I originally started this in order to add a reusable statistics module to D3.js, but now it's grown into a whole new project of its own!

The project structure and Makefile is based on that of D3, so a big thank you goes to Mike Bostock for this.

Project health

Overall

2.2/10

Maintained

0/10

Code review

2/10
OpenSSF Scorecard

Latest release

1.9.3 · Aug 20, 2015

Releases this year

0

Significant stargazers

Pascal Hertleif

970 followers · starred Jan 2014

tomer doron

535 followers · starred Jul 2011

Alex Petrov

446 followers · starred Jul 2014

Antoine BERNIER

140 followers · starred Jul 2011