User:Isaac (WMF)/clickstream viz
What?
[edit]Visualize which links on a Wikipedia article are clicked on most based on data from the clickstream dataset.
Why?
[edit]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?
[edit]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 {{subst:Lusc|User:Isaac_(WMF)/clickstream_viz.js}} // [[User:Isaac_(WMF)/clickstream_viz.js]]
or meta:Special:MyPage/global.js for all available languages and place mw.loader.load( '//en.wikipedia.org/w/index.php?title=User:Isaac_(WMF)/clickstream_viz.js&action=raw&ctype=text/javascript' );
at the bottom of the page.
You should then notice a CS+
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?
[edit]Developed by Isaac (WMF) but heavily borrowed from User:TayIorRobinson.
Where?
[edit]The source code is available at User:Isaac (WMF)/clickstream viz.js