Reports - lampholder/spudbin GitHub Wiki

Generating Reports

Some general points on how to use the report-generation features (UX and API):

  • The usernames parameter accepts a comma-separated list of github usernames
  • All dates are in YYYY-mm-dd format

Who has tokenized?

Generate the raw JSON data:

GET https://<domain>/<mount>/api/reports/whoHasTokenized?usernames=<username>[,<username>...]&start=YYYY-mm-dd&end=YYYY-mm-dd

Generate an HTML table:

GET https://<domain>/<mount>/whoHasTokenized?usernames=<username>[,<username>...]&start=YYYY-mm-dd&end=YYYY-mm-dd

How have people spent their time?

The time-spent reports include some features to help with usefully slicing the data:

  • The timeWindow parameter accepts week, month, or period:
    • week divides the data on calendar week
    • month divites the data on calendar month
    • period returns the full aggregated dataset for the period specified (unsliced)
  • The groupBy parameter accepts tag or bucket:
    • tag groups the results by tag. Since buckets can have multiple tags, slicing by tags can produce confusing results if the tags are not also filtered to a subset of orthogonal tags (i.e. if you tokenise in a bucket tagged as both 'maintenance' and 'Project Zappa', your generated report will count that token twice. It is recommended that the groupBy tag feature is used in conjunction with filtering othogonal tags (e.g. filter to tags representing task type, or product name, but not both).
    • bucket groups the results by bucket. Has none of the complexity of filtering by tag.
  • The tags parameter is optional - if you specify (a comma-separated list of) tags, only tokens allocated to buckets tagged with those tags will be counted
  • The stacked parameter is optional - if you specify stacked=percent the graph will render percentage-of-total-tokens-submitted rather than literal-number-of-tokens-submitted.

Generate the raw JSON data:

GET https://<domain>/<mount>/api/reports?usernames=<username>[,<username>...]&start=YYYY-mm-dd&end=YYYY-mm-dd&groupBy=[tag/bucket]&timeWindow=[week/month/period][&tags=<tag>[,<tag>...]]

Generate a Google chart:

GET https://<domain>/<mount>/graph?usernames=<username>[,<username>...]&start=YYYY-mm-dd&end=YYYY-mm-dd&groupBy=[tag/bucket]&timeWindow=[week/month/period][&tags=<tag>[,<tag>...]][&stacked=percent]

⚠️ **GitHub.com Fallback** ⚠️