View on GitHub

d3.examples

Applying d3 framework for handling and exploring (Javascript/Python) Eurostat data and metadata.

Example 3 - d3-tree-based visualisation of database contents as a collapsible tree
Description

The implementation presented here reuses the d3-tree material introduced in an example of graph visualisation as tree, and aims at representing the table of contents of Eurostat online database.

The webpage example3_toc.html represents the table of contents of Eurostat online database as a collapsible tree implementing Reingold-Tilford algorithm. See below for further useful references.

Example 3 ToC excerpt

You can get a preview of this page (e.g., using githack): check this address for direct rendering.

Usage

The original material includes: the Javascript source code dndTree.js that has been slightly adapted for the purpose of this visualisation.

The Python code example3_ToC.py will enable you to reproduce the tables (files) used in the visualisation of the table of contents. We also provide two generic modules that will enable you to select and prepare the metadata like in the visualisation example:

The latter module will generate a single JSON file (actually a Javascript script), ToC.json that contains the formatted table of contents.

References