Skip to content

neo4j-graph-examples/twitter-v2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

twitter

Twitter Graph Example

Description: Explore a social network with Neo4j’s Twitter data

model
Figure 1. Model
example
Figure 2. Example
Example Query:
MATCH (u:User {screen_name: $screenName})<-[r:MENTIONS]-(t:Tweet)-[r2:TAGS]->(h:Hashtag)
RETURN h.name as hashtag

Setup

This is for Neo4j version: 4.0

The database is also available on https://demo.neo4jlabs.com:7473

Username "twitter", password: "twitter", database: "twitter"

Rendered guide available via: :play https://guides.neo4j.com/sandbox/twitter/index.html

Load graph data via the following:

Dump file: data/twitter-40.dump

  • Drop the file into the Files section of a project in Neo4j Desktop. Then choose the option to Create new DBMS from dump option from the file options.

  • Use the neo4j-admin tool to load data from the command line with the command below.

bin/neo4j-admin load --from data/twitter-40.dump [--database "database"]

Code Examples

GraphQL API

See /graphql directory for Node.js GraphQL API server example using @neo4j/graphql

Feedback

Feel free to submit issues or pull requests for improvement on this repository.