Difference between revisions of "Addon:NetworkChart"
(→Privacy) |
(→Privacy: this is vague in itself remember your writing for the user) |
||
| Line 50: | Line 50: | ||
===Privacy=== | ===Privacy=== | ||
| − | [[File:Network_chart_menu_Privacy.png|thumb|250px|left|Network Chart {{man label|Privacy}} preferences tab]] The {{man label|Privacy}} preferences tab allows dates for birth and marriage to be made vague. All individuals that have a valid date for either a birth or marriage can have that date rounded to the nearest decade after the entered. (This feature will change in the future to round to just the year per Gramps make vague function.) Additionally, middle names can be changed to just show initials. (This feature will change in the future to just remove middle names altogether.) Finally, private records for individuals can be included or not. If not, the individual node will contain the words "Private Record" for all those individuals marked private in Gramps. | + | [[File:Network_chart_menu_Privacy.png|thumb|250px|left|Network Chart {{man label|Privacy}} preferences tab]] The {{man label|Privacy}} preferences tab allows dates for birth and marriage to be made vague. All individuals that have a valid date for either a birth or marriage can have that date rounded to the nearest decade after the entered. (This feature will change in the future to round to just the year<!-- per Gramps make vague function. -->) Additionally, middle names can be changed to just show initials. (This feature will change in the future to just remove middle names altogether.) Finally, private records for individuals can be included or not. If not, the individual node will contain the words "Private Record" for all those individuals marked private in Gramps. |
{{-}} | {{-}} | ||
Revision as of 04:58, 10 March 2017
This is a Third-party Addon. The Addon/Plugin system is controlled by the Plugin Manager. Please use carefully on data that is backed up, and help make it better by reporting any issues to the bug tracker. |
Work in Progress - Addon not available yet
Network Chart is a website addon for Gramps. The objectives of Network Chart:
- Generate a single graph showing connectivity between individuals
- Clickable nodes (individuals) that contain a hyperlink for a visual index
- Display connectivity paths and highlight them
The default output is a Scalable Vector Graphics (SVG) file that can be viewed in a browser. Network Chart uses the python networkx module to assist in selecting what to display and the pygraphviz module to generate the chart.
To start the Network Chart addon use the following menu option Reports > Web Pages > Network Chart...
Blurb on where the example database came from... Blurb on non-determistic nature of pygraphviz.
Prerequisites
Requires the following to be installed:
pip install networkx
To get "libcgraph" for pygraphviz you first need to install the development package of graphviz eg:
apt install graphviz-dev
or
dnf install graphviz-devel
then run:
pip install pygraphviz
Usage
Main
The Main preferences tab (see image on left) controls the output filename, folder, and chart title. The filename defaults originally to the database name + '_network' with '.svg' added automatically on output. The Chart Title defaults to the database name and the folder to the top level user default home. Once an entry is changed it will be remembered and used for the next time as well. Clearing the entry will set it back to default. Additionally, name and date formats for the chart can be modified using the Gramps available formatting.
Graph style menu selects the type of connectors with choices being Orthogonal, Straight, and Curved. In the example default output shown on the right, the default orthogonal option was selected resulting in straight connectors with right angles. Graphs with over 1500 people should probably use the Curved or Straight options with noticeable reduction in the time needed for graph generation. Graph direction controls which of the four different orientations to use.
URL Style selects one of Database, Dynamic, Static, or None (Don't include). This option selects what hyperlink will be used for individual nodes when the SVG chart is viewed from a browser. The Database option will select the primary URL from the database if one is available or none if it is not. Dynamic will use the URL Prefix, Suffix from the next line in the Menu and the GrampsID of the node. The Example Default Output chart shown includes dynamic URL's. For example, Henry Webb in the database has GrampsID = I0125. So the URL for that node will have the prefix of 'https://mywebsite.com/home/' and the suffix '.html' yielding a node with a link to 'https://mywebsite.com/home/I0125.html'. The dynamic URL changes for every node. A static URL will use only the URL Prefix and the Don't Include URL or None will not place any link in the nodes.
The font selection is straightforward. Obtain the name of the font that you wish to use and type it in the entry box. The only requirement is that the font already be installed on your system. If the font is not found then a default font will be used. This is a silent operation and will not warn on a font not found. When the SVG graph is generated that font will be identified for use, however, if someone viewing the chart does not have the same font installed they will see their default font instead. Embedding fonts in SVGs or making them a local access is possible but beyond the scope of this plugin. The default font is White Rabbit by Matthew Welch which is an extremely readable font. It can be obtained from https://www.fontsquirrel.com/fonts/white-rabbit and the license found at http://www.squaregear.net/fonts/license.shtml .
The Spacing option controls the space between "generations" of nodes. It can be anywhere from 0.1 - 5.0 inches. Finally, the Different Node Shapes for gender controls the box shapes and makes the Male and Female box shapes different. This is the default selection but can be turned off.
Color
The Color preferences tab controls most of the colors on the chart. The Network Chart SVG background is transparent so the background color you see will be the default background color of your browser or if the SVG was embedded in a webpage with a background image you will see that image below the Network Chart SVG. The node backgrounds for Male, Female, and Other can be changed. An alpha is used for the individual node backgrounds. Setting this to 0 will make the node background completely transparent. Setting it to 255 will make it completely solid (opaque).
Connector lines are just that, the connecting lines from node to node for a family connection or marriage. The Highlight connector line is used for a highlighted path as discussed in the Highlight Menu section. The Trim box edge is used on nodes in the graph that have been "trimmed" as discussed in the Trim Menu section. Finally, all node background colors can be set to none with the Remove Color Backgrounds option.
Privacy
The Privacy preferences tab allows dates for birth and marriage to be made vague. All individuals that have a valid date for either a birth or marriage can have that date rounded to the nearest decade after the entered. (This feature will change in the future to round to just the year) Additionally, middle names can be changed to just show initials. (This feature will change in the future to just remove middle names altogether.) Finally, private records for individuals can be included or not. If not, the individual node will contain the words "Private Record" for all those individuals marked private in Gramps.
Trim
The Trim preferences tab allows "trimming" of the database to display less individuals in the Network Chart. The Trim Descendants option trims all descendants "below" the selected individuals. The Trim Ancestors option attempts to trim all ancestors "above" the selected individuals. Individuals by marriage will also be removed depending on their location in the network relative to the person trimmed. Both options allow entry of multiple people. The Trim Menu image shows the selection of individual I0118 to trim descendants and I0111 to trim ancestors. The result is shown on the right in the Trim Example 1. Note the nodes of the individuals selected on the trim tab are bordered with a red dashed trim.
Trim Menu Example 2 shows the selection of additional individuals to trim. However, this example will generate "orphans" or individuals with no connections as a result of the trimming operation. This is shown in Trim Example 2. Note the three isolated individuals in the top right corner including one of the individuals selected in the trim menu.
The Trim Groups option will trim smaller groups/trees or individuals that are disconnected. You must enter the minimum number of individuals in a group/tree to display. For databases with more than 1500 individuals this option is required and the minimum number is set to 2. This will force all disconnected single individuals to be removed from the graph. Selecting a number greater than the largest group/tree will return only the largest tree or those trees that are equal in size. For this example the Trim Groups has been selected with a size of 2. The result removes the isolated individuals from the graph as shown in the Trim Example 3 chart.
Highlight
The Highlight preferences tab.
Show Path Only This is the last method to select what portion of the database to display. The choices are "Direct" or "Any". The Direct option will attempt to find a direct path between the two individuals selected and display only that path. The Any option will attempt to find any path between the two selected individuals and display only that path.
Center Person This is an option in selecting the portion of the database to display. Selecting a center person and radius for the graph will isolate the graph to just that selected person and anyone within the radius. The radius is the maximum allowable steps or edges between the center person and anyone else in the graph. All others outside of the maximum steps or edges will not be shown. Any connection via parent, child, or marriage counts as a step or edge.
Config
The Config preferences tab.






