please look into the uploaded homework document and Please include the Cypher statements that you use to upload the CSV file into the Neo4j Desktop. Ând Place them at the top of your Python file and comment them out. Please download the MS Word file which contains the Homework instructions
CSC790_HW1
Encoding and traversing (through Python) the Neo4J network – a directed ascyclic graph (DAG) as shown below:
In this DAG, the definitions of the arrows (from parent to child) called relationships
· The black circle is a relationship called Mandatory
· The white circle is a relationship called Optional
· The white triangle grouping couple of children is a relationship called alternative (only one)
· The black triangle grouping couple of children is a relationship called OR (one to many)
· Consider the requires relationship as parent-child. Ex: Polygonize is the parent of OGR and the relationship between them is called Requires
Example: for parent-child relationships:
· RasterVectorProcessing node is the parent of the library child and the relationship between them is called Mandatory
· The library node is the parent of children: GDAL (the relationship here is Mandatory) and OGR (the relationship here is Optional)
· The ReadingAlgorithm node is the parent of two children. The relationship between it and the two children (CustomBlock) and NativeBlock) is called OR
· The Polygonize node is the parent of four children. The relationship between it and the four children (DeleteEmptyPolygons), (Dissolve), (AreaCalc) and (AddFields) is called Alternative
And so on ….
Create a CSV which contain 3 columns. The first is the parent node, the second is the child node, and the third one is the relationship type (property of the relationship). You can name the property type of a relationship as you want (ex. rType) with the value like Optional, Mandatory and so on following the graph. The nodes have a property called name so that the names of the nodes are displayed inside them and shown in the graph.
Example of how to create the CSV file:
Parent
Child
Relationship
root
RasterVectorProcessing
Mandatory
Library
GDAL
Mandatory
Polygonize
OGR
Requires
Polygonize
AddFields
Alternative
Polygonize
Dissolve
Alternative
ReadingAlgorithm
NativeBlock
OR
ReadingAlgorithm
CustomBlock
OR
OutputFormat
PNG
Optional
And so on ….
Load the CSV file into Neo4j Desktop by doing research on how to import a CSV to the program.
Hint: don’t use the CREATE statement in Cypher since it will create duplicates nodes that have the same name. Use MERGE statement instead. The Cypher code in Neo4J Desktop command line to create this DAG consists of only 4 statements.
Use Python to traverse the DAG you created through the CSV file and return only the parents
even if there are duplicates names.
Submit the CSV file your created along with the Python file.
Don’t copy your code from another student, otherwise it will be considered as plagiarism.
Why Choose Us
- 100% non-plagiarized Papers
- 24/7 /365 Service Available
- Affordable Prices
- Any Paper, Urgency, and Subject
- Will complete your papers in 6 hours
- On-time Delivery
- Money-back and Privacy guarantees
- Unlimited Amendments upon request
- Satisfaction guarantee
How it Works
- Click on the “Place Order” tab at the top menu or “Order Now” icon at the bottom and a new page will appear with an order form to be filled.
- Fill in your paper’s requirements in the "PAPER DETAILS" section.
- Fill in your paper’s academic level, deadline, and the required number of pages from the drop-down menus.
- Click “CREATE ACCOUNT & SIGN IN” to enter your registration details and get an account with us for record-keeping and then, click on “PROCEED TO CHECKOUT” at the bottom of the page.
- From there, the payment sections will show, follow the guided payment process and your order will be available for our writing team to work on it.