Skip to content


Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

I'm very impressed with the D3 javascript framework, used to generate powerful, animated visualizations in the browser.

In addition, the ReactJS user interface library and Redux state container make for a powerful Functional Programming environment.

Finally, the mongodb NoSQL database, and the NodeJS environment allow us to create a high-performance mid-tier and back-end that is 100% (CommonJS) javascript.

I used those tools to develop this app (see it live!). You can point this app to any dataset, and it will semi-automatically provide categorical data pivoting and filtering. (You will have to modify the metadata object in js-react/metadata.js, but that is an easy thing to do.)


First, git clone the app. Then:
  $ cd ./PivotApp
  $ npm install

Then you should make sure that MongoDB version 4 (or greater) is installed on your server, and is listening at localhost:27017. You can load up the repo's example datasets into your MongoDB database thus:

  $ npm run loader

Next, run the REST server:

  $ npm run server

In a separate window, run the client app:

  $ npm run dev-client

Then point your browser at http://localhost:8080/webpack-dev-server/index.html to view the data.

The app has the following interesting properties:

  • React/Redux are used to manage user events and generate DOM changes. Pure functions are leveraged to great effect.

  • Input data is decoupled from presentation. There aren't any data-specific kludges in the javascript code.

  • A metadata layer ensures that data is decoupled from input controls. Adding a metadata table and joining it to the actual input is a clean method of describing whether particular data can be added to tooltips, used for pivots, or used for aggregation. This allows a single point of control for any dataset.

  • Label placement is a pretty hard problem, solved here with a force graph. A crowded graph presents a tricky label positioning issue. We use a force graph to force label names apart.

  • A force graph is also being used to model a simple network. In the app, the network is a simple hierarchy built from inherent parent-child relationships within the dataset.

  • The app supports auto-rollup of status within the network visualization. Statuses are plotted as red (bad), yellow (warning), green (ok), and gray (unknown). A parent node can have its own innate status, but it also displays (on its ringed outer border) the worst status of any of its descendents.

  • Data transforms use the mongodb aggregation pipeline, a super-efficient method for retrieving large datasets on the server. The aggregation pipeline handles filtering, pivoting, and aggregation. The work could have been done in the browser, but as the data scales, using fast-performing server techniques are better.


A MERN stack app that pivots and displays data







No releases published


No packages published