                       "MERGE (linked:LinkedIn {id: {socialmedia}.linkedin.identifier })
                        MERGE (p)-[:HAS_LINKEDIN_ACCOUNT]->(linked) "
                       "")
-                    "RETURN ID(p)")]
-    (tx/statement query
-                  {:person {
-                            :id (:id member)
-                            :name (:name member)
-                            :bio (:bio member)
-                            }
-                   :socialmedia social-media
-                   :topics (:topics member)})))
+                    "RETURN ID(p)")
+        params {:person {
+                         :id (:id member)
+                         :name (:name member)
+                         :bio (:bio member)
+                         :joined (:joined member)
+                         }
+                :timetree (as-timetree (:joined member))
+                :socialmedia social-media
+                :topics (:topics member)}]
+    (tx/statement query params)))
 
 
 (defn create-event [event]

  (:require [clj-http.client :as client])
  (:require [clojure.data.json :as json])
  (:require [environ.core :as e])
  (:require [clojurewerkz.neocons.rest :as nr]
            [clojurewerkz.neocons.rest.transaction :as tx]))


       (filter #(= (str event-id) (->> % :event :id)))
       (filter #(not (= (:created %) (:mtime %))))))

(defn load-into-neo4j []
  (create-time-tree 2011 2014)
  (tx-api create-member  (load "data/members-2014-04-22.json"))
  (tx-api create-event  (load "data/events-2014-04-22.json"))
  (tx-api create-rsvp (rsvps-with-responses (load "data/rsvps-2014-04-22.json"))))

(defn main []
  (save "data/members-2014-04-22.json" (get-all members))
  (save "data/events-2014-04-22.json" (get-all events))
  (save "data/rsvps-2014-04-22.json"
        (mapcat #(get-all (partial rsvps %)) (map :id (load "data/events-2014-04-22.json")))))
