Case Study in Travel Business - Understanding agent connections using NetworkX

Cheuk Ting Ho (~Cheukting)




When you make a search for a hotel room, do you know how many travel agents are searching for you at the same time? In this talk, we demonstrate how to use the millions of searches a sourcing company received to build a network of travel agents and finding the main hubs among them using NetworkX.

Network analysis is getting more and more attention in Business Intelligence, people hope to get information out of the structure of an organization or a communication network. In this talk, we use the hotel room search requests from travel agents, including online public website, B2C, B2B and B2B2C, to build a relational network among them. By using this network as an example, we demonstrate how insights can be extract by studying network properties.

In the first half of the talk, we will explain how the network is built using NetworkX, an open-source python library that is designed for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks. When 2 agents are making the same search at the same time , a link ( or an “edge” in network analysts terms) is made pointing form the initial searcher to the subsequent searcher. Using a list of these searches, a directed graph is built. We will also demonstrate how to pick the biggest connected component out form the graph. In the second half, with the graphs created, we show how different functions of NetworkX can be used to study the graphs. By compare the graph properties of our graph to the other popular network graphs, we can get the insight of how the network was created. Also by studying the graphs, we can understand the behavior of the agents and can even figure out which agents are acting as main hubs in the network.

This talk is for people who are interested in network analysis and would like to see how it can be used in a business case. Audiences with any level of python experience can learn some basic concept of network analysis work and how it can be applied to provide business insights.


None, it's a beginner friendly talk.

Content URLs:

The library shown in the talk is an open source library which is available on Github:

Slides (not finalized):

Speaker Info:

After spending 5 years doing research in theoretical physics at Hong Kong University of Science and Technology, Cheuk has transferred her analytical and logical skills in natural science and built a career in data science. Cheuk is now a Data Scientist in Hotelbeds Groups which is one of the biggest worldwide wholesaler in travel business.

Cheuk constantly contributes to the community by giving AI and deep learning workshops, volunteering at Datakind for charities. At the same time participate open source projects like Pandas, Gensim and Dateutil. Cheuk has also been a guest speaker at University of Oxford and Queen Mary University of London, and various conferences including PyData Amsterdam, PyCon Israel and PyLondinium. Believing in gender equality, Cheuk is currently a co-organizer of AI club for Gender Minorities to support Tech Diversity and Inclusion.

Section: Data science
Type: Talks
Target Audience: Beginner
Last Updated:

I believe there has been talks/workshops on networkx in PyCon before, so if you can talk about the graph side of it it would be great. However without a story, as in how you used this to solve a problem in your company a talk would be misplaced. If you are going to talk about networkx from end to end, a workshop is a better idea.

Anand B Pillai (~pythonhacker)

Login to add a new comment.