Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tech Report: Category descriptions #45

Merged
merged 2 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion definitions/declarations/httparchive.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,10 @@ for (const table of stagingTables) {

declare({
schema: 'wappalyzer',
name: 'apps'
name: 'technologies'
})

declare({
schema: 'wappalyzer',
name: 'categories'
})
23 changes: 16 additions & 7 deletions definitions/output/reports/cwv_tech_categories.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,19 @@ WITH pages AS (
client = 'mobile'
${constants.devRankFilter}
), categories AS (
SELECT
name AS category,
description
FROM ${ctx.ref('wappalyzer', 'categories')}
), category_stats AS (
SELECT
category,
COUNT(DISTINCT root_page) AS origins
FROM pages,
UNNEST(technologies) AS t,
UNNEST(t.categories) AS category
GROUP BY category
), technologies AS (
), technology_stats AS (
SELECT
category,
technology,
Expand All @@ -38,13 +43,17 @@ WITH pages AS (

SELECT
category,
categories.origins,
ARRAY_AGG(technology IGNORE NULLS ORDER BY technologies.origins DESC) AS technologies
FROM categories
JOIN technologies
description,
category_stats.origins,
ARRAY_AGG(technology IGNORE NULLS ORDER BY technology_stats.origins DESC) AS technologies
FROM category_stats
INNER JOIN technology_stats
USING (category)
LEFT JOIN categories
USING (category)
GROUP BY
category,
categories.origins
ORDER BY categories.origins DESC
description,
origins
ORDER BY origins DESC
`)
2 changes: 1 addition & 1 deletion definitions/output/reports/cwv_tech_technologies.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ SELECT
NULL AS similar_technologies,
origins
FROM ${ctx.ref('core_web_vitals', 'technologies')}
LEFT JOIN ${ctx.ref('wappalyzer', 'apps')}
LEFT JOIN ${ctx.ref('wappalyzer', 'technologies')}
ON app = name
WHERE date = '${pastMonth}' AND
geo = 'ALL' AND
Expand Down
6 changes: 3 additions & 3 deletions definitions/output/wappalyzer/tech_detections.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ tech_deprecated_gone_origins AS (
-- aggregation of technology adoption/deprecation metrics
SELECT
DATE('${constants.currentMonth}') AS date,
COALESCE(before_summary.technology, tech_adopted_existing_origins.technology, tech_adopted_new_origins.technology, apps.name) AS technology,
COALESCE(before_summary.technology, tech_adopted_existing_origins.technology, tech_adopted_new_origins.technology, technologies.name) AS technology,

-- origins summary
0-COALESCE(total_origins_deprecated_existing, 0) AS total_origins_deprecated_existing,
Expand All @@ -139,6 +139,6 @@ LEFT JOIN tech_deprecated_existing_origins
ON before_summary.technology = tech_deprecated_existing_origins.technology
LEFT JOIN tech_deprecated_gone_origins
ON before_summary.technology = tech_deprecated_gone_origins.technology
FULL OUTER JOIN wappalyzer.apps
ON before_summary.technology = apps.name
FULL OUTER JOIN wappalyzer.technologies
ON before_summary.technology = technologies.name
`)
Loading