Tuesday, February 13, 2018

Visualizing Shared Events in Your Tree

When I conduct collateral research, I like to add neighbors, friends, and possible relatives directly to my family file, linking them together using shared events. This increases the chance that I will accidentally happen across a family member, while also giving me an idea of their stance within the community. I decided to figure out how to display shared events in a way that I could see all the connections I'd established for a person with a single click. I found a completely free solution and will explain in the rest of this post what that solution was. These network graphs were the result of my efforts.
Network graph of all the people in my file based on their shared events

Filtered view within the network graph of just one person in my file and their connections
And here is an interactive version of my graph:


Before I get any farther I will explain what you need for the rest of this tutorial. It should be noted that I only tested this out on a file made using Legacy Family Tree. From my investigation into how other genealogy software works, however, I can tell you for sure that it will work with:
And probably most other software. If you are more technically minded, the only thing required of your file is that the gedcom use '_SHAR' tags for shared events. If you don't know what I'm talking about then don't worry, you don't need to.

Here is a definitive list of every software, program, and file you will need:
  1. A Gedcom file that uses shared events (your family file)
  2. Excel (or another spreadsheet program)
  3. Access to the internet as we will be using Google's Fusion Tables to make the final graph
Right then, let's get started!

1: Download My program

I wrote a program to do most of the work for you. Just download it here. Once downloaded move the program to whatever folder your gedcom is in and double-click to run it.

2. Open Excel

This doesn't really need much explanation, just open it and make a new spreadsheet. I would save it as soon as you make it since excel can get hung up on occasion when working with a lot of data. Make sure you save it as a CSV file.

3. Copy the Contents of Output.txt

If you go to the folder your gedcom was in, you will notice there is a file called output.txt. Select everything inside and copy it.

4. Paste the Important Stuff

Go back to your excel document you made. The following instructions will show how you what to do in Excel 2016, however, if you are using a different version of excel you can still follow along. If you get stuck you can just look up what to do with your specific version of Excel.

Right then, in excel click on cell A2. (first row, 2nd column) Then go to the home tab. In the top left-hand corner of the screen, you will see a paste button with a little arrow at the bottom. Click the arrow, then click 'use text import wizard'.
The Use Text Import Wizard
If you don't use text import wizard as an option, just copy the data from before again and see if it turns up.

A new window will pop up with a bunch of stuff. Just click 'next'.
When the first window pops up simply click next

When step 2 pops up all you have to do is uncheck 'space' and check 'comma'. Then click 'next'.
Check Comma in step 2
When step 3 pops up just click 'finish'.

You should end up with a spreadsheet that looks something like this:
The resulting spreadsheet
Earlier we left the top row blank. We will fill this row with our headers identifying row one from row two. I will name my two rows 'person 1' and 'person 2'. 

Finally, save the file.

5. Import Your Spreadsheet into Google Fusion Tables

Now here is where the really cool part starts. First go to this link. This is the import screen for google fusion tables.Click choose file and select your spreadsheet from earlier. Then just keep clicking next until you are brought to your main table.

Once there you will see the spreadsheet view is arranged with tabs at the top. Click the plus sign by these tabs to add a new chart view.
Click the plus sign then click "add chart"
You will be brought to a new network graph. What the graph shows, specifically, is all the links made between people in your file by shared events. If 2 people share an event, then a line will be drawn between them. If 3 people share an event then 3 lines will be drawn connecting each one to the others.

At this point it is important to mention that this graph saves itself. You will be able to find it again by going to your google drive and opening it.

Using Your Network Graph

So now that you have the graph I'll bet you want to know how to use it.

Adjust the Number of Visible Nodes

A node is a circle that represents each person. You will most likely find that not all of the people in your spreadsheet are shown at first in your network graph. You can change that by adjusting the number of nodes to the maximum amount as shown:
Increase the number of nodes shown

Filter By Person

You can also choose to show only connections to certain people. 

Simply click the filter button, choose which column you want to filter by, and your results will be shown accordingly.
The Filter button

Unfortunately, I couldn't find a way to filter so that you could show all a person's links whether they were in the person 1 column or person 2 column. As a result when you are looking for connections to a person you should filter first by person 1, then by person 2 so you can make sure you are looking at all the connections. You could even set up 2 views, one for filtering by the person 1 column and one for filtering by the person 2 column.

Final Thoughts

Hopefully, someone else will find this tutorial interesting or useful. Overall, Google Fusion Tables seems to be fairly versatile in its applications. In the future I think I will look more into the location mapper and other charts, as I can see those being useful as well.

15 comments:

  1. I've tried to follow the instructions using a gedcom created with RootsMagic, and I am unable to create an output file that has anything to copy in it. exe flashes and creates file, but no data.

    ReplyDelete
    Replies
    1. I was hoping someone would test it out with other programs! thanks for trying I'll bet we can figure it out. I've just got a couple questions:

      1. Are you using shared events? here is a good video: https://www.youtube.com/watch?v=6q7aQi8OGLE

      2. Also what operating system are you using? There is one line of code that is sort of unnecessary I meant to take out that could possibly create problems for non windows devices.

      Again thanks for taking the time to let me know!

      Delete
    2. Windows 7, and I've never really used the shared events, so that may be a difference in the file function I am going to go through and start working events for the people in my GEDCOM. Will let you know the results.

      Delete
    3. I added a few quick facts to the file, saved as another gedcom, but didn't get any different results in the output file.

      Delete
    4. Thanks for the update! Would you mind possibly sending me the file (or even just the portion that has a shared event or two, even a sample file with false names) to my email? (rjs2018@gmail.com) That way I can look inside and do some testing and see if I can figure out whats wrong. It may be as simple as the share tags being different in which case I'll roll out a specific rootsmagic version of the program.

      Delete
    5. I got it to work with a newly created file, so it's something to do with my gedcom, I think. I'll keep trying to work with that...

      Delete
    6. Glad to hear it! If you do notice that it stops working again let me know and I'll check it out.

      Delete
  2. Renee -

    I've just tried your program with GEDCOMs produced by Family Tree Maker 2017 and with Ancestry. Both produce an empty output.txt file.

    I have shared events, if by that you mean such things a Marriage, but neither GEDCOM has any _SHAR tags in it.

    Any suggestions?

    ReplyDelete
    Replies
    1. I got this output:

      What is the name of your gedcom file?(ex. YourGedcomFile)"James Clower Simpson Family 2018-02-18 FTM.ged"
      Traceback (most recent call last):
      File "gedcom_mapper.py", line 81, in
      indi_num, indi_name = indi_number_list(filename)
      File "gedcom_mapper.py", line 17, in indi_number_list
      with open(filename, 'r') as the_file:
      OSError: [Errno 22] Invalid argument: '\x16"James Clower Simpson Family 2018-02-18 FTM.ged".ged'
      Failed to execute script gedcom_mapper

      I thought the spaces in the filename might be a problem, so I renamed the file to "Test.ged" and got the same traceback output.

      Delete
    2. OK. Spaces don't work, quotations marks don't work, and the ".ged" can't be included in the filename since it's assumed. So using just "Test" as the response, I get this traceback:

      What is the name of your gedcom file?(ex. YourGedcomFile)Test
      Traceback (most recent call last):
      File "gedcom_mapper.py", line 81, in
      indi_num, indi_name = indi_number_list(filename)
      File "gedcom_mapper.py", line 21, in indi_number_list
      for line in the_file:
      File "C:\Users\Renee\AppData\Local\Programs\Python\Python35-32\lib\encodings\cp1252.py", line 23, in decode
      UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 5560: character maps to
      Failed to execute script gedcom_mapper

      Obviously I don't have a user named "Renee". I also don't have Python installed on my PC, but I do have gedcom_mapper.py in the same directory as the executable and the GEDCOM.

      I have cygwin installed, and I can install Python if necessary.

      Delete
    3. Thanks for checking it out! Marriages don't use _shar tags, they instead use marr tags. Since the end result is more for mapping out in person relationships, I didn't include tags that would denote a familial relationship such as marriages. Witnesses to marriages, however, would be included if in the genealogy program you made them use a shared event. Looking into it a bit more, I believe that FTM doesn't support shared events (see: https://www.ancestry.co.uk/boards/topics.software.famtreemaker/11157.1.1/mb.ashx )

      As far as the error goes, the reason why it is giving you that user location is, I believe, because of the way I compiled the files. I don't believe, however, that you would need to install python or anything like that. I think that the error should go away if, while in the file your gedcom is in, you hit the shift key while right clicking and click "open a new powershell window here". Then you can type:
      chcp 65001
      press enter
      and
      .\gedcom_mapper.exe
      and see if it works without error. I believe this is caused by the presence of special characters in your file, and perhaps this will fix it by setting the encoding to unicode in the window the program runs in.

      Delete
    4. Sorry for the odd formatting on that last message, not sure why it tabbed every word in one of the sentences haha!

      Delete
    5. Also I'll make note of the issue with the spaces. I believe I can fix it by automatically accounting for escapes in the filename. If I role out a newer version I will definitely fix that issue!

      Delete
  3. Having the same no output problem, changed the gedcom file name to be only 8 characters and tried to call it with and without the .ged. Either way the output file is empty. Have tons of shared events, especially census, am using Windows 10 and Legacy Family Tree both with latest builds.

    ReplyDelete
    Replies
    1. Hello,
      Unfortunately google fusion tables is a discontinued service. As a result I am no longer updating this particular program. It is possible that I will make a similar program again sometime in the future with similar functionality, but at the moment I don't have any plans to do so.

      Delete