Commits

Giovanni Marco Dall'Olio  committed 54b8514

TRELLO_ACTIVITY: generating a plot from json file

  • Participants
  • Parent commits 4a15d6c

Comments (0)

Files changed (1)

File plot_trello_activity/plot_trello_activity.py

 Convert a JSON trello history file to an histogram
 """
 
-import json
+import simplejson
 import pylab
 import optparse
 
 
+json_file = "to-do-and-tasks-exploring-the-genotype-space-of-linear-pathways-in-humans.json"
 
+trello_log = simplejson.load(open(json_file), 'r')
 
+all_dates = [trello_log['actions'][i]['date'] for i in range(len(trello_log['actions']))]
+all_dates = pylab.datestr2num(all_dates)
 
+counts = pylab.arange(0, len(all_dates))
+
+plt = pylab.plot(pylab.all_dates, counts)
+pylab.savefig("activity.png")