From 709d80b9985c0a02c48abb911a1ada93034542fe Mon Sep 17 00:00:00 2001 From: Alexander zur Bonsen Date: Fri, 16 May 2025 10:37:01 +0200 Subject: [PATCH] chore: clarify the definition of dataReloadRatio The SWD model defines the dataCacheRatio which is the complement of the dataReloadRatio, i.e. 1 - dataCacheRatio. Clarify that in the description. Signed-off-by: Alexander zur Bonsen --- src/docs/co2js/methods.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/docs/co2js/methods.md b/src/docs/co2js/methods.md index e20d85f..8b00154 100644 --- a/src/docs/co2js/methods.md +++ b/src/docs/co2js/methods.md @@ -134,7 +134,7 @@ The `perVisitTrace()` function accepts the following parameters: The `options` parameter can contain any of the following keys. These can be used to adjust the values used by the Sustainable Web Design Model's calculation. -- `dataReloadRatio` Optional – a `number` between 0 and 1 representing the percentage of data that is downloaded by return visitors. +- `dataReloadRatio` Optional – a `number` between 0 and 1 representing the percentage of data that is downloaded by return visitors. This is the complement of the data cache ratio from the Sustainable Web Design model, i.e. dataReloadRatio = 1 - dataCacheRatio. - `firstVisitPercentage` Optional – a `number` between 0 and 1 representing the percentage of new visitors. - `returnVisitPercentage` Optional – a `number` between 0 and 1 representing the percentage of returning visitors. - `greenHostingFactor`
Sustainable Web Design Model v4 only
- The portion of hosting services powered by renewable or zero-carbon energy, between 0 and 1. If the `green hosting` boolean above is set to `true` then the `greenHostingFactor` will always be `1`. @@ -173,6 +173,6 @@ The `perVisitTrace()` function returns an object with the following keys: - `dataCenter` – A `number` representing the carbon intensity for this segment (in grams per kilowatt-hour) used in the calculation. - `networks` – A `number` representing the carbon intensity for this segment (in grams per kilowatt-hour) used in the calculation. - `production` - A `number` representing the carbon intensity for this segment (in grams per kilowatt-hour) used in the calculation. - - `dataReloadRatio` – a `number` between 0 and 1 representing the percentage of data that is downloaded by return visitors. + - `dataReloadRatio` – a `number` between 0 and 1 representing the percentage of data that is downloaded by return visitors. This is the complement of the data cache ratio from the Sustainable Web Design model, i.e. dataReloadRatio = 1 - dataCacheRatio. - `firstVisitPercentage` – a `number` between 0 and 1 representing the percentage of new visitors. - `returnVisitPercentage` – a `number` between 0 and 1 representing the percentage of returning visitors.