Re: [Wikitech-l] MediaWiki API pageview issue

2020-03-02 Thread Dan Andreescu
There are two hard problems here. One is historical page titles. You can get those from our new dataset (docs here: https://dumps.wikimedia.org/other/mediawiki_history/readme.html) by downloading the months you're interested in from

Re: [Wikitech-l] MediaWiki API pageview issue

2020-02-24 Thread bawolff
On Tue, Feb 25, 2020 at 1:27 AM MusikAnimal wrote: > Unfortunately there's no proper log of redirect changes (I recently filed < > https://phabricator.wikimedia.org/T240065> for this). There are change > tags > that identify redirect changes > --

Re: [Wikitech-l] MediaWiki API pageview issue

2020-02-24 Thread MusikAnimal
Unfortunately there's no proper log of redirect changes (I recently filed < https://phabricator.wikimedia.org/T240065> for this). There are change tags that identify redirect changes -- "mw-new-redirect" and "mw-changed-redirect-target", specifically --

Re: [Wikitech-l] MediaWiki API pageview issue

2020-02-24 Thread James Gardner via Wikitech-l
Thanks for the clarification of how redirects work, and what we should keep in mind when trying to count pageviews. Do you know if there's a way to find the date(s) when a page is redirected using the API? We know we can get the 'old' page ids of redirected pages using the API, but we're not sure

Re: [Wikitech-l] MediaWiki API pageview issue

2020-02-24 Thread MusikAnimal
> We attempted to use the wmflabs.org tool, but it only shows data from a certain date I'm assuming you want relative dates, not exact dates? You can do this by using the range=latest-N URL parameter (where N is the number of days). See and <

Re: [Wikitech-l] MediaWiki API pageview issue

2020-02-24 Thread James Gardner via Wikitech-l
Hi all, Thanks for all the help and advice with this issue, especially with the wmflabs tool with the redirect view tool. We'll try using that tool to download the pageview data we need and manually filter by dates to map redirects to the page. We'll also look into the REST API that Wiki has to

Re: [Wikitech-l] MediaWiki API pageview issue

2020-02-23 Thread Gergo Tisza
On Sun, Feb 23, 2020 at 4:17 PM James Gardner via Wikitech-l < wikitech-l@lists.wikimedia.org> wrote: > We attempted to use the wmflabs.org tool, but it only shows data from a > certain date. (Example link: > >

Re: [Wikitech-l] MediaWiki API pageview issue

2020-02-23 Thread bawolff
As an aside, this may be a case where generators in the api are useful - e.g. https://en.wikipedia.org/w/api.php?action=query=redirects=2019%E2%80%9320_coronavirus_outbreak=pageviews=pageviews=60 (Note: does not include the actual non-redirect article in the results, and you have to pay close

Re: [Wikitech-l] MediaWiki API pageview issue

2020-02-23 Thread bawolff
Hi, When I tested the api it seemed to work with redirects (e.g. https://mediawiki.org/w/api.php?action=query=json=pageviews=MediaWiki%7CMain_Page=pageviews=60= Where Main_Page redirects to the page MediaWiki ) > Then we attempted to use the redirects of a page and using the old page ids to grab

Re: [Wikitech-l] MediaWiki API pageview issue

2020-02-23 Thread Pine W
Hi James, I was aware of the first issue, but this is the first time that I can recall hearing about the second. See https://phabricator.wikimedia.org/T121912. You may want to ask your second question in that thread if no one responds to it here. Good luck, Pine (

[Wikitech-l] MediaWiki API pageview issue

2020-02-23 Thread James Gardner via Wikitech-l
Hi all, We are a group of undergraduates working on a project using the MediaWiki API. While working on this project, we ran into a unique issue involving pageviews. When trying to pull pageview data for a particular page, the redirects of a page would not be counted along with the original