• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Using Clojure to Marry Neo4j and Open Democracy
 

Using Clojure to Marry Neo4j and Open Democracy

on

  • 149 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
149
Views on SlideShare
137
Embed Views
12

Actions

Likes
1
Downloads
0
Comments
0

2 Embeds 12

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

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