Skip to content

Commit

Permalink
Copyedit of Fonts 2020 chapter (#1816)
Browse files Browse the repository at this point in the history
* Icopyedit of Fonts 2020 Chapter

* Further edits

* Add editor

* Add back unedited flag for now
  • Loading branch information
tunetheweb authored Dec 22, 2020
1 parent 660e427 commit 0f56105
Show file tree
Hide file tree
Showing 9 changed files with 124 additions and 57 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#standardSQL
#local_vs_host_with_fcp
#self_hosted_vs_hosted_with_fcp
SELECT
client,
CASE
WHEN pct_locally_hosted = 1 THEN 'local'
WHEN pct_locally_hosted = 0 THEN 'external'
WHEN pct_self_hosted_hosted = 1 THEN 'self-hosted'
WHEN pct_self_hosted_hosted = 0 THEN 'external'
ELSE 'both' END
AS font_host,
COUNT(DISTINCT page) AS pages,
Expand All @@ -16,7 +16,7 @@ FROM (
SELECT
client,
page,
COUNTIF(NET.HOST(page) = NET.HOST(url)) / COUNT(0) AS pct_locally_hosted
COUNTIF(NET.HOST(page) = NET.HOST(url)) / COUNT(0) AS pct_self_hosted_hosted
FROM
`httparchive.almanac.requests`
WHERE
Expand Down
17 changes: 13 additions & 4 deletions sql/2020/04_Fonts/04_14a.variable_font_comparison_fcp.sql
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,33 @@ FROM (
FROM
`httparchive.almanac.requests`
WHERE
date = '2020-09-01'
date = '2020-09-01'
GROUP BY
client,
page)
JOIN (
SELECT
_TABLE_SUFFIX AS client,
url AS page,
COUNT(0) AS total,
CAST(JSON_EXTRACT_SCALAR(payload, "$['_chromeUserTiming.firstContentfulPaint']") AS INT64) AS fcp,
CAST(JSON_EXTRACT_SCALAR(payload, "$['_chromeUserTiming.LargestContentfulPaint']") AS INT64) AS lcp,
FROM
`httparchive.pages.2020_09_01_*`
GROUP BY
_TABLE_SUFFIX, url, payload )
_TABLE_SUFFIX, url, payload )
USING
(client, page)
JOIN (
SELECT
_TABLE_SUFFIX AS client,
COUNT(0) AS total
FROM
`httparchive.pages.2020_09_01_*`
GROUP BY
_TABLE_SUFFIX )
USING
(client)
GROUP BY
client,
total,
uses_variable_fonts
uses_variable_fonts
156 changes: 107 additions & 49 deletions src/content/en/2020/fonts.md

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0f56105

Please sign in to comment.