Sign inSign up

markhneedham/neo4j-3.1-trumpworld

By markhneedham

•Updated over 9 years ago

A docker image containing Buzzfeed's TrumpWorld dataset loaded into Neo4j.

Image
0

489

markhneedham/neo4j-3.1-trumpworld repository overview

This is a Neo4j docker image containing the Trump World dataset. See the blog post for more details - https://neo4j.com/blog/buzzfeed-trumpworld-dataset-neo4j/⁠

You can start a Neo4j container containing the Trump World dataset like this:

docker run --publish=7474:7474 --publish=7687:7687 markhneedham/neo4j-3.1-trumpworld

which allows you to access neo4j through your browser at http://localhost:7474⁠.

You can then run the following queries:

⁠Most connected Organizations

MATCH (o:Organization)-[r]-()
RETURN o.name, count(*), collect(distinct type(r)) AS types
ORDER BY count(*) DESC
LIMIT 5

⁠2nd degree Kushner Network

MATCH network = (:Person {name:"JARED KUSHNER"})-[*..2]-()
RETURN network

⁠Which Banks are involved with these Organizations and People

MATCH (bank:Organization)--(other)
WHERE bank.name contains "BANK"
RETURN *

⁠Putin & Trump

MATCH (vp:Person {name:"VLADIMIR PUTIN"}),(dt:Person {name:"DONALD J. TRUMP"})
MATCH path = allShortestPaths( (vp)-[*]-(dt) )
RETURN path

⁠Nominees of Trump's Cabinet

MATCH (p:Person)-[con:RELATED_TO]->()
WHERE con.connection CONTAINS "Nominee"
RETURN p.name, con.connection
ORDER BY split(p.name," ")[-1] DESC LIMIT 5;

⁠Nominee Influence

MATCH (o:Organization)<-[:INVOLVED_WITH]-(p:Person)-[con:RELATED_TO]->()
WHERE con.connection CONTAINS "Nominee"
RETURN o,p

⁠Transitive relationships - all of them

match (p1:Person), (p2:Person) where id(p1) < id(p2)
match p = shortestPath((p1)-[*]-(p2))
return p1,p2,length(p) order by length(p) desc limit 20

⁠Transitive relationships - pick 2

MATCH (p1:Person {name:"LEV LEVIEV"}), (p2:Person {name:"ROMA DOWNEY"})
MATCH path = allShortestPaths((p1)-[*]-(p2))
RETURN path

Tag summary

Content type

Image

Digest

Size

209 MB

Last updated

over 9 years ago

docker pull markhneedham/neo4j-3.1-trumpworld