FYI, I wrote a tool that works similarly to baGLAMa, but you can request
categories on-the-fly:
https://tools.wmflabs.org/glamtools/glamoran.html
The tool is using the WMF pageview API, and is limited by this (earliest
data is 2015-08).
Also, it works entirely in the browser, so using large category trees are
not recommended.