Along the same lines as Oliver's great R client [1], I just started work on a python version:
PyPI: https://pypi.python.org/pypi/wmf/0.1 code: https://github.com/milimetric/wmf (PRs welcome)
And if you're trying to skip past all the setup repository cruft, the meat: https://github.com/milimetric/wmf/blob/master/wmf/analytics/api/pageviews.py
Great work! I'm glad that someone picked this up in python too. The rate at which new client libraries have been released for working on the pageviews API is inspiring and hope that the trend continues for new services.
Props to Dan and Ironholds for seeing the need and filling it. :)
On Fri, Dec 11, 2015 at 9:36 PM, Dan Andreescu dandreescu@wikimedia.org wrote:
Along the same lines as Oliver's great R client [1], I just started work on a python version:
PyPI: https://pypi.python.org/pypi/wmf/0.1 code: https://github.com/milimetric/wmf (PRs welcome)
And if you're trying to skip past all the setup repository cruft, the meat: https://github.com/milimetric/wmf/blob/master/wmf/analytics/api/pageviews.py
[1] https://github.com/Ironholds/pageviews
Analytics mailing list Analytics@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/analytics
I added these to a section in the API docs:
https://wikitech.wikimedia.org/wiki/Analytics/AQS/Pageview_API
-Toby
On Sat, Dec 12, 2015 at 7:20 AM, Aaron Halfaker ahalfaker@wikimedia.org wrote:
Great work! I'm glad that someone picked this up in python too. The rate at which new client libraries have been released for working on the pageviews API is inspiring and hope that the trend continues for new services.
Props to Dan and Ironholds for seeing the need and filling it. :)
On Fri, Dec 11, 2015 at 9:36 PM, Dan Andreescu dandreescu@wikimedia.org wrote:
Along the same lines as Oliver's great R client [1], I just started work on a python version:
PyPI: https://pypi.python.org/pypi/wmf/0.1 code: https://github.com/milimetric/wmf (PRs welcome)
And if you're trying to skip past all the setup repository cruft, the meat: https://github.com/milimetric/wmf/blob/master/wmf/analytics/api/pageviews.py
[1] https://github.com/Ironholds/pageviews
Analytics mailing list Analytics@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/analytics
Analytics mailing list Analytics@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/analytics
I wasn't aware of some conventions that came before me, so I moved the project from milimetric/wmf to mediawiki-utilities/python-mwviews. I promise it'll stay there, sorry for the inconvenience. Updated links:
PyPI: https://pypi.python.org/pypi/mwviews/0.0.2 code: https://github.com/mediawiki-utilities/python-mwviews (PRs still welcome, thanks for the 2 you already helped with!)
On Fri, Dec 11, 2015 at 10:36 PM, Dan Andreescu dandreescu@wikimedia.org wrote:
Along the same lines as Oliver's great R client [1], I just started work on a python version:
PyPI: https://pypi.python.org/pypi/wmf/0.1 code: https://github.com/milimetric/wmf (PRs welcome)
And if you're trying to skip past all the setup repository cruft, the meat: https://github.com/milimetric/wmf/blob/master/wmf/analytics/api/pageviews.py
Awesome! Welcome to the unix-like MediaWiki python libraries revolution.
Now to set aside some time to contribute and play around :)
On Mon, Dec 14, 2015 at 8:32 AM, Dan Andreescu dandreescu@wikimedia.org wrote:
I wasn't aware of some conventions that came before me, so I moved the project from milimetric/wmf to mediawiki-utilities/python-mwviews. I promise it'll stay there, sorry for the inconvenience. Updated links:
PyPI: https://pypi.python.org/pypi/mwviews/0.0.2 code: https://github.com/mediawiki-utilities/python-mwviews (PRs still welcome, thanks for the 2 you already helped with!)
On Fri, Dec 11, 2015 at 10:36 PM, Dan Andreescu dandreescu@wikimedia.org wrote:
Along the same lines as Oliver's great R client [1], I just started work on a python version:
PyPI: https://pypi.python.org/pypi/wmf/0.1 code: https://github.com/milimetric/wmf (PRs welcome)
And if you're trying to skip past all the setup repository cruft, the meat: https://github.com/milimetric/wmf/blob/master/wmf/analytics/api/pageviews.py
Analytics mailing list Analytics@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/analytics
Is this tool really a MediaWiki utility? As far as I understand the webservice running from http://wikimedia.org/api/rest_v1/metrics/ is independent of the MediaWiki software. Or am I misunderstanding something? The API and the tool are a Wikimedia Foundation project outside the main MediaWiki development (Github mirror: https://github.com/wikimedia/analytics-pageview-api), so the previous name (wmf) was actually better IMHO?
'mwviews' could mislead people to think that it could access view statistics from any MediaWiki instance. This is not that case if I understand correctly. "wmviews" would be a better name. :-)
/Finn
On 12/14/2015 03:32 PM, Dan Andreescu wrote:
I wasn't aware of some conventions that came before me, so I moved the project from milimetric/wmf to mediawiki-utilities/python-mwviews. I promise it'll stay there, sorry for the inconvenience. Updated links:
PyPI: https://pypi.python.org/pypi/mwviews/0.0.2 code: https://github.com/mediawiki-utilities/python-mwviews (PRs still welcome, thanks for the 2 you already helped with!)
On Fri, Dec 11, 2015 at 10:36 PM, Dan Andreescu <dandreescu@wikimedia.org mailto:dandreescu@wikimedia.org> wrote:
Along the same lines as Oliver's great R client [1], I just started work on a python version: PyPI: https://pypi.python.org/pypi/wmf/0.1 code: https://github.com/milimetric/wmf (PRs welcome) And if you're trying to skip past all the setup repository cruft, the meat: https://github.com/milimetric/wmf/blob/master/wmf/analytics/api/pageviews.py [1] https://github.com/Ironholds/pageviews
Wiki-research-l mailing list Wiki-research-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wiki-research-l
Just to confuse the issue further:
You can already get views statistics from the ordinary API of an ordinary MediaWiki instance (where the $wgDisableCounters is set to false).
For instance, an API call on my wiki could be: http://neuro.compute.dtu.dk/w/api.php?action=query&prop=info&titles=... where the 'counter' field displays the statistics.
On Wikimedia Foundation's MediaWiki instances such as the Wikipedia you won't get the counter, see https://da.wikipedia.org/w/api.php?action=query&prop=info&titles=Amy...
/Finn
On 12/15/2015 04:55 PM, Finn Årup Nielsen wrote:
Is this tool really a MediaWiki utility? As far as I understand the webservice running from http://wikimedia.org/api/rest_v1/metrics/ is independent of the MediaWiki software. Or am I misunderstanding something? The API and the tool are a Wikimedia Foundation project outside the main MediaWiki development (Github mirror: https://github.com/wikimedia/analytics-pageview-api), so the previous name (wmf) was actually better IMHO?
'mwviews' could mislead people to think that it could access view statistics from any MediaWiki instance. This is not that case if I understand correctly. "wmviews" would be a better name. :-)
/Finn
On 12/14/2015 03:32 PM, Dan Andreescu wrote:
I wasn't aware of some conventions that came before me, so I moved the project from milimetric/wmf to mediawiki-utilities/python-mwviews. I promise it'll stay there, sorry for the inconvenience. Updated links:
PyPI: https://pypi.python.org/pypi/mwviews/0.0.2 code: https://github.com/mediawiki-utilities/python-mwviews (PRs still welcome, thanks for the 2 you already helped with!)
On Fri, Dec 11, 2015 at 10:36 PM, Dan Andreescu <dandreescu@wikimedia.org mailto:dandreescu@wikimedia.org> wrote:
Along the same lines as Oliver's great R client [1], I just started work on a python version: PyPI: https://pypi.python.org/pypi/wmf/0.1 code: https://github.com/milimetric/wmf (PRs welcome) And if you're trying to skip past all the setup repository cruft, the meat:
https://github.com/milimetric/wmf/blob/master/wmf/analytics/api/pageviews.py
[1] https://github.com/Ironholds/pageviews
Wiki-research-l mailing list Wiki-research-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wiki-research-l
Good point Finn!
This is a highly specialized first functionality of mwviews, but it should not stop there. We should have API methods for gathering the counter field too. I plan to gather some old code for processing the old hourly view logs to incorporate this into the library too. So, in short, this isn't really generally useful for MediaWiki, but it should be and will be soon.
Does anyone have a summary of how views are used/accessed for Wikia wikis that I could work from?
-Aaron
On Tue, Dec 15, 2015 at 10:10 AM, Finn Årup Nielsen fn@imm.dtu.dk wrote:
Just to confuse the issue further:
You can already get views statistics from the ordinary API of an ordinary MediaWiki instance (where the $wgDisableCounters is set to false).
For instance, an API call on my wiki could be: http://neuro.compute.dtu.dk/w/api.php?action=query&prop=info&titles=... where the 'counter' field displays the statistics.
On Wikimedia Foundation's MediaWiki instances such as the Wikipedia you won't get the counter, see https://da.wikipedia.org/w/api.php?action=query&prop=info&titles=Amy...
/Finn
On 12/15/2015 04:55 PM, Finn Årup Nielsen wrote:
Is this tool really a MediaWiki utility? As far as I understand the webservice running from http://wikimedia.org/api/rest_v1/metrics/ is independent of the MediaWiki software. Or am I misunderstanding something? The API and the tool are a Wikimedia Foundation project outside the main MediaWiki development (Github mirror: https://github.com/wikimedia/analytics-pageview-api), so the previous name (wmf) was actually better IMHO?
'mwviews' could mislead people to think that it could access view statistics from any MediaWiki instance. This is not that case if I understand correctly. "wmviews" would be a better name. :-)
/Finn
On 12/14/2015 03:32 PM, Dan Andreescu wrote:
I wasn't aware of some conventions that came before me, so I moved the project from milimetric/wmf to mediawiki-utilities/python-mwviews. I promise it'll stay there, sorry for the inconvenience. Updated links:
PyPI: https://pypi.python.org/pypi/mwviews/0.0.2 code: https://github.com/mediawiki-utilities/python-mwviews (PRs still welcome, thanks for the 2 you already helped with!)
On Fri, Dec 11, 2015 at 10:36 PM, Dan Andreescu <dandreescu@wikimedia.org mailto:dandreescu@wikimedia.org> wrote:
Along the same lines as Oliver's great R client [1], I just started work on a python version: PyPI: https://pypi.python.org/pypi/wmf/0.1 code: https://github.com/milimetric/wmf (PRs welcome) And if you're trying to skip past all the setup repository cruft, the meat:
https://github.com/milimetric/wmf/blob/master/wmf/analytics/api/pageviews.py
[1] https://github.com/Ironholds/pageviews
Wiki-research-l mailing list Wiki-research-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wiki-research-l
-- Finn Årup Nielsen http://people.compute.dtu.dk/faan/
Wiki-research-l mailing list Wiki-research-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wiki-research-l
On Tue, Dec 15, 2015 at 8:10 AM, Finn Årup Nielsen fn@imm.dtu.dk wrote:
Just to confuse the issue further:
You can already get views statistics from the ordinary API of an ordinary MediaWiki instance (where the $wgDisableCounters is set to false).
https://www.mediawiki.org/wiki/Manual:$wgDisableCounters Wanted to point out that this feature (counters) was removed from MW recently.
wiki-research-l@lists.wikimedia.org