23 Mar CSC790 HW1 Encoding and traversing (through Python) the Neo4J network a directed ascyclic graph (DAG) as shown below: In this
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.
Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteEdu. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.
Do you need help with this question?
Get assignment help from WriteEdu.com Paper Writing Website and forget about your problems.
WriteEdu provides custom & cheap essay writing 100% original, plagiarism free essays, assignments & dissertations.
With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Chat with us today! We are always waiting to answer all your questions.