exploring election results with neo4j
DESCRIPTION
Slides from the Lightning Talk I gave at NoSQL Matters 2014 in Cologne. Motivation and examples of the attempt to open the UK's previous election results.TRANSCRIPT
![Page 1: Exploring Election Results with Neo4J](https://reader033.vdocuments.net/reader033/viewer/2022052910/559bd7941a28ab49158b458b/html5/thumbnails/1.jpg)
E X P L O R I N G E L E C T I O N R E S U LT S W I T H N E O 4 J
N O S Q L M A T T E R S 2 0 1 4 : L I G H T N I N G TA L K
![Page 2: Exploring Election Results with Neo4J](https://reader033.vdocuments.net/reader033/viewer/2022052910/559bd7941a28ab49158b458b/html5/thumbnails/2.jpg)
W H O A M I ?
• David Simons
• @SwamWithTurtles github.com/SwamWithTurtles
• Software Developer
• …for a bespoke solutions provider Softwire. (Hint: we’re currently hiring)
• … for fun
![Page 3: Exploring Election Results with Neo4J](https://reader033.vdocuments.net/reader033/viewer/2022052910/559bd7941a28ab49158b458b/html5/thumbnails/3.jpg)
![Page 4: Exploring Election Results with Neo4J](https://reader033.vdocuments.net/reader033/viewer/2022052910/559bd7941a28ab49158b458b/html5/thumbnails/4.jpg)
N O O P E N D ATA F O R U K E L E C T I O N S R E S U LT S
T H E P R O B L E M
![Page 5: Exploring Election Results with Neo4J](https://reader033.vdocuments.net/reader033/viewer/2022052910/559bd7941a28ab49158b458b/html5/thumbnails/5.jpg)
A C A D E M I C W E B S I T E
C O N TA I N I N G B A D LY
F O R M AT T E D D ATA
D ATA S C R A P E R ( P Y T H O N )
N E O 4 J !!
R E S T A P I E N D P O I N T ( C L O J U R E )
![Page 6: Exploring Election Results with Neo4J](https://reader033.vdocuments.net/reader033/viewer/2022052910/559bd7941a28ab49158b458b/html5/thumbnails/6.jpg)
W H Y C L O J U R E ?
• Tim dared me to.
![Page 7: Exploring Election Results with Neo4J](https://reader033.vdocuments.net/reader033/viewer/2022052910/559bd7941a28ab49158b458b/html5/thumbnails/7.jpg)
W H Y C L O J U R E ?
• But in retrospect…
• Good native library support:
• Leiningen
• Ring (for HTTP/REST) Neocons (for Neo4J)Incanter (for Stats)
![Page 8: Exploring Election Results with Neo4J](https://reader033.vdocuments.net/reader033/viewer/2022052910/559bd7941a28ab49158b458b/html5/thumbnails/8.jpg)
W H Y N E O 4 J ?
• “Whiteboardability”
• Good framework support for a range of languages
• Closely matches our model
• Intuitive “Cypher” Query Language to do graph based queries
![Page 9: Exploring Election Results with Neo4J](https://reader033.vdocuments.net/reader033/viewer/2022052910/559bd7941a28ab49158b458b/html5/thumbnails/9.jpg)
L E T ’ S S E E I T I N A C T I O N
![Page 10: Exploring Election Results with Neo4J](https://reader033.vdocuments.net/reader033/viewer/2022052910/559bd7941a28ab49158b458b/html5/thumbnails/10.jpg)
Small subgraph visualised
![Page 11: Exploring Election Results with Neo4J](https://reader033.vdocuments.net/reader033/viewer/2022052910/559bd7941a28ab49158b458b/html5/thumbnails/11.jpg)
Results of 2010 General Election
![Page 12: Exploring Election Results with Neo4J](https://reader033.vdocuments.net/reader033/viewer/2022052910/559bd7941a28ab49158b458b/html5/thumbnails/12.jpg)
Has anyone ever got no votes? (Sorry Mr. Gallagher)
![Page 13: Exploring Election Results with Neo4J](https://reader033.vdocuments.net/reader033/viewer/2022052910/559bd7941a28ab49158b458b/html5/thumbnails/13.jpg)
N E O 4 J I S A W E S O M E F O R Q U I C K D E V W O R K
![Page 14: Exploring Election Results with Neo4J](https://reader033.vdocuments.net/reader033/viewer/2022052910/559bd7941a28ab49158b458b/html5/thumbnails/14.jpg)
T H A N K S !
David [email protected]@SwamWithTurtlesGithub: SwamWithTurtles
!
Code:(Warning: not yet in stable/workable version!) github.com/pimterry/ national-hack-the- government-2014