print
Committer Distribution

2 thoughts on “Committer Distribution”

  • March 15, 2017 at 11:52 PM
    Permalink

    Really cool blog post. In Neo4j you could have done.

    MATCH (author:Author)-[:COMMITED]-> (commit:Commit)
    RETURN author.name as name, collect(distinct author.email) as email, count(*) as commits

    you could then either marked one of the autors as :Person and connected the others to it or create a new “Person” node and connect all of them to it

    MATCH (author:Author)-[:COMMITED]-> (commit:Commit)
    WITH author, count(*) as commits order by commits desc // ordered
    WITH author.name as name, collect(distinct author) as emails
    WITH head(emails) as main, tail(emails) as rest
    SET main:Person
    FOREACH (a in rest | MERGE (a)-[:ALIAS_FOR]->(main) )

    Reply
    • March 16, 2017 at 5:37 AM
      Permalink

      Thanks for the tip! I like the idea of the “higher level concept” of a person. I have to admit that it felt a little bit wrong to do it in Pandas. I think it’s time to read a Neo4j book 😉

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

I accept that my given data and my IP address is sent to a server in the USA only for the purpose of spam prevention through the Akismet program.More information on Akismet and GDPR.