- folders are districts
- files are sub-districts
- functions are buildings
- inner functions are represented as buildings on the top of their nested function / building
This for example is the visualisation of the AngularJS source code.
JSCity even allows you to interactively navigate these visualisations, which is pretty cool.
In any case, JSCity is a useful tool for analysing and understanding software complexity.