Book Image

Neo4j Cookbook

By : Ankur goel, Ankur Goel
Book Image

Neo4j Cookbook

By: Ankur goel, Ankur Goel

Overview of this book

Table of Contents (17 chapters)
Neo4j Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Travel data modeling with Neo4j


Travel is the most happening and an evergreen field when it comes to start-ups. According to a study, nearly two-third of start-ups start operations in the travel field.

In this recipe, you will learn how to build a route-planning application using the open flight database.

Getting ready

Install the Neo4j graph database over the host machine using the recipe described in Chapter 1, Getting Started with Neo4j. This installation process will depend on your preference for your machine OS type.

For this recipe, we will use data from http://openflights.org/data.html. They have data each airport and of the routes between airports.

The list of cities will be obtained from GeoName data taken from http://download.geonames.org/export/dump/.

For this recipe, we have used cities15000.zip, which represents cities that have a population greater than 15,000.

How to do it...

Let's model this data to build a travel route planner:

City – [HAVE] – Airport[s]
Airport – [HAVE] – Flight...