Based on James Nylen's d3 process map, FOrce LAyout Relational Diagram (FOuLARD) tweaks Nylen's code to use the same annotated spring-force format to visualize scientific literature searches.
FOuLARD needs to run on a server with PHP enabled. To view FOuLARD diagrams requires a Javascript-enabled browser.
- Most of James Nylen](https://github.com/nylen "James Nylen")'s d3 process map
- Cynthia Brewer, Mark Harrower and The Pennsylvania State University's ColorBrewer modified to include the Child Mind Institute's color scheme.
- The two example datasets listed below
Each dataset needs its own subdirectory under the [FOuLARD/data](https://github.com/ChildMindInstitute/FOuLARD/tree/master/data)
directory. That directory name can be appended to the url of your live application after ?dataset=
. See Example Applications below for examples.
Within each dataset, the following files are required:
-
config.json
A JSON file including the following keys:
-
"title"
: stringThe title of the diagram.
-
"graph"
: JSON objectGravitational parameters. See d3's documentation and/or the Example Applications below for more details and examples.
-
"types"
: JSON objectThe color-coded types of nodes included in the diagram.
-
"constraints"
: JSON objectNode-based changes to the parameters set in
"graph"
.
-
-
objects.json
A JSON file with one entry per node in the diagram. Each node-entry requires the following three keys:
-
"depends"
: list of stringsNodes on which this node depends, listed by node name.
-
"name"
The name of this node.
-
"type"
: stringThe color-coded type of this node. This value must also be included in the
"types"
object inconfig.json
.
-
Within each dataset, the following files are optional:
-
Markdown files
One markdown file with the name of the name of the node and the extension
.mkdn
per node in diagram. When a node is clicked into focus, the Markdown documentation will display at the bottom of the diagram if such a file is present.
Once your dataset is ready, load your FOuLARD instance on a PHP server, setting the permissions of all .php
files to 644
and all directories to 755
: find . -type f -name '*.php' -exec chmod 644 {} \; find . -type d -exec chmod 755 {} \;
Once loaded, the application will be accessible via a Javascript-enabled browser.
This dataset was built from a comma separated value file using a Python script to create the relevant JSON and Markdown files.
This dataset was built from a Dia diagram exported to Graphviz' DOT format which was then loaded into Graphviz and reexported as JSON. The few Markdown files in this example were handcoded.