AppMap as a D3 Force-Directed Graph
The AppMap framework specifies a simple-to-work-with data format that can be readily visualized in popular OSS libraries such as the D3. This example demonstrates how to programmatically parse an event stream in a recorded AppMap JSON file and how to visualize the dynamic dependencies between classes in a D3 force-directed graph.
The example loads AppMaps that were recorded for the app.land OSS gallery. The source code lists a few additional AppMap URLs for Java and Ruby OSS applications that can be quickly displayed in place of the default map. The graph is rendered with the D3 library and offers endless customization opportunities.
The example uses AppMap data recorded from the open source application Discourse, which is a “100% open source discussion platform built for the next decade of the Internet.” The data used in this example was recorded from a Discourse test case using the appmap-ruby client, and uploaded to the AppLand sandbox. The recorded scenario data is freely downloadable.
To obtain the download URL for any scenario in the AppLand sandbox, click Properties and then find the Raw data link: