diff --git a/defaults/docs-defaults.yaml b/defaults/docs-defaults.yaml index f04c7cff..2cf7d212 100644 --- a/defaults/docs-defaults.yaml +++ b/defaults/docs-defaults.yaml @@ -6,6 +6,12 @@ defaults: smart-speaker: 160 tablet: 160 tv: 160 + default_audio_power_utilization: + pc: 0.840000000 + phone: 0.360000000 + smart-speaker: 1.000000000 + tablet: 0.360000000 + tv: 0.920000000 default_average_data_kb_per_session_seconds_excluding_ads_by_channel: app: 29.500000000 search: 1.011000000 diff --git a/docs/calculations.mdx b/docs/calculations.mdx index 32bda0db..2db826c5 100644 --- a/docs/calculations.mdx +++ b/docs/calculations.mdx @@ -122,17 +122,17 @@ Native product carousel ### Ad Platform -| Field | Description | -| ----------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `emissions_per_creative_request_per_geo_gco2_per_imp` | Adjusted, allocated emissions per creative request by continent (NAMER, LATAM, EMEA, JAPAC) | -| `usage_emissions_per_bid_request_per_geo_gco2_per_imp` | Adjusted, allocated emissions per bid request by continent (NAMER, LATAM, EMEA, JAPAC) | -| `usage_emissions_per_rtdp_request_per_geo_gco2_per_imp` | Adjusted, allocated emissions per rtdp request by continent (NAMER, LATAM, EMEA, JAPAC) | -| `bidders` | Array of ad platforms that are sent bid requests | -| `real_time_data_providers` | Array of ad platforms that are sent real-time data requests (not propagated) | -| `distribution_rate_by_bidder_by_country` | Traffic shaping data for each bidder by country (eg `'xandr.com', 'US', 0.58`) | -| `average_bid_request_size` | Average size of a client-side bid request | -| `sends_client_side_requests` | Does this platform send client-side bid requests (eg prebid client) | -| `model_quality` | Model quality (1-5) | +| Field | Description | +| ------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `emissions_per_creative_request_per_geo_gco2_per_imp` | Adjusted, allocated emissions per creative request by continent (NAMER, LATAM, EMEA, JAPAC) | +| `usage_emissions_per_bid_request_per_geo_gco2_per_imp` | Adjusted, allocated emissions per bid request by continent (NAMER, LATAM, EMEA, JAPAC) | +| `usage_emissions_per_rtdp_request_per_geo_gco2_per_imp` | Adjusted, allocated emissions per rtdp request by continent (NAMER, LATAM, EMEA, JAPAC) | +| `bidders` | Array of ad platforms that are sent bid requests | +| `real_time_data_providers` | Array of ad platforms that are sent real-time data requests (not propagated) | +| `distribution_rate_by_bidder_by_country` | Traffic shaping data for each bidder by country (eg `'xandr.com', 'US', 0.58`) | +| `average_bid_request_size` | Average size of a client-side bid request | +| `sends_client_side_requests` | Does this platform send client-side bid requests (eg prebid client) | +| `model_quality` | Model quality (1-5) | ### Placement @@ -435,12 +435,6 @@ for platform in [creative_platforms, ad_format.ad_platforms]: ### Creative Delivery - Consumer Device ``` -audio_device_coverage = - device_type == 'smart-speaker' ? 1 : 0 -audio_device_coverage_seconds = - audio_device_coverage x - audio_duration - device_pixels = default_device_width[device_type] x default_device_height[device_type] rendered_width = ad_format.rendered_width_pixels ?? default_device_width[device_type] rendered_height = ad_format.rendered_height_pixels ?? default_device_height[device_type] @@ -453,10 +447,11 @@ time_in_view = creative_time_in_view_seconds ?? default_time_in_view_seconds -device_coverage_seconds = - audio_duration ? - audio_device_coverage_seconds : - visual_device_coverage x time_in_view +if channel == digital-audio : + device_power_utilization == 'smart-speaker' ? 1 : default_audio_power_utilization[device_type] + energy_adjusted_active_seconds = device_power_utilization * audio_duration +else: + energy_adjusted_active_seconds = visual_device_coverage x time_in_view creative_consumer_device_usage_emissions_gco2_per_imp = device_coverage_seconds / 3600 x diff --git a/docs/snippets/defaults_consumer_device.mdx b/docs/snippets/defaults_consumer_device.mdx index 1d893820..3540c721 100644 --- a/docs/snippets/defaults_consumer_device.mdx +++ b/docs/snippets/defaults_consumer_device.mdx @@ -23,4 +23,10 @@ default_device_embodied_emissions_per_second: pc: 0.0132 tablet: 0.0128 tv: 0.00889 +default_audio_power_utilization: + pc: 0.84 + phone: 0.36 + tablet: 0.36 + tv: 0.92 + smart-speaker: 1.0 ``` diff --git a/scope3_methodology/test/test_api.py b/scope3_methodology/test/test_api.py index 60bff4fa..b3792247 100644 --- a/scope3_methodology/test/test_api.py +++ b/scope3_methodology/test/test_api.py @@ -240,7 +240,7 @@ def test_startup(self): ) docs_defs = docs_defaults - self.assertEqual(len(docs_defs), 50) + self.assertEqual(len(docs_defs), 51) def test_get_all_con_networking_connection_device_fixed_defaults(self): """Test get_all_networking_connection_device_defaults returns expected output"""