我如何找到所有 MATLAB 问题的浏览量?
How can I find the number of views all MATLAB questions have received?
我想计算 Stack Overflow 上某个标签的问题浏览总数。假设标签是 MATLAB。目前,在 Stack Overflow 上有 88k 个问题被标记为 matlab。现在每个问题都有一些看法。
有没有办法让我通过 Stack Exchange 了解这 88k 个问题的总问题视图 API?
有好几个matlab questions and given that the API returns max 100 results per quota and it has a limit of 10k calls per day (when you use a key), I wouldn't suggest using it in this case. You may also get an error。
我的建议是使用Stack Exchange Data Explorer。这是一个 SQL 查询示例,它应该满足您的要求:
DECLARE @from_date AS date = '##FromDate##'
DECLARE @to_date AS date = '##ToDate##'
SELECT SUM(CAST(ViewCount AS BIGINT)) AS view_count FROM Posts
WHERE PostTypeId = 1 AND CreationDate > @from_date AND CreationDate < @to_date AND Tags LIKE '%##Tag##%'
这将对 ViewCount
列的值求和,即每个问题的浏览量。由于您只需要问题,因此需要将 PostTypeId
设置为 1
。
Here 是实时查询。在标签输入中输入标签名称,然后运行查询!如果标签有很多问题,那么查询可能会超时。
参考:Database schema documentation for the public data dump and SEDE 在 Meta Stack Exchange 上。
我想计算 Stack Overflow 上某个标签的问题浏览总数。假设标签是 MATLAB。目前,在 Stack Overflow 上有 88k 个问题被标记为 matlab。现在每个问题都有一些看法。
有没有办法让我通过 Stack Exchange 了解这 88k 个问题的总问题视图 API?
有好几个matlab questions and given that the API returns max 100 results per quota and it has a limit of 10k calls per day (when you use a key), I wouldn't suggest using it in this case. You may also get an error。
我的建议是使用Stack Exchange Data Explorer。这是一个 SQL 查询示例,它应该满足您的要求:
DECLARE @from_date AS date = '##FromDate##'
DECLARE @to_date AS date = '##ToDate##'
SELECT SUM(CAST(ViewCount AS BIGINT)) AS view_count FROM Posts
WHERE PostTypeId = 1 AND CreationDate > @from_date AND CreationDate < @to_date AND Tags LIKE '%##Tag##%'
这将对 ViewCount
列的值求和,即每个问题的浏览量。由于您只需要问题,因此需要将 PostTypeId
设置为 1
。
Here 是实时查询。在标签输入中输入标签名称,然后运行查询!如果标签有很多问题,那么查询可能会超时。
参考:Database schema documentation for the public data dump and SEDE 在 Meta Stack Exchange 上。