Introducing Pivot.js

Some of you are likely aware of the library I've been working on with @rwjblue over the past few weeks. The name of this library, as I'm sure you've (very cleverly) deduced is Pivot.js. It allows you to create meaningful reports from large data sets quickly and (relatively) painlessly. We've even created a nice little jQuery plugin that enables you to get running with very little effort. Let's go through why we built Pivot.js, and then get a pivot implemented.

Why we built Pivot.js

In short, summarizing data can be a serious pain. If you've ever attempted to get something usable from 30k rows of data before, you know just how difficult this can be. For several years we've relied on MS Excel's pivot table functionality to create enterprise-wide analysis reports. The learning curve behind setting up an Excel pivot table leaves something to be desired, and we found ourselves unable to share our reports with our clients without setting up a VPN (unless it was a snapshot/non-interactive). We finally realized how much time we spent maintaining this structure and decided it was worth it to invest in an alternative. Enter Pivot.js.

Meet Phil

Let's talk about Phil the web-savvy entrepreneur. He has a site where he sells his homemade novelty sci-fi T-shirts. His T-shirts have picked up sales over the past three months, breaking over a thousand sales per month. He realizes that he'd like to create some custom reports to display his recent success and help him measure his performance. He stumbles upon Pivot.js and starts creating a little Sinatra app that'll help him display some reports.

After reading up a little bit and requiring pivot.js in his <head></head>, he creates a new pivot based off his CSV.