Visualization Library for Statistik Stadt Zurich

A d3-based library for fast chart preparation

At Interactive Things, we partnered with the statistical office of the city of Zurich to develop a library of reusable chart components based on d3. The design team developed a precise design specification and visual language, and I contributed to a library that embodied that design. The goal was to create a set of components which extended d3 with pre-prepared chart types, but were still flexible enough to enable extensive configuration and their use in a variety of contexts.

For the library, the developers built on d3's reusable chart pattern for the components, building each one as a function that returned a configurable object. We made extensive use of techniques from functional programming, and strove to create an API that was as declarative as possible. The example code we wrote included a sort of micro-implementation of the "flux" architecture that powered the state and transition management of the charts.

Our work with the client included several subsequent expansions of the library, which added new chart types, developed better APIs that improved developer usability, and made core changes like improving mobile responsiveness.