@@ -30,8 +30,46 @@ After visualization is complete, you can interact with the graph in the followin
* _Map node types_: Allows you to transform the graph by mapping two node types that have no direct connection onto each other by way of checking how many trials they are mututally associated with.
* Example graph for 1720:

* If you now map offence to punishments, you get this:
* If you now map offences to punishments, you get this:

### Special node types
...
\ No newline at end of file
### Some comments on the architecture with special emphasis on _special node types_
Initially, the idea was to make the visualization suite as generic as possible, i.e. that almost any JSON file that adhered to the basic structure of
could be visualized without loss of functionality. However, due to time constraints (as usual), things did not work out this way entirely.
A remnant of this genericity idea can be found in the main JavaScript file of the suite, __client/js/controllers/vis-general.js__. There, two $rootScope vairbales are of interest:
1.**$rootScope.json\_mapping**
2.**$rootScope.special\_node\_types**
These variables maintain a somehwat generic code base by simply defining only _once_ any idiosyncrasies of the encountered JSON files.
In a future update, we might expand this idea by allowing you to freely change a config file that simply gets read by the suite, instead of having to change the code in the nested directory.
#### **$rootScope.json\_mapping**
The first variable is intended to define a mapping between the JSON-specific nomenclature of keys to the generic graph-theoretical terminology.
For example, if you call your nodes "knoten" and your edges "verbindungen", you can simply change the mapping to:
$rootScope.json_mapping = {
nodes: 'knoten',
edges: 'verbindungen',
...
}
This way, every time the suite needs to access nodes, it can do so by checking this mapping on how _you_ refer to nodes.
#### **$rootScope.special\_node\_types**
The second variable declares some nodes to be "special" in the sense that those are nodes that should be displayed differently from undeclared nodes.
Notice that this automatically displays nodes with the default shape and color if they do not match the condition given in the variable.
However, this match condition is not made explicit but instead currently relies on the "label" of a node to match a String in this variable.
Furthermore, while the colors of special node types are set randomly, the shapes are determined by another (finite) list of manually defined shapes (see possible value for "shape" in the [vis.js documentation](https://visjs.github.io/vis-network/docs/network/nodes.html)).
In the future, there will be either a limit on the number of special node types or a workaround around the possible shapes.
Furthermore, the match condition will be made explicit as well (defining what key or attribute must match one of the values of this list).
In any case, this variable and its associations will probably be outsourced to a config file as well.