SlideShare a Scribd company logo
Election Results
with Neo4j
Who am I?
• David Simons
• @SwamWithTurtles
• Software Developer
• … for a bespoke solutions provider
Softwire (hint: we’re recruiting)
• … for fun
Using Clojure to Marry Neo4j and Open Democracy
ACADEMIC
WEBSITE
CONTAINING
POORLY
FORMATTED DATA
DATA
SCRAPER
(PYTHON)
NEO4J
REST ENDPOINT
(CLOJURE)
Using Clojure to Marry Neo4j and Open Democracy
Using Clojure to Marry Neo4j and Open Democracy
Using Clojure to Marry Neo4j and Open Democracy
Using Clojure to Marry Neo4j and Open Democracy
Using Clojure to Marry Neo4j and Open Democracy
ring-clojure
Using Clojure to Marry Neo4j and Open Democracy
Using Clojure to Marry Neo4j and Open Democracy
(let [env (str (get (System/getenv) "GRAPHENEDB_URL") "/db/data")]
(defn connection-string [] (nr/connect! env)))
(defn run-query [query]
(connection-string)
(cy/tquery query)
)
(defn wardResults [year, areaId] (run-query (
"MATCH (pa:party)<-[member_of]-
(p:politician)-[r:stood_in]->
(e:election)-[held_in]->(a:area),
(e:election)-[during]->(y:year)
WHERE y.name="" year "" AND id(a)=" areaId "
RETURN id(p), pa.name AS partyName, SUM(r.votes) AS numVotes")))
github.com/pimterry/
national-hack-the-government-2014/
Thanks!
David Simons
david.simons@softwire.com
@SwamWithTurtles
github.com/SwamWithTurtles

More Related Content

PPTX
Build Tools & Maven
PDF
Bristol Uni - Use Cases of NoSQL
PDF
Statistical Programming with JavaScript
PDF
Decoupled APIs through Microservices
PDF
Non-Functional Requirements
PDF
High quality Front-End
PDF
Exploring Election Results with Neo4J
PPTX
Bootstrapping Your Graph Project with Neo4j Data Importer and Browser.pptx
Build Tools & Maven
Bristol Uni - Use Cases of NoSQL
Statistical Programming with JavaScript
Decoupled APIs through Microservices
Non-Functional Requirements
High quality Front-End
Exploring Election Results with Neo4J
Bootstrapping Your Graph Project with Neo4j Data Importer and Browser.pptx

Similar to Using Clojure to Marry Neo4j and Open Democracy (10)

PDF
Congressional PageRank: Graph Analytics of US Congress With Neo4j
PDF
006 Bootstrapping Your Graph Project With Neo4j Workspace - NODES2022 AMERICA...
PPTX
Graph Databases for SQL Server Professionals
PDF
This Week in Neo4j - 27th October 2018
PDF
This Week in Neo4j - 19th May 2018
PDF
Government GraphTalk Canberra Interactive Whiteboard Session
PPTX
Neo4j GraphTour New York_Leveraging Graphs for AI_Neo4j
PDF
Government GraphSummit: Keynote - Graphs in Government
PDF
Extending the Stream/Table Duality into a Trinity, with Graphs (David Allen &...
PPTX
Graph Databases for SQL Server Professionals - SQLSaturday #350 Winnipeg
Congressional PageRank: Graph Analytics of US Congress With Neo4j
006 Bootstrapping Your Graph Project With Neo4j Workspace - NODES2022 AMERICA...
Graph Databases for SQL Server Professionals
This Week in Neo4j - 27th October 2018
This Week in Neo4j - 19th May 2018
Government GraphTalk Canberra Interactive Whiteboard Session
Neo4j GraphTour New York_Leveraging Graphs for AI_Neo4j
Government GraphSummit: Keynote - Graphs in Government
Extending the Stream/Table Duality into a Trinity, with Graphs (David Allen &...
Graph Databases for SQL Server Professionals - SQLSaturday #350 Winnipeg
Ad

More from David Simons (10)

PDF
Four Architectural Patterns
PDF
Data Modelling at Scale
PDF
Choosing the Right Database
PDF
Choosing the right database
PDF
Graph Modelling
PDF
Graph theory in Practise
PDF
Decoupled APIs through microservices
PDF
TDD: What is it good for?
PDF
Domain Driven Design: A Precis
PDF
10 d bs in 30 minutes
Four Architectural Patterns
Data Modelling at Scale
Choosing the Right Database
Choosing the right database
Graph Modelling
Graph theory in Practise
Decoupled APIs through microservices
TDD: What is it good for?
Domain Driven Design: A Precis
10 d bs in 30 minutes
Ad

Recently uploaded (20)

PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Empathic Computing: Creating Shared Understanding
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPT
Teaching material agriculture food technology
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
NewMind AI Monthly Chronicles - July 2025
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
cuic standard and advanced reporting.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Empathic Computing: Creating Shared Understanding
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Teaching material agriculture food technology
The AUB Centre for AI in Media Proposal.docx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
NewMind AI Monthly Chronicles - July 2025
Understanding_Digital_Forensics_Presentation.pptx
NewMind AI Weekly Chronicles - August'25 Week I
cuic standard and advanced reporting.pdf
MYSQL Presentation for SQL database connectivity
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
Reach Out and Touch Someone: Haptics and Empathic Computing
Per capita expenditure prediction using model stacking based on satellite ima...
“AI and Expert System Decision Support & Business Intelligence Systems”
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Digital-Transformation-Roadmap-for-Companies.pptx

Using Clojure to Marry Neo4j and Open Democracy