ikwattro / twitter-network-analysis

Analyzing a network of tweets and retweets using graph algorithms

Home Page:http://memgraph.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🔍 Twitter Network Analytics Demo 🔍

license build

Follow @memgraphdb Discord

A web application with backend in Flask and frontend in React and D3.js that uses Memgraph to ingest real-time data scraped from Twitter. Data is streamed via Kafka and stream processing is performed with Memgraph.

App architecture

memgraph-tutorial-twitter-app-architecture

Data model

memgraph-tutorial-twitter-pagerank-graph-schema

Prerequisites

You will need:

Running the app

With a bash script

You can start everything but frontend by running the bash script:

bash run_docker.sh

After that, in other window run the frontend app with:

docker-compose up frontend-app

Manually using Docker Compose

If you want to start the app without using the bash script, then:

1. Remove possibly running containers:

docker-compose rm -fs

2. Build all the needed images:

docker-compose build

3. Start the Kafka, Zookeeper and Memgraph MAGE services:

docker-compose up -d core

4. Start the data stream:

docker-compose up -d stream

5. Start the backend application:

docker-compose up backend-app

6. Start the frontend application in new terminal window:

docker-compose up frontend-app

The React application will be running on http://localhost:3000.

Choose the visualization

In the dropdown, select the algorithm you want to check out, and click on the 'Select algorithm' button.

Default algorithm is Community detection:

memgraph-tutorial-community-detection

The other algoritm is PageRank:

memgraph-tutorial-pagerank-stream

About

Analyzing a network of tweets and retweets using graph algorithms

http://memgraph.com/

License:MIT License


Languages

Language:JavaScript 51.8%Language:Python 35.2%Language:HTML 6.4%Language:Dockerfile 3.9%Language:CSS 2.1%Language:Shell 0.5%