Skip to content

Commit

Permalink
Jamstack chapter 2021 (#2600)
Browse files Browse the repository at this point in the history
* wip on jamstack article

* updates

* Optimised images with calibre/image-actions

* more fixes

* Add Jamstack chapter back in to config

* Fix linting error

* Add reviewers

* Update src/content/en/2021/jamstack.md

Co-authored-by: Barry Pollard <[email protected]>

* Update src/content/en/2021/jamstack.md

Co-authored-by: Barry Pollard <[email protected]>

* Improve headers

* Update src/content/en/2021/jamstack.md

Co-authored-by: Barry Pollard <[email protected]>

* explain 3rd parties usage

* Update frameworks query

* Linting

* TinyPng images

* Remove smart quotes

* Fix links

* Fix headings

* Line endings

* Hyphens

* Fix 3rd parties distribution

* Fix 3rd parties distribution

* Optimised images with calibre/image-actions

* Edits up to CWV

* More edits

* Last edits for now

* Retake images

* Remove CrUX experience distributed charts

* address questions

* Further tweaks

* Update src/content/en/2021/jamstack.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Barry <[email protected]>
Co-authored-by: Barry Pollard <[email protected]>
  • Loading branch information
4 people authored Nov 30, 2021
1 parent e0125b3 commit 2e27c72
Show file tree
Hide file tree
Showing 30 changed files with 561 additions and 16 deletions.
47 changes: 44 additions & 3 deletions sql/2021/jamstack/framework_libraries.sql
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,36 @@ ssg AS (
app = "Nuxt.js"
),

total_ssg AS (
SELECT
_TABLE_SUFFIX AS client,
COUNT(0) AS ssg_total
FROM
`httparchive.technologies.2021_07_01_*`
WHERE
LOWER(category) = "static site generator" OR
app = "Next.js" OR
app = "Nuxt.js"
GROUP BY
_TABLE_SUFFIX
),

total_ssg_app AS (
SELECT
_TABLE_SUFFIX AS client,
app AS ssg_app,
COUNT(0) AS ssg_app_total
FROM
`httparchive.technologies.2021_07_01_*`
WHERE
LOWER(category) = "static site generator" OR
app = "Next.js" OR
app = "Nuxt.js"
GROUP BY
_TABLE_SUFFIX,
app
),

js AS (
SELECT
_TABLE_SUFFIX AS client,
Expand All @@ -35,14 +65,17 @@ js AS (
category IN ('JavaScript frameworks', 'JavaScript libraries')
)


SELECT
client,
ssg_app,
js_app,
COUNT(DISTINCT url) AS num_urls,
ssg_app_total,
COUNT(DISTINCT url) / ssg_app_total AS pct_urls_app,
ssg_total,
COUNT(DISTINCT url) / ssg_total AS pct_urls_ssg,
total,
COUNT(DISTINCT url) / total AS pct_urls
COUNT(DISTINCT url) / total AS pct_urls_total
FROM
ssg
JOIN
Expand All @@ -51,13 +84,21 @@ USING (client, url)
JOIN
totals
USING (client)
JOIN
total_ssg_app
USING (client, ssg_app)
JOIN
total_ssg
USING (client)
GROUP BY
client,
ssg_app,
ssg_app_total,
ssg_total,
js_app,
total
ORDER BY
pct_urls DESC,
pct_urls_total DESC,
client,
ssg_app,
js_app
11 changes: 9 additions & 2 deletions sql/2021/jamstack/ranking.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#standardSQL
SELECT
_TABLE_SUFFIX AS client,
rank_grouping,
total_in_rank,
category,
Expand All @@ -8,6 +9,7 @@ SELECT
COUNT(0) / total_in_rank AS pct_pages_with_app
FROM (
SELECT
_TABLE_SUFFIX,
app,
category,
url
Expand All @@ -20,16 +22,18 @@ FROM (
)
LEFT OUTER JOIN (
SELECT
_TABLE_SUFFIX,
url,
rank_grouping
FROM
`httparchive.summary_pages.2021_07_01_*`,
UNNEST([1000, 10000, 100000, 1000000, 10000000]) AS rank_grouping
WHERE
rank <= rank_grouping
) USING (url)
) USING (_TABLE_SUFFIX, url)
JOIN (
SELECT
_TABLE_SUFFIX,
rank_grouping,
COUNT(0) AS total_in_rank
FROM
Expand All @@ -38,13 +42,16 @@ JOIN (
WHERE
rank <= rank_grouping
GROUP BY
_TABLE_SUFFIX,
rank_grouping
) USING (rank_grouping)
) USING (_TABLE_SUFFIX, rank_grouping)
GROUP BY
client,
rank_grouping,
total_in_rank,
category,
app
ORDER BY
pct_pages_with_app DESC,
app,
rank_grouping
27 changes: 27 additions & 0 deletions src/config/2021.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,13 @@
"title": "Ecommerce",
"slug": "ecommerce",
"todo": "true"
},
{
"part": "III",
"chapter_number": "17",
"title": "Jamstack",
"slug": "jamstack",
"hero_dir": "2020"
}
]
},
Expand Down Expand Up @@ -240,6 +247,16 @@
"github": "alankent",
"twitter": "akent99"
},
"Dawntraoz": {
"name": "Alba Silvente Fuentes",
"teams": [
"reviewers"
],
"avatar_url": "https://avatars.githubusercontent.com/u/36744484?v=4&s=200",
"website": "https://www.dawntraoz.com/",
"github": "Dawntraoz",
"twitter": "dawntraoz"
},
"AlexLakatos": {
"name": "Alex Lakatos",
"teams": [
Expand Down Expand Up @@ -1154,6 +1171,16 @@
"github": "simonhearne",
"twitter": "simonhearne"
},
"thomkrupa": {
"name": "Thom Krupa",
"teams": [
"reviewers"
],
"avatar_url": "https://avatars.githubusercontent.com/u/8614811?v=4&s=200",
"website": "https://www.thomkrupa.com/",
"github": "thomkrupa",
"twitter": "thomkrupa"
},
"tomayac": {
"name": "Thomas Steiner",
"teams": [
Expand Down
Loading

0 comments on commit 2e27c72

Please sign in to comment.