Skip to content

community-graph/dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Analytics dashboard(s) for community graph

Start tracking developer engagement metrics? In the past we have been tracking meetup, twitter, slack activity, downloads, online training and M&M

Readonly community graph instance: http://138.197.15.1:7474/browser/ user all pwd readonly (bolt://all:readonly@138.197.15.1:7687)

Look at different metrics

  • size of community per channel

  • time series

  • most active users, tags

  • activity per time frame

  • aggregated activity per user (curve)

  • frequent topics from tags / keyword analysis *

Metrics / Numbers / Insights of Activity and Content

Activity

SO posts (questions and answers)

match (c:StackOverflow:Content)
return apoc.date.format(toInt(c.created),"s","yyyy-MM-01") as month, count(*) as posts
order by month desc

Users

match (u:User)-[r]->(o) where exists(o.created) and toInt(o.created) is not null
AND timestamp() / 1000 - o.created < 3600*24*30
return u.name, u.id, count(*) as c,
collect(distinct head(filter(l IN labels(o) where l in ['Event','Tweet','Repository','Question','Answer']))) as type,
collect(distinct type(r)) as activity
ORDER BY c DESC LIMIT 100

Tweets

match (c:Tweet:Content)  // Mon Jan 16 21:17:45 +0000 2017
return apoc.date.format(c.created,"s","YYYY-MM-01") as month, count(*) as tweets
order by month desc

Meetup events

match (c:Meetup:Event)
return apoc.date.format(toInt(c.time),"ms","YYYY-MM-01") as month, count(*) as events, collect(distinct c.title)
order by month desc

Recent interesting Content

  • tweets

  • new repositories, new releases

match (t:Tweet:Content)-->(l:Link)
where not t:Retweet
return t.text,l.url,
       sum(size((t)<-[:RETWEETED]-())) + sum(t.favorites) as score
order by score desc limit 100
match (t:Tweet:Content)-->(l:Link)
where not t:Retweet  and t.created > timestamp()/1000 - 7*24*3600
return t.text,l.url,
       sum(size((t)<-[:RETWEETED]-())) + sum(t.favorites) as score
order by score desc limit 100

Recently created Repositories

MATCH (n:Repository) WITH n ORDER BY n.created desc LIMIT 100
WITH n ORDER BY n.created DESC LIMIT 100
RETURN n.title, n.url, n.created, n.favorites, substring(n.description,0,250) as desc
ORDER BY n.favorites DESC

Recent Meetup Events

MATCH (g:Group)-[:CONTAINED]->(e:Event:Meetup)<-[:HOSTED]-(v:Venue)
WHERE not e.title contains 'GraphConnect'
RETURN g.title, e.status, e.title, e.yes_rsvp_count as attendance, e.rating, v.city, v.name
ORDER BY e.time desc LIMIT 100

Releases that were tweeted about

match (t:Tweet)<-[:POSTED]-(p:User)
where t.created > timestamp()/1000 - 14*24*3600 and t.text contains 'release'
return t.text, collect(distinct p.name) as names
order by size(names) desc
match (t:Tweet)<-[:POSTED]-(p:User)
where t.created > timestamp()/1000 - 14*24*3600 and t.text contains 'release' and t.text =~ '.+\\d\\.\\d.+'
return t.text, collect(distinct p.name) as names
order by size(names) desc```

Topics / Content Analytics

Questions in Slack in certain channels
match (p:User)-[:POSTED]->(m:Message:Slack:Text)-[:IN]->(c:Channel)
where m.text contains "?" and c.title contains "cypher" and not p.name contains "neo"
return p.name, count(*) as c
order by c desc limit 10
Phrases in Slack Channel
match (p:User)-[:POSTED]->(m:Message:Slack:Text)-[:IN]->(c:Channel)
where m.text contains "?" and c.title contains "cypher" and not p.name contains "neo"
with split(apoc.text.regreplace(toLower(m.text),"[^a-z ]+"," ")," ") as words
unwind range(0,size(words)-4) as idx
with words[idx..idx+4] as phrase where size([w in phrase where length(w) > 3]) > 2 and none(w in phrase where trim(w) IN ['','http'])
return phrase,count(*) as c
order by c desc limit 100
Frequent words in top rated + viewed, recent questions by tag
WITH "spring-data-neo4j" as tag
MATCH (n:Question)-[:TAGGED]->(t:Tag {name:tag})
WHERE n.created > timestamp()/1000 - 365*24*3600
UNWIND [w IN split(apoc.text.regreplace(toLower(n.text),"\\W+"," ")," ") WHERE length(w) > 3] as word
WITH n, word, count(*) as freq
WHERE 1 < freq < 15
WITH * ORDER BY freq desc
WITH n, collect({freq:freq, word:word})[0..10] as topwords
RETURN n.title, n.score, n.favorites, n.view_count, n.is_answered,  size((n)<-[:ANSWERED]-()) as answers, topwords
ORDER BY n.score*100+n.view_count desc
LIMIT 25
WITH "cypher" as tag
MATCH (n:Question)-[:TAGGED]->(t:Tag {name:tag})
WHERE n.created > timestamp()/1000 - 365*24*3600
WITH n, split(apoc.text.regreplace(apoc.text.regreplace(toLower(n.text),'&.+?;',''),"[^a-z]+"," ")," ") as words
UNWIND apoc.coll.pairsMin(words) as pair
WITH n, pair, count(*) as freq
WHERE 1 < freq < 15
WITH * ORDER BY freq desc
WITH n, collect({freq:freq, pair:pair})[0..10] as topwords
RETURN n.title, n.score, n.favorites, n.view_count, n.is_answered,  size((n)<-[:ANSWERED]-()) as answers, topwords
ORDER BY n.score*100+n.view_count desc
LIMIT 25

About

Community Metrics Dashboard

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published