Closed hellais closed 1 year ago
@sarathms I would like to take this. Have few questions.
Thanks for offering to take this on!
The MAT page is the following: https://explorer.ooni.org/experimental/mat?test_name=web_connectivity&since=2022-02-14&until=2022-03-17&axis_x=measurement_start_day&axis_y=probe_cc
The API endpoint it uses for fetching the metadata of the chart is the following: https://api.ooni.io/apidocs/#/default/get_api_v1_aggregation.
What needs to be done to implement this, is looking at the aggregation API query that is being issued for the chart and creating a link button at the bottom of the page to that API query with the format=CSV
suffix. When a user will click on that they will get the data for the chart in CSV format.
This has been implemented since a while inside of https://github.com/ooni/explorer/pull/741
We should add buttons at the bottom of the MAT chart that allows users to download the data used to plot the chart in CSV and JSON format.
This should be pretty easy as the API already supports exporting data as CSV (you just append
format=CSV
) and it's basically just a matter of adding some links pointing to those URLs.