Descendant Graph Query

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Descendant Graph Query

Tony Gordon
I want to produce a descendant graph of someone who was married twice
with offspring from both marriages. For each person on the graph I want
to show birth, death and marriage dates and who the spouse was. I have
chosen the report options $n, b. %b - d. %d, m. %s $m. This produces
what I want for most of the graph but does not include the second wife
of the start person or note that some of the children are the offspring
of this second wife. Is there some way I can do this?

Any help greatly appreciated.

I am running 2.0.9-1 on FC4.

Tony



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Descendant Graph Query

Alex Roitman
Tony,

On Sun, 2006-02-05 at 17:18 +1300, Tony G wrote:
> I want to produce a descendant graph of someone who was married twice
> with offspring from both marriages. For each person on the graph I want
> to show birth, death and marriage dates and who the spouse was. I have
> chosen the report options $n, b. %b - d. %d, m. %s $m. This produces
> what I want for most of the graph but does not include the second wife
> of the start person or note that some of the children are the offspring
> of this second wife. Is there some way I can do this?
>
> Any help greatly appreciated.

If you have graphviz package (should be easy to install if you don't)
then you can try Relationship Graph. You can control far more of the
graph options. The Rel Graph plugin can produce either dot file
(the one under Reports->Code generators) or the bitmap image (the
one under Reports->Graphical reports).

In fact both are producing dot file, and then the latter just runs
the dot file through graphviz's "dot" program to produce bitmap.

If you work with the dot file, you can tweak the graph to anything
you like, and then run dot on it when you are happy:
   $ dot -Tjpg -omyfile.jpg rel_graph.dot

You can find out about the dot language by reading dot's man page.

Alex

--
Alexander Roitman   http://www.gramps-project.org

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Descendant Graph Query

Tony Gordon
Alex

On Sun, 2006-02-05 at 11:41 -0800, Alex Roitman wrote:

> Tony,
>
> On Sun, 2006-02-05 at 17:18 +1300, Tony G wrote:
> > I want to produce a descendant graph of someone who was married twice
> > with offspring from both marriages. For each person on the graph I want
> > to show birth, death and marriage dates and who the spouse was. I have
> > chosen the report options $n, b. %b - d. %d, m. %s $m. This produces
> > what I want for most of the graph but does not include the second wife
> > of the start person or note that some of the children are the offspring
> > of this second wife. Is there some way I can do this?
> >
> > Any help greatly appreciated.
>
> If you have graphviz package (should be easy to install if you don't)
> then you can try Relationship Graph. You can control far more of the
> graph options. The Rel Graph plugin can produce either dot file
> (the one under Reports->Code generators) or the bitmap image (the
> one under Reports->Graphical reports).
>
> In fact both are producing dot file, and then the latter just runs
> the dot file through graphviz's "dot" program to produce bitmap.
>
> If you work with the dot file, you can tweak the graph to anything
> you like, and then run dot on it when you are happy:
>    $ dot -Tjpg -omyfile.jpg rel_graph.dot
>
> You can find out about the dot language by reading dot's man page.
>
> Alex
>
Thanks for the response.

I have Graphviz installed. I have looked at the Relationship Graph under
Graphical Reports and also under Code Generators. In the latter case I
have looked at the dot file produced. I have been to the Graphviz web
site and looked at the man page for dot. All a bit daunting really!

I am not sure how to get the information I want into the dot file (e.g.
the information I mentioned above) - there are not many additional
options available in Gramps. Are you suggesting that I manually make up
a dot file with the information that I want?

Where can I go for some more information on setting up a dot file to
produce the output that I want. As it is a descendant graph that in this
case I am after, are there examples where this has been done through
Graphviz producing something similar to the Gramps Descendant Graph that
I could copy?

Incidentally, I noted that the children in a Relationship Graph are
plotted in a random order, maybe to fit them in?

Tony





-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Descendant Graph Query

Alex Roitman
Tony,

On Mon, 2006-02-06 at 17:15 +1300, Tony G wrote:
> I have Graphviz installed. I have looked at the Relationship Graph under
> Graphical Reports and also under Code Generators. In the latter case I
> have looked at the dot file produced. I have been to the Graphviz web
> site and looked at the man page for dot. All a bit daunting really!
>
> I am not sure how to get the information I want into the dot file (e.g.
> the information I mentioned above) - there are not many additional
> options available in Gramps. Are you suggesting that I manually make up
> a dot file with the information that I want?

In theory you could do that. The dot file simply describes the
graph in the text form: nodes and edges (i.e. lines connecting
the nodes). Then the dot program would lay out the graph based
on that description. Depending on the size of your report
editing dot file manually could be easy or hard.

> Where can I go for some more information on setting up a dot file to
> produce the output that I want. As it is a descendant graph that in this
> case I am after, are there examples where this has been done through
> Graphviz producing something similar to the Gramps Descendant Graph that
> I could copy?

I was thinking that maybe you can start with the dot file produced
by gramps, and then tweak it to your liking. I am fairly clueless
about the magic of graphviz or what it takes to get a certain graph,
sorry :-(  Maybe Julio or Eero can offer some pointers?

> Incidentally, I noted that the children in a Relationship Graph are
> plotted in a random order, maybe to fit them in?

I am not sure. I remember Julio saying that the layout of the graph
does depend on the order in which the nodes are listed in the dot
file, so simply swapping nodes in the dot file may alter the layout.
However, I suspect this dependence is not straightforward and also
heavily depends on the rest of the graph. Sorry, I'm afraid I cannot
be of much more help here. If you want to find this out, maybe a
good idea would be to ask graphviz people?

We're simply dumping the nodes and the edges into dot file and then
leave things to graphviz. Laying out complex graphs is a science on
its own, we're not messing up with it :-)

Alex

--
Alexander Roitman   http://www.gramps-project.org

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Descendant Graph Query

Eero Tamminen-3
Hi,

On Monday 06 February 2006 09:33, Alex Roitman wrote:

> > I have Graphviz installed. I have looked at the Relationship Graph
> > under Graphical Reports and also under Code Generators. In the latter
> > case I have looked at the dot file produced. I have been to the
> > Graphviz web site and looked at the man page for dot. All a bit
> > daunting really!
> >
> > I am not sure how to get the information I want into the dot file (e.g.
> > the information I mentioned above) - there are not many additional
> > options available in Gramps. Are you suggesting that I manually make up
> > a dot file with the information that I want?
>
> In theory you could do that. The dot file simply describes the
> graph in the text form: nodes and edges (i.e. lines connecting
> the nodes). Then the dot program would lay out the graph based
> on that description. Depending on the size of your report
> editing dot file manually could be easy or hard.

Tony, for small amounts of data that should be quite feasible as GraphViz
is so easy to use.  Easiest would be to do something like:
---- file.dot -----------
digraph relations {
  "Person 1" -> "Person 2";
  "Person 2" -> "Person 3";
}
----------------------
And then run "dot -Tps file.dot > file.ps".

But as giving the label as identifier for each node gets pretty annoying
if one needs to refer to same person multiple times, it's better to use
identifiers:
--------------
digraph relations {
  id1 [label="Person 1"];
  id2 [label="Person 2"];
  id3 [label="Person 3"];
  id1 -> id2;
  id2 -> id3;
}
-----------------

To setup things like colors etc., you can either give them at the beginning
of the digraph for defaults like this:
  node [color="red"];
  edge [style="solid"];
But you can also override them per node or edge:
  id2 [label="Person 2" color="blue"];
  id2 -> id3 [style="dotted"];

For other options, see the "node attributes" and "edge attribures" sections
from the "man dot" command.


> > Where can I go for some more information on setting up a dot file to
> > produce the output that I want. As it is a descendant graph that in
> > this case I am after, are there examples where this has been done
> > through Graphviz producing something similar to the Gramps Descendant
> > Graph that I could copy?
>
> I was thinking that maybe you can start with the dot file produced
> by gramps, and then tweak it to your liking. I am fairly clueless
> about the magic of graphviz or what it takes to get a certain graph,
> sorry :-(  Maybe Julio or Eero can offer some pointers?
>
> > Incidentally, I noted that the children in a Relationship Graph are
> > plotted in a random order, maybe to fit them in?
>
> I am not sure. I remember Julio saying that the layout of the graph
> does depend on the order in which the nodes are listed in the dot
> file, so simply swapping nodes in the dot file may alter the layout.
> However, I suspect this dependence is not straightforward and also
> heavily depends on the rest of the graph.

One can force GraphViz to respect the ordering of nodes in the
description file:
       ordering=out constrains order of out-edges in  a  subgraph
       according to their file sequence.
But Julio mentioned that this can produce sub-optimal output,
GraphViz is pretty good at ordering the graphs by itself.


> Sorry, I'm afraid I cannot
> be of much more help here. If you want to find this out, maybe a
> good idea would be to ask graphviz people?
>
> We're simply dumping the nodes and the edges into dot file and then
> leave things to graphviz. Laying out complex graphs is a science on
> its own, we're not messing up with it :-)

My hope is that I can eventually massage the GraphViz code should that
I first collect the information, sort it and then output it as sorted.

However, the "show families as nodes" option makes it quite a bit harder,
because I would need to collect different data structures depending on this
option.  Maybe the "best" option would be to just have both two separate
sets of methods for collecting the data, sorting it and outputting it. :-/


        - Eero


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Descendant Graph Query

Tony Gordon
On Mon, 2006-02-06 at 20:20 +0200, Eero Tamminen wrote:

> Hi,
>
> On Monday 06 February 2006 09:33, Alex Roitman wrote:
> > > I have Graphviz installed. I have looked at the Relationship Graph
> > > under Graphical Reports and also under Code Generators. In the latter
> > > case I have looked at the dot file produced. I have been to the
> > > Graphviz web site and looked at the man page for dot. All a bit
> > > daunting really!
> > >
> > > I am not sure how to get the information I want into the dot file (e.g.
> > > the information I mentioned above) - there are not many additional
> > > options available in Gramps. Are you suggesting that I manually make up
> > > a dot file with the information that I want?
> >
> > In theory you could do that. The dot file simply describes the
> > graph in the text form: nodes and edges (i.e. lines connecting
> > the nodes). Then the dot program would lay out the graph based
> > on that description. Depending on the size of your report
> > editing dot file manually could be easy or hard.
>
> Tony, for small amounts of data that should be quite feasible as GraphViz
> is so easy to use.  Easiest would be to do something like:
> ---- file.dot -----------
> digraph relations {
>   "Person 1" -> "Person 2";
>   "Person 2" -> "Person 3";
> }
> ----------------------
> And then run "dot -Tps file.dot > file.ps".
>
> But as giving the label as identifier for each node gets pretty annoying
> if one needs to refer to same person multiple times, it's better to use
> identifiers:
> --------------
> digraph relations {
>   id1 [label="Person 1"];
>   id2 [label="Person 2"];
>   id3 [label="Person 3"];
>   id1 -> id2;
>   id2 -> id3;
> }
> -----------------
>
> To setup things like colors etc., you can either give them at the beginning
> of the digraph for defaults like this:
>   node [color="red"];
>   edge [style="solid"];
> But you can also override them per node or edge:
>   id2 [label="Person 2" color="blue"];
>   id2 -> id3 [style="dotted"];
>
> For other options, see the "node attributes" and "edge attribures" sections
> from the "man dot" command.
>
>
> > > Where can I go for some more information on setting up a dot file to
> > > produce the output that I want. As it is a descendant graph that in
> > > this case I am after, are there examples where this has been done
> > > through Graphviz producing something similar to the Gramps Descendant
> > > Graph that I could copy?
> >
> > I was thinking that maybe you can start with the dot file produced
> > by gramps, and then tweak it to your liking. I am fairly clueless
> > about the magic of graphviz or what it takes to get a certain graph,
> > sorry :-(  Maybe Julio or Eero can offer some pointers?
> >
> > > Incidentally, I noted that the children in a Relationship Graph are
> > > plotted in a random order, maybe to fit them in?
> >
> > I am not sure. I remember Julio saying that the layout of the graph
> > does depend on the order in which the nodes are listed in the dot
> > file, so simply swapping nodes in the dot file may alter the layout.
> > However, I suspect this dependence is not straightforward and also
> > heavily depends on the rest of the graph.
>
> One can force GraphViz to respect the ordering of nodes in the
> description file:
>        ordering=out constrains order of out-edges in  a  subgraph
>        according to their file sequence.
> But Julio mentioned that this can produce sub-optimal output,
> GraphViz is pretty good at ordering the graphs by itself.
>
>
> > Sorry, I'm afraid I cannot
> > be of much more help here. If you want to find this out, maybe a
> > good idea would be to ask graphviz people?
> >
> > We're simply dumping the nodes and the edges into dot file and then
> > leave things to graphviz. Laying out complex graphs is a science on
> > its own, we're not messing up with it :-)
>
> My hope is that I can eventually massage the GraphViz code should that
> I first collect the information, sort it and then output it as sorted.
>
> However, the "show families as nodes" option makes it quite a bit harder,
> because I would need to collect different data structures depending on this
> option.  Maybe the "best" option would be to just have both two separate
> sets of methods for collecting the data, sorting it and outputting it. :-/
>
>
> - Eero

Thank you Alex and Eero for your replies. I am not so daunted by the
Graphviz option that I may not give it a go sometime. But it will be
time consuming if I want to do it for a number of different ancestors
and want to add additional information. It would be a lot easier if I
could do what I want (a descendant graph that identifies the two wives
in a family and separately identifies the two 'families') through a
'standard' option in Gramps. I am sure that there are many people who
have similar families in their trees.

I am not sure if this is the right place to ask for items to be included
in a wish list. I am not a programmer and I do not know what would be
involved, but it would be good to be able to name a second spouse (add a
new substitution value?) and to separately identify their children in a
descendant graph.

Tony



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Descendant Graph Query

Eero Tamminen-3
Hi,

On Tuesday 07 February 2006 10:41, Tony G wrote:

> Thank you Alex and Eero for your replies. I am not so daunted by the
> Graphviz option that I may not give it a go sometime. But it will be
> time consuming if I want to do it for a number of different ancestors
> and want to add additional information. It would be a lot easier if I
> could do what I want (a descendant graph that identifies the two wives
> in a family and separately identifies the two 'families') through a
> 'standard' option in Gramps. I am sure that there are many people who
> have similar families in their trees.
>
> I am not sure if this is the right place to ask for items to be included
> in a wish list. I am not a programmer and I do not know what would be
> involved, but it would be good to be able to name a second spouse (add a
> new substitution value?) and to separately identify their children in a
> descendant graph.

I'm not completely sure what would be required (I'm not using Gramps that
much myself, I'm more of a supporting it to a relative :-)), but I guess
what you're asking for is not just filter rules to get the right people to
the report?


        - Eero


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Descendant Graph Query

Tony Gordon
Eero

On Wed, 2006-02-08 at 00:11 +0200, Eero Tamminen wrote:

> Hi,
>
> On Tuesday 07 February 2006 10:41, Tony G wrote:
> > Thank you Alex and Eero for your replies. I am not so daunted by the
> > Graphviz option that I may not give it a go sometime. But it will be
> > time consuming if I want to do it for a number of different ancestors
> > and want to add additional information. It would be a lot easier if I
> > could do what I want (a descendant graph that identifies the two wives
> > in a family and separately identifies the two 'families') through a
> > 'standard' option in Gramps. I am sure that there are many people who
> > have similar families in their trees.
> >
> > I am not sure if this is the right place to ask for items to be included
> > in a wish list. I am not a programmer and I do not know what would be
> > involved, but it would be good to be able to name a second spouse (add a
> > new substitution value?) and to separately identify their children in a
> > descendant graph.
>
> I'm not completely sure what would be required (I'm not using Gramps that
> much myself, I'm more of a supporting it to a relative :-)), but I guess
> what you're asking for is not just filter rules to get the right people to
> the report?
>
>
> - Eero

Apologies for the late reply. I am a new user of Gramps and have just
recently begun putting information into my first database. I have had to
read up about filters and my understanding of them is that they
effectively reduce the amount of data visible (by filtering from sight
what is not wanted). This is the opposite of what I am trying to do; I
want to show 'more' data than currently shows in the report. I want to
show the second family of a descendant so I can identify that the
children of the second wife are not those of the spouse that shows.

I realise that I could 'overcome' my problem by not showing any spouses
but I know that some of the family members to whom I would like to
'report' would like to see them.

Meanwhile I am continuing to input data. :)

Tony



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Descendant Graph Query

Eero Tamminen-3
Hi,

On Tuesday 14 February 2006 10:32, Tony G wrote:

> > I'm not completely sure what would be required (I'm not using Gramps
> > that much myself, I'm more of a supporting it to a relative :-)), but I
> > guess what you're asking for is not just filter rules to get the right
> > people to the report?
>
> Apologies for the late reply. I am a new user of Gramps and have just
> recently begun putting information into my first database. I have had to
> read up about filters and my understanding of them is that they
> effectively reduce the amount of data visible (by filtering from sight
> what is not wanted). This is the opposite of what I am trying to do; I
> want to show 'more' data than currently shows in the report.

Well, if the number of people is less than all the people you have
in the database, then the filters should be the way to select them.
You can combine the filters with and, or etc. operations e.g. by
creating another filter that includes results of other filters.

For several of the reports you can give one of your own custom
filters as the filter, I'm not sure whether all reports show all of the
people matched by the filter though...  Alex?


> I want to
> show the second family of a descendant so I can identify that the
> children of the second wife are not those of the spouse that shows.
>
> I realise that I could 'overcome' my problem by not showing any spouses
> but I know that some of the family members to whom I would like to
> 'report' would like to see them.
>
> Meanwhile I am continuing to input data. :)


        - Eero


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: Descendant Graph Query

Alex Roitman
On Tue, 2006-02-14 at 21:04 +0200, Eero Tamminen wrote:

> > Apologies for the late reply. I am a new user of Gramps and have just
> > recently begun putting information into my first database. I have had to
> > read up about filters and my understanding of them is that they
> > effectively reduce the amount of data visible (by filtering from sight
> > what is not wanted). This is the opposite of what I am trying to do; I
> > want to show 'more' data than currently shows in the report.
>
> Well, if the number of people is less than all the people you have
> in the database, then the filters should be the way to select them.
> You can combine the filters with and, or etc. operations e.g. by
> creating another filter that includes results of other filters.
>
> For several of the reports you can give one of your own custom
> filters as the filter, I'm not sure whether all reports show all of the
> people matched by the filter though...  Alex?
Yes, for several reports you can use filters to specify which people
you want to include. However, for descendant or ancestor reports
the filter is not available -- the scope is given by start person
and the ancestral/descendant tree.

So for Tony's problem we would need to change the report to
include other spouses not currently shown.

Alex

--
Alexander Roitman   http://www.gramps-project.org

signature.asc (196 bytes) Download Attachment