In Site data to sheets i showed how to get basic data from Analyzing site content with GAS into Excel and Google Sheets. To be able to use Excel tables to d3.js Force diagram, we are going to focus on massaging the data in Excel, then automatically creating a basic d3 force diagram. I've now enhanced this with a collapsible version, Focus node explorer with d3.js
We have to process the data a little beyond what is automatically possible using Rest to Excel library as in Site data to sheets. We can still use the same library entry, but instead we need to manually unravel the tag data as follows.
That gives us a dataset that starts like this
The data is now already perfectly set up to use Excel tables to d3.js Force diagram, so with a little tweaking of these parameters,
We get our first d3 viz of the google site. Here's a snap
For help and more information join our forum,follow the blog or follow me on twitter .
Services > Desktop Liberation - the definitive resource for Google Apps Script and Microsoft Office automation > GAS and sites >