Harshpatel44 / Marine-animals-vizualization

This is a project in which we scrapped marine animals data from a website and then vizualized using neo4j database and created relationships to understand it better.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Marine-animals-vizualization

This is a project in which we scrapped marine animals data from a website and then vizualized using neo4j database and created relationships to understand it better.

Neo4j commands to manipulate data and create relationships

1. Remove duplicates

MATCH (n:feed_habits) WITH n.Feeding_Habits AS habit, collect(n) AS DUPLICATES WHERE size(duplicates) > 1 FOREACH (n in tail(duplicates) | DELETE n)


2. Connect all the marine animals using "habitat" ecosystem edge

MATCH (n:Marine),(m:Marine) WHERE NOT m=n and n.Habitat=m.Habitat CREATE (m)-[r:neighbor]->(n) RETURN r


3. Connect all marine animals to feeding habits with an edge

MATCH (m:Marine),(f:feed_habits) WHERE m.feed_habits=f.feed_habits CREATE (m)-[r:Identical_Feeding_Habits_]->(f) RETURN r


4. Show the animals which are endangered

There are 2 commands that does this thing.
1. MATCH (n) WHERE n.ConservationStatus contains 'Endangered' RETURN n
2. MATCH (m:Marine),(n:feed_habits) WHERE m.ConservationStatus contains 'Endangered' and m.Feeding_Habits = n.Feeding_Habits RETURN m,n

About

This is a project in which we scrapped marine animals data from a website and then vizualized using neo4j database and created relationships to understand it better.


Languages

Language:Python 100.0%