Biblical Genealogy Revisited – Genesis Complete

It’s been several months since I’ve done any genealogy updates and there is a good reason for that: broken tools. The software that I was using to render the images was increasing buggy as I was completing the work on Numbers. What’s more, there was no way to export to something else. So, I’ve had to start over.

But this time, I’m cooking up my own system based on publicly available tools and a decent amount of programming. If you are a geek, or at least interested in the deep innards of my brain, read on.

This time around, I’m taking a two-phase approach. No WYSIWYG editor for me! I started this project by building my own structured dictionary of sorts of biblical figures. I chose to include data that I was interested in for the charts, plus the ability to add comments and keep it flexible to add things later. I’m making up the format to be easy to parse; this isn’t a standard like XML.

Here’s what the first snippet of Genesis looks like:

## Genesis 1 – 5

God

Adam
ChildOf God
Genesis 2 3 4 5
Prot
GodSpeaks

Eve
ChildOf God
Genesis 2 3 4
Prot
GodSpeaks

Adam_Eve
Partners Adam Eve
Marriage

Cain
ChildOf Adam_Eve
Genesis 4
Prot
GodSpeaks

Abel
ChildOf Adam_Eve
Genesis 4
Prot

Enoch
ChildOf Cain
Genesis 4

Irad
ChildOf Enoch
Genesis 4

The order doesn’t matter. It’s a simple format, each block is separated by two carriage returns (nn). The first line is the name of the figure, subsequent lines are information about the figure in any order. The “ChildOf” lines describe the relationships of parents to children (and I have in my vocabulary “DescendedFrom” for indirect clan lines, etc.). The blocks that contain “Partners” describe a union of souls that produced children, and the system is smart enough that you can have children by several wives. Other data in there is just for things I may add to later. Want an image highlighting all the characters that God speaks to? You can do that. One that highlights all the “protagonists” that do more than begat? That, too. Not that I *have* done that yet, but it’s there for later.

From this data, I wrote a piece of custom software (in Perl) that converts my custom language into the DOT language for describing directional and non-directional graphs. (And I mean graphs in the CompSci meaning, not as bar charts.) This part isn’t ready for public consumption, but I plan on uploading it to GitHub in the future.

A DOT version of the beginning of Genesis is also fairly human-readable:

graph G { ranksep=1.5 nslimit=640000 nslimit1=640000
God

God — Adam

God — Eve

subgraph cluster_Adam{
Adam_Eve[label=””,height=.1,width=.1]
{rank=same
Adam — Adam_Eve — Eve
}
}

Adam_Eve — Cain

Adam_Eve — Abel

Cain — Enoch

Enoch — Irad

Irad — Mehujael

Mehujael — Methushael

Methushael — Lamech

Adah

There’s a bunch of background stuff that happens later in the DOT file (such as enforcing ranking constraints), but it’s that simple. Only the relationships (the subgraphs above) are particularly complex. I COULD have written directly in DOT, but the pre-processing that I am doing makes it very easy to make and test changes that would have involved modifying hundreds of lines of the DOT data. The easy stuff may be easy, but the hard stuff is a pain in the neck and having the pre-processing has made my life much easier.

With a DOT file in hand, I am using GraphViz’s “dot” renderer as the final step. This produces an image (and if I can get it worked out later, a clickable one) which I can embed here:

The output so far looks fairly similar to my Genesis graphs from before. I have re-run through the text and corrected a few flaws, but certainly added a number more. Red lines mean clan-based descent, blue lines mean regnal descent (lines of kings, of which there are only two here). Diamonds are clans, ovals are individuals. In the interests of speed, I am using an older JPS translation (so that I can cut and paste) rather than the new one in my reference bible. As a result, a few of the names are spelled differently.

As you can see from the above, it’s not perfect. GraphViz does a better job in making the lines easy to follow, which is a plus, but unnecessary line-crosses still happen and it is frequently difficult to tell to which partner a child is born to, because the marriage dots get separated from their spouses. I have confidence that I will be able to fix some of these problems in subsequent revisions.

With this in place, I should be back on track to finish up the rest of the Torah in a few weeks. Exodus through Deuteronomy have only a fraction of the number of generations as Genesis, but there is a lot more text to sift through to find it all. I also may reveal new bugs.

One thought on “Biblical Genealogy Revisited – Genesis Complete”

Leave a Reply

Your email address will not be published. Required fields are marked *