获取维基百科页面查看统计 [英] Getting Wikipedia page view statistics

查看:35
本文介绍了获取维基百科页面查看统计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在特定网页(比特币")的维基百科页面查看统计数据上收集过去五年的时间序列数据.我发现这个网站很有用:http://stats.grok.se 用于获取此数据.两个问题:

I'm trying to collect time series data over the last five years on Wikipedia page view statistics for a particular webpage ("Bitcoin"). I found this site to be useful: http://stats.grok.se for getting this data. Two issues:

  1. 该网站触发了内部服务器错误"时,每次选择为获取数据的一年时间.

  1. The website triggers an "internal server error" error whenever 2016 is selected as a year for which to obtain data.

是否有现有工具可以将此输出转换为更实用的格式,例如 .csv?

Is there an existing tool that can put this output in more usable form, such as a .csv?

推荐答案

我不知道 stats.grok.se,因为它似乎不在维基媒体制作或实验室服务器上.但是从 2015 年 7 月开始,提供了一个用于页面查看统计的 API:

I don't know about stats.grok.se as it doesn't appear to live on a wikimedia production or labs server. But there's an API provided for page view statistics starting July 2015:

https://wikimedia.org/api/rest_v1/#!/Pageviews_data/get_metrics_pageviews_per_article_project_access_agent_article_granularity_start_end

例如,https://en.wikipedia.org/wiki/Bitcoin 过去一年:https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/en.wikipedia.org/all-access/all-agents/Bitcoin/daily/20151105/20161105

所有访问 = 桌面+移动网络+移动应用

all-access = desktop+mobile-web+mobile-app

all-agents = 用户+蜘蛛+机器人

all-agents = user+spider+bot

历史数据可以从https://dumps.wikimedia.org/other/下载pagecounts-raw/

这篇关于获取维基百科页面查看统计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆