See a pre-prepared example: Some Java+Maven projects in a directory hierarchy
All the data is loaded in through the URL. Specifically the base64 string to the right of the hash (#). The data within that hash parameter never leaves the browser. While the browser may requests the pages from the web server (e.g. total.html)
Make sure you have installed 'git size', first. Instructions here.
git size --sunburst --recursive
If that is too much for your terminal, try this:
git size --sunburst-html --recursive > foo.html
In that html file is a link you can click on to get to this JavaScript app with the right parameter.
This JavaScript app is forked from http://bl.ocks.org/kerryrodden/7090426, which has code in a gist https://gist.github.com/kerryrodden/7090426
The gh-pages source is available at this Github repo, and is Apache licensed.