Using Clojure to Marry Neo4j and Open Democracy
Upcoming SlideShare
Loading in...5
×
 

Using Clojure to Marry Neo4j and Open Democracy

on

  • 183 views

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.

Statistics

Views

Total Views
183
Views on SlideShare
170
Embed Views
13

Actions

Likes
1
Downloads
0
Comments
0

2 Embeds 13

https://twitter.com 11
http://www.slideee.com 2

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Using Clojure to Marry Neo4j and Open Democracy Using Clojure to Marry Neo4j and Open Democracy Presentation Transcript

  • Election Results with Neo4j
  • Who am I? • David Simons • @SwamWithTurtles • Software Developer • … for a bespoke solutions provider Softwire (hint: we’re recruiting) • … for fun
  • 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 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