Skip to content
jsthomasPublic

About

A CLI tool for making "family trees" from the Mathematics Genealogy Project.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mgptree

A CLI tool for making "family trees" from the Mathematics Genealogy Project.

What is this?

The Mathematics Genealogy Project records advisor-advisee relationships between mathematicians, going back hundreds of years. mgptree allows you to plot these relationships to produce a directed graph, similar to a family tree. You can see an extended example here.

Install

This tool uses Python 3.7.3. You will need to install graphviz, and possibly virtualenv as well (depending on where you prefer to install your python libraries). Here is how I set up:

$ virtualenv venv
$ venv/bin/activate
(venv) $ pip install -r requirements.txt
(venv) $ python mgptree.py -h

This should show you the command line syntax for the tool.

Usage

This tool has two modes, "scraping" and "plotting". In scraping mode, you specify an input list of names and a number of "generations" to search backward starting from those names (10-20 is a reasonable depth). A typical input file looks like:

Gauß, Carl, Friedrich
Fourier, Jean-Baptiste, Joseph

(In terms of formatting, the program expects one name per line, ordered last, first, middle, where the middle name is optional.)

Scraping produces a pickled python object file of records about different mathematicians. In plotting mode, the tool takes this file as input and a number of generations, and produces a dotfile for that many generations back from the roots (your original names). Scraping is typically more time consuming than plotting. Specifying the number of generations during plotting lets you see more or less of your dataset, without having to do an expensive re-scrape.

Example Session

Let's build a tree for Alan Turing.

echo "Turing, Alan, Mathison" > names.txt
python mgptree.py --scrape --generations 10 --input names.txt --output turing.mgp
python mgptree.py --plot --generations 10 --input turing.mgp --output turing.dot
dot -Tpng turing.dot -o turing.png

If all went well, turing.png should look like this:

A picture of Turing's advisor tree.

About

A CLI tool for making "family trees" from the Mathematics Genealogy Project.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages