[metrics-team] Allow for TSV download of result

David Fifield david at bamsoftware.com
Fri Dec 29 15:03:47 UTC 2017


On Thu, Dec 28, 2017 at 03:16:36PM +0100, Ole Tange wrote:
> Thanks for giving an easy to use interface for searching. However,
> when I search for https://atlas.torproject.org/#search/country:de I
> can find no easy way to import the result into a spreadsheet.
> 
> Maybe you could make it possible to export the result as TSV/CSV?

Relay Search does its queries using Onionoo, which is a JSON service.
Depending on your needs, you may be able to just query Onionoo directly
and convert the result to TSV using jq (https://stedolan.github.io/jq/).

Here's an approximation of the Relay Search index output:
$ wget -O - 'https://onionoo.torproject.org/details?country=de' | jq -r '(.relays,.bridges)[]|[.nickname,.observed_bandwidth,.last_restarted,.country,.or_addresses[0],(.flags|join(","))]|@tsv' > de.tsv

There are many other fields available:
https://metrics.torproject.org/onionoo.html#details


More information about the metrics-team mailing list