[metrics-team] Demo: metrics timeline table underneath graphs

David Fifield david at bamsoftware.com
Sat Oct 28 22:10:49 UTC 2017


At the Montreal meeting, we had a session on annotating metrics graphs
with timeline entries:
https://trac.torproject.org/projects/tor/wiki/org/meetings/2017Montreal/Notes/MetricsTimelineWorkshop

Karsten had the idea of putting a table underneath each graph, as an
intermediate step before annotating the graphs themselves.

I thought it was a good idea and I wanted to see what it would look
like, so I added it to my multi-graph page:
https://people.torproject.org/~dcf/metrics-country.html?start=2016-10-01&end=2017-01-01&country=tr#timeline

On the actual Tor Metrics pages, there would not be so many entries,
because we would tailor the entries to fit each graph. For example, the
userstats-relay-country graph would not have entries that are specific
to one pluggable transport. What I implemented for this page is
basically the union of all the entries that apply to any of the three
graphs, in one big table. So, for the URL I linked, the table contains
all the entries where "place" is either empty (meaning global) or
contains "tr", also filtered by date range.

The way this works is, I wrote a program to parse the wikitext of the
MetricsTimeline page and output JSON. Then I copied the JSON into a data
structure in the source code of the page. So it won't update itself or
anything like that. For the source code of the parser program, check out
https://www.bamsoftware.com/git/tor-metrics-country.git


More information about the metrics-team mailing list