reorder.js

Matrix reordering in JavaScript.

Usage no npm install needed!

<script type="module">
  import reorderJs from 'https://cdn.skypack.dev/reorder.js';
</script>

README

Reorder.js

Reorder.js is a JavaScript library for reordering matrices, i.e. either tables, graphs vertices, or parallel coordinates axes.

Want to learn more? See the wiki.

Development

To develop Reordering.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:

npm install

Testing

To run the tests in the distribution, use the following command:

npm run test

Examples

To run the examples, use the following command:

npm run dev

It should open a web browser but if does not, open a web page and connect to: http://localhost:3004/.

References

The library is used by several systems, including Bertifier, The Vistorian, and Compadre.

Thanks

Thanks to Curran Kelleher @curran for adapting the library to modern JavaScript modules.

Thanks to Philippe Rivière @fil for porting the "Les Misérables" example to observablehq

Thanks to Renaud Blanch for giving me his implementation of the 'Optimal Leaf Ordering' algorithm. He has improved it and the distribution is available as ordering.

I originally started this in order to add a reordering module to D3.js.

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