Your SlideShare is downloading. ×
0
Election Results
with Neo4j
Who am I?
• David Simons
• @SwamWithTurtles
• Software Developer
• … for a bespoke solutions provider
Softwire (hint: we’r...
ACADEMIC
WEBSITE
CONTAINING
POORLY
FORMATTED DATA
DATA
SCRAPER
(PYTHON)
NEO4J
REST ENDPOINT
(CLOJURE)
ring-clojure
(let [env (str (get (System/getenv) "GRAPHENEDB_URL") "/db/data")]
(defn connection-string [] (nr/connect! env)))
(defn ru...
(defn wardResults [year, areaId] (run-query (
"MATCH (pa:party)<-[member_of]-
(p:politician)-[r:stood_in]->
(e:election)-[...
github.com/pimterry/
national-hack-the-government-2014/
Thanks!
David Simons
david.simons@softwire.com
@SwamWithTurtles
github.com/SwamWithTurtles
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
Using Clojure to Marry Neo4j and Open Democracy
Using Clojure to Marry Neo4j and Open Democracy
Using Clojure to Marry Neo4j and Open Democracy
Upcoming SlideShare
Loading in...5
×

Using Clojure to Marry Neo4j and Open Democracy

309

Published on

A more technologically in-depth look at how we can use Clojure and Neocons to integrate with Neo4j and increase transparency in UK politics.

Published in: Technology, News & Politics
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
309
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
1
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "Using Clojure to Marry Neo4j and Open Democracy"

  1. 1. Election Results with Neo4j
  2. 2. Who am I? • David Simons • @SwamWithTurtles • Software Developer • … for a bespoke solutions provider Softwire (hint: we’re recruiting) • … for fun
  3. 3. ACADEMIC WEBSITE CONTAINING POORLY FORMATTED DATA DATA SCRAPER (PYTHON) NEO4J REST ENDPOINT (CLOJURE)
  4. 4. ring-clojure
  5. 5. (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) )
  6. 6. (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")))
  7. 7. github.com/pimterry/ national-hack-the-government-2014/
  8. 8. Thanks! David Simons david.simons@softwire.com @SwamWithTurtles github.com/SwamWithTurtles
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×