GITHUB_TOKEN
to pass your token to the code~/.plotly/.credentials
In [7]:
# Use plotly cufflinks to plot data frames
# https://plot.ly/ipython-notebooks/cufflinks/
# instructions for offline plotting
# https://plot.ly/python/getting-started/#initialization-for-offline-plotting
#
# Follow the instructions for online plotting:
# https://plot.ly/python/getting-started/
# You will need to setup an account
import plotly
import plotly.plotly as py
import plotly.graph_objs as go
import cufflinks as cf
#from importlib import reload
import itertools
In [8]:
import project_stats
#reload(project_stats)
In [9]:
c = project_stats.ProjectStats(project="0.6.0")
#c = project_stats.ProjectStats(project="0.7.0")
c.main()
Make plots showing different groups of labels
In [10]:
counts = ["open", "total"]
#labels = ["cuj/build-train-deploy", "cuj/multi-user", "area/katib"]
labels = ["priority/p0", "priority/p1", "priority/p2"]
columns = [(a,b) for (a,b) in itertools.product(counts, labels)]
import datetime
start=datetime.datetime(2019, 1, 1)
i = c.stats.index > start
#c.stats.iloc[i]
c.stats.loc[i, columns].iplot(kind='scatter', width=5, filename='project-stats', title='{0} Issue Count'.format(c.project))
Out[10]:
In [11]:
c.stats.iloc[-1][columns]
Out[11]:
In [12]:
import datetime
start=datetime.datetime(2019, 1, 1)
i = c.stats.index > start
c.stats.iloc[i]
Out[12]: