- 作业标题: APAN 5400 - Assignment 6 Graph Databases - Neo4j
- 课程名称:C-lumbia University APAN 5400 Managing Data
- 完成周期:3天
In this assignment, you will create a Neo4j Graph Database, populate nodes and relationships between them, and run retrieval queries against the data stored in your graph.
Details
Step 1 - Download and install Neo4j Desktop, Set up your project database
Refer to our Neo4j Installation Guide
Step 2 - Populate your Graph Database
Refer to Week 7 Class Exercise & Neo4j Cypher Manual (Links to an external site.).
- Create a new Jupyter Notebook and complete the following steps in that notebook
- !pip install neo4j package
- import data from the companies.csv file or populate it from the records table below
- establish node relationships that may be necessary to answer the questions in Step 3
- Note: you can also populate and visualize the nodes and relations using Cypher commands from inside Neo4j Desktop
Step 3 - Build and run Python Cypher queries against the Neo4j Database to answer the following questions:
- Which companies are located in the state (not city) of Tokyo (via 2nd degree relation)?
- Which companies have been founded in the 1990s? (i.e., Between 1990 and 1999)
- What is the average number of employees for all companies in China and the USA in the graph? (via 3rd degree relation) (Use aggregate queries)
- Which companies are headquartered in the USA (via 3rd degree relation)?
- What is the total annual revenue of the companies in USA (via 3rd degree relation)?
Assessment
See the attached rubric for detailed assessment criteria.
Submission
Your final submission should be a Jupyter Notebook file (.ipynb and .html) that shows the use of a Neo4j graph database and neo4j queries for questions 1-5 (step 3) with the retrieved and printed output.
- Click the blue Submit Assignment button at the top of this page.
- Click the Choose File button, and locate your submission.
- Feel free to include a comment with your submission.
- Finally, click the blue Submit Assignment button.Assessment
。。。