WordPress Analysis Scripts
Quick note on how the data was generated
I used the Stack Exchange API to fetch question statistics for WordPress over time. The data was then parsed and formatted for use in the line chart.
https://data.stackexchange.com/stackoverflow/query/edit/1900349
-- Compare WordPress with other web technologies (2020-present)
-- Shows monthly question counts for multiple technologies
WITH MonthlyTagCounts AS (
SELECT
CONVERT(VARCHAR(7), p.CreationDate, 120) AS [Month],
CASE
WHEN t.TagName IN ('react', 'reactjs') THEN 'React'
ELSE t.TagName
END AS GroupedTag,
COUNT(*) AS [Count]
FROM
Posts p
JOIN
PostTags pt ON p.Id = pt.PostId
JOIN
Tags t ON pt.TagId = t.Id
WHERE
t.TagName IN ('wordpress', 'react', 'reactjs', 'angular', 'vue.js', 'laravel')
AND p.PostTypeId = 1
AND p.CreationDate >= '2020-01-01'
GROUP BY
CONVERT(VARCHAR(7), p.CreationDate, 120),
CASE
WHEN t.TagName IN ('react', 'reactjs') THEN 'React'
ELSE t.TagName
END
)
SELECT
[Month],
MAX(CASE WHEN GroupedTag = 'wordpress' THEN [Count] ELSE 0 END) AS [WordPress],
MAX(CASE WHEN GroupedTag = 'React' THEN [Count] ELSE 0 END) AS [React],
MAX(CASE WHEN GroupedTag = 'angular' THEN [Count] ELSE 0 END) AS [Angular],
MAX(CASE WHEN GroupedTag = 'vue.js' THEN [Count] ELSE 0 END) AS [Vue.js],
MAX(CASE WHEN GroupedTag = 'laravel' THEN [Count] ELSE 0 END) AS [Laravel]
FROM
MonthlyTagCounts
GROUP BY
[Month]
ORDER BY
[Month]