Git Product home page Git Product logo

neo4j-hp-viz's Introduction

neo4j-hp-viz

This project is a demo application for network visualizations using the GRANDstack (GraphQL, React, Apollo, Neo4j Database) application. The dataset consists of characters and their interactions from the first Harry Potter book. If you want to learn more about how the dataset was created check out my blog post.

The GraphQL endpoint is using the Neo4j Graphql library. For the network visualizations, VisJS is being used. I have also added click events to network visualization to make it an interactive explorer of your graph data. Hopefully, this project will help you get started with implementing your own network visualizations with the GRANDstack.

Start the project with:

docker-compose up

Macbook M1 users

Pull arm neo4j image

docker pull neo4j/neo4j-arm64-experimental:4.2.11-arm6

Replace in docker-compose.yml

neo4j:
    image: neo4j/neo4j-arm64-experimental:4.2.11-arm64

Seed data

Run the following command

cat seed_data.cql | docker exec -i neo4j cypher-shell -u neo4j -p letmein

Or if you are on windows

Open Neo4j Browser at localhost:7474. Login using username "neo4j" and password "letmein". Execute the queries stored in the seed_data.cql

Graph schema

Graph consists of characters from the first Harry Potter book, their interactions, to which house they belong, and to which group they are loyal.

schema

UI components

Frontend consists of the following components:

Exploration

exploration
Figure 1. Exploration component

This components features an autocomplete function using a Full-Text index. Once you select a character, a small character subgraph is visualized. If you click on any other characters a popup will show. The popup has an option to expand relationships for a selected characters, giving it a bit of an interactivity.

Timeline

timeline
Figure 2. Timeline component

This component fetches all the interaction data from GraphQL. When you click on the start button, it then adds a new relationship every 200ms, giving it a dynamic network visualization. The relationships are ordered in the order they first appeared in the book, so in theory, you should see how relationships formed through time in the HP book.

Network visualization

network
Figure 3. Network component

This component visualizes a classic network analysis. Nodes are colored based on the community they belong to and their size is calculated by how central in the network they are (pagerank).

neo4j-hp-viz's People

Contributors

llermaly avatar tomasonjo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

neo4j-hp-viz's Issues

Fix Mac M1 here :)

Hello, first THANKS this project. I wasted many hours trying to figure out how to do this.

Second I have a Macbook pro M1 and I had troubles running the neo4j docker image.

FIX:

docker pull neo4j/neo4j-arm64-experimental:4.2.11-arm6

Then replace in docker-compose.yml

eo4j:
    image: neo4j/neo4j-arm64-experimental:4.2.11-arm64

Thanks again

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.