User:Isaac (WMF)/clickstream viz

What?
Visualize which links on a Wikipedia article are clicked on most based on data from the clickstream dataset.

Why?
The clickstream dataset provides valuable insight into how readers navigate articles but the data has been pretty inaccessible. Recently, an Outreachy project led to the creation of an API that holds the data and interface for visualizing it: https://wikinav.toolforge.org/

This user script extends that API to allow users to visualize the data in-situ as they view Wikipedia articles.

How?
This uses the API for the WikiNav tool -- e.g., https://wikinav.wmcloud.org/api/v1/en/Chocolate/destinations/latest?limit=10

To install, simply go to Special:MyPage/common.js for just English and put  or meta:Special:MyPage/global.js for all available languages and place   at the bottom of the page.

You should then notice a  icon appear at the top right of the page for Wikipedia articles on supported languages (currently de, en, es, fa, fr, it, ja, pl, pt, ru, zh).

Who?
Developed by Isaac (WMF) but heavily borrowed from User:TayIorRobinson.

Where?
The source code is available at .js