Your SlideShare is downloading. ×
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
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
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Using Clojure to Marry Neo4j and Open Democracy

270

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.

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
270
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
1
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

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

×