Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Open Documentation Dashboard - FOSDEM 2017

Bitergia
February 04, 2017

The Open Documentation Dashboard - FOSDEM 2017

Slides for The ODF Dashboard talk at FOSDEM 2017

Bitergia

February 04, 2017
Tweet

More Decks by Bitergia

Other Decks in Technology

Transcript

  1. The Open Document Foundation Dashobard Jesus M. Gonzalez-Barahona (URJC) @jgbarah

    jgb at bitergia dot com https://speakerdeck.com/bitergia FOSDEM 2017, Mozilla devroom Brussels (Belgium) February 4th 2017
  2. /me Like five years ago I was having coffees with

    the gang of Bitergia founders Involved in the company since then http://bitergia.com I work at Universidad Rey Juan Carlos... ...researching about software development http://gsyc.es/~jgb My two hats:
  3. You can filter You can drill down You can share

    You can follow links https://dashboard.documentfoundation.org
  4. Your turn You can play with the dashboard You can

    play with the ElasticSearch data You can produce scripts, link the data to programs You can improve GrimoireLab You can report bugs, ask for features
  5. Working with data Query ElasticSearch API with curl $ curl

    -XGET "http://elasticsearch_url/git/_search/?size=1&pretty" {... "hits" : { "total" : 407, "hits" : [ { "_index" : "commits", "_type" : "summary", "_id" : "AVfPp9Po5xUyv5saVPKU", "_score" : 1.0, "_source" : { "hash" : "d1253dd9876bb76e938a861acaceaae95241b46d", "commit" : "Santiago Dueñas <[email protected]>", "author" : "Santiago Dueñas <[email protected]>", "author_date" : "Wed Nov 18 10:59:52 2015 +0100", "files_no" : 3, "commit_date" : "Wed Nov 18 14:41:21 2015 +0100" }} ] } }
  6. Your turn from elasticsearch import Elasticsearch from elasticsearch_dsl import Search

    es = Elasticsearch(["http://xx:[email protected]/data”] s = Search(using=es, index=’git’) s = s.filter('range', files={'gt':0}) s = s.filter('range', author_date={'gt': datetime(2016, 7, 1)}) s.aggs.metric('commits', 'cardinality', field='hash') s.aggs.bucket('histogram', 'date_histogram', field='author_date', interval='quarter') by_q = s.execute() for quarter in by_q.to_dict()['aggregations']['histogram']['buckets']: print("Unique commits for quarter starting on ", Quarter['key_as_string'], ": ", quarter['doc_count']) Python scripting