Mapping a Family Network with Gephi

Author: Brian Tsz Ho WONG (t.h.wong-2@sms.ed.ac.uk)

This tutorial uses the Ho Tung family in early 20th-century Hong Kong to explain what Gephi is and how to interpret a Gephi network. No prior knowledge of Gephi is required, and no coding will be involved.

Completing this tutorial will enable you to:

Things to Do First

Download Gephi 0.10.1 to your own device. You can choose to download the Windows or Mac version.

You will also need a computer mouse to navigate Gephi graphs.

The Ho Tung Family

Sir Robert Ho Tung (1862-1956) and Ho Fook (1863-1926) are brothers, and Ho Kom-Tong (1866-1950) is their half-brother. Robert and Ho Fook are Eurasian (their father is Dutch and their mother is Chinese), while Ho Kom-Tong is Chinese. The Ho brothers were prominent figures in pre-WWII Hong Kong. Their families were known as the Ho Tung family.

In the late 19th century, as British companies expanded their businesses in Hong Kong, they needed someone who could speak both Chinese and English to act as their intermediary with the locals; this person was known as a compradore (maiban). After graduating from Queen’s College, the Ho brothers became compradores for British companies such as Jardine Matheson and the Hong Kong and Kowloon Wharf and Godown Company. They were later appointed by the colonial government as legislative councillors. They also established maternal links with other Eurasian families in Hong Kong, such as the Lo’s, the Zimmern’s, and the Wong Kam-fuk’s.

This tutorial uses the Ho Tung Family as an example to show Gephi’s applications in analysing historical social networks.

Gephi Datasets

In the ‘HoTungFamily.xlsx’ file, there are two spreadsheets: ‘Nodes’ and ‘Edges’:

The ‘Edges’ spreadsheet has four columns: ‘Source’, ‘Target’, ‘Weight’, and ‘Type’:

In this case, for example, we are researching the networks of the Ho family. The relationship between brothers is likely to be closer and more intimate than that between half-brothers. Therefore, the weight for a relationship between brothers will be 1, while the weight for a relationship between half-brothers will be 0.5.

There are two types of edge in Gephi: directed and undirected

For example, in a citation network, paper A is cited by paper B. Or in an ownership network, company A is invested in or owns shares in company B.

In our case, Robert Ho is the brother of Ho Fook, while Ho Fook is also a brother of Robert.

Now we can analyse the dataset in Gephi.

Analyse a Network in Gephi

Importing a Dataset into Gephi

  1. Open Gephi. Do not open the ‘HoTungFamily_Gephi.xlsx’ in Excel. If you have opened it, close it before opening Gephi.
  2. Click on ‘New Project’ and then go to ‘Data Laboratory’.
  3. Click on ‘Import Spreadsheet’, then select the ‘HoTungFamily_Gephi.xlsx’ and press ‘open’
  4. Import the ‘Nodes table’, then go to ‘Import spreadsheet’ and import the ‘Edges table’
  5. Select ‘BigDecimal’ for the ‘Weight’ column.
  6. Select ‘Undirected’ for the ‘Graph type’
  7. Select ‘Append to existing workplace’
  8. Go to ‘Overview’ and select ‘Yifan Hu’ for the layout. Click Run

Measuring and Visualising the Networks

  1. Go to ‘Statistics’.
  2. Run ‘Average degree’, ‘Avg. Weighted Degree’, ‘Network Diameter’, ‘Modularity’, and ‘Eigenvector Centrality’
  3. Go to ‘Data Laboratory’, and you will find statistics for several types of centrality measures, including degree (centrality), weighted degree, betweenness centrality, and eigenvector centrality
  4. Go back to ‘Overview’ then go to ‘Appearance’.
  5. Select ‘Node’, click the ‘Colour’ button, then select ‘Modularity Class’ under ‘Partition’
  6. Click on ‘Apply’

You will then notice that the network is made up of three main clusters, which are clearly the families of Robert Ho, Ho Fook and Ho Kom-Tong, respectively.

To show the name of the entities in the network:

  1. Click on the ‘Attributes’ button and select ‘EngName’.
  2. Click on the bold ‘T’ next to the ‘Attributes’ button to make the names of the entities pop up

You can export the visualisation as a graph file or take a screenshot using the ‘Take screenshot’ button. Remember to adjust the width and height in the ‘Screenshot settings’ menu to improve the picture’s resolution

Interpreting the networks

Here are brief definitions of some commonly used centrality measures. However, we should always be careful that the analysis is done in a historical context or against the background of other disciplines:

In this case, the three nodes with the highest betweenness centrality are Robert Ho, Ho Fook, and Ho Kom-Tong. This means that many of the other nodes have to pass through them in order to communicate with each other. The node with the fourth highest betweenness centrality is Ho Sai-wing, who is the son of Ho Fook and was later adopted by Robert Ho. Therefore, he is in a close relationship with Robert Ho and Ho Fook, as well as their descendants.

Next Step

If you are interested in using Gephi for your research, you can complete another CDCS tutorial, ‘Deciphering a Financial Network’, to learn how to prepare a Gephi dataset using Microsoft Excel and OpenRefine. The tutorial will also introduce you to the uses of Gephi beyond social network analysis and show you how to turn real-life financial data into a Gephi dataset.

Credits

About the author
Brian Tsz Ho Wong is a PhD student at the University of Edinburgh. His thesis examines the economic and financial mobilisation of the Japanese Empire during WWII. Nascent findings have recently been published in the Financial History Review. Outside of his PhD project, he is a Training Fellow at the University of Edinburgh’s Centre for Data, Culture and Society, where he has delivered courses on applying network analysis to humanities research. He is also a regular contributor to the Digital Orientalist and is a member of the Cold War Archival Research Institute.

Suggested citation: Tsz Ho Wong, “Mapping a Family Network with Gephi,” CDCS Tutorials, 2025

This resource’s data was extracted from:
Ho, Eric Peter. Tracing My Children’s Lineage. Hong Kong: The University of Hong Kong, 2010.

This resource is covered by a CC-BY-NC 4.0 license

Please help us keeping our tutorials up to date. If you find something that is not working email us at cdcs@ed.ac.uk