Skip to content

Commit e0ef018

Browse files
authored
Merge pull request #83 from pbl-nl/NDC_label
Extra info on NDCs in country graphs
2 parents 9d06255 + 7d70138 commit e0ef018

File tree

3 files changed

+35
-6
lines changed

3 files changed

+35
-6
lines changed

src/lib/charts/components/NdcRange.svelte

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
// eslint-disable-next-line @typescript-eslint/no-explicit-any
2626
mouseover: (e?: any) => void;
2727
// eslint-disable-next-line @typescript-eslint/no-explicit-any
28+
mousetextover: (e?: any) => void;
29+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
2830
mouseout: (e?: any) => void;
2931
}
3032
@@ -38,6 +40,7 @@
3840
textNdc,
3941
color = 'black',
4042
mouseover,
43+
mousetextover,
4144
mouseout
4245
}: Props = $props();
4346
@@ -100,6 +103,11 @@
100103
font-size="18px"
101104
font-weight="bold"
102105
class="text-container"
106+
onmouseover={mousetextover}
107+
onfocus={() => mouseover()}
108+
onmouseout={() => mouseout()}
109+
onblur={() => mouseout()}
110+
role="tooltip"
103111
>
104112
{textNdc}
105113
</text>

src/routes/about/+page.svelte

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,14 +228,19 @@
228228
<QA question="What NDC data is shown?">
229229
When NDCs area published by countries, they are often expressed in relative terms (e.g. 30
230230
% reduction in 2030 compared to 1990). The absolute values are calculations that depend on
231-
the historical and baseline emission data used. We use NDC data based on the data we use
232-
for the Carbon Budget Explorer (Jones et al., 2021), which is deduced from
231+
the historical and baseline emission data used.
232+
<br />
233+
We use NDC data deduced from the
233234
<a
234235
href="https://themasites.pbl.nl/o/climate-ndc-policies-tool/"
235236
target="_blank"
236237
rel="noopener noreferrer">PBL NDC tool</a
237-
>, which is based on historical data from PRIMAP. All NDC values are only an indication.
238-
When precise NDC data is needed, it is better to refer to the official NDC documents.
238+
>, which is based on historical data from PRIMAP and includes additional insights from
239+
land use emissions accounting models. Because we analyze all greenhouse gas emissions
240+
including land use, we also convert NDC data to that level.
241+
<br />
242+
All NDC values are only an indication. When precise NDC data is needed, it is better to refer
243+
to the official NDC documents.
239244
</QA>
240245
<QA question="Why are there no NDCs for European Member States?">
241246
European Member States have a joint NDC, which is to reduce GHG emissions by at least 55 %

src/routes/regions/[region]/+page.svelte

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,17 @@
7575
}
7676
return `Nationally determined contribution in ${row.time} ranges from ${row.max.toFixed(
7777
0
78-
)} to ${row.min.toFixed(0)} Mt CO₂e`;
78+
)} to ${row.min.toFixed(0)} Mt CO₂e.`;
7979
});
8080
81+
const hoverTextNdc = function (e: ComponentEvents<SvelteComponent>) {
82+
const myevt = {
83+
e,
84+
msg: 'The NDC data shown here are country reported inventory data based on the most recent NDC submission available in the UNFCCC NDC registry. Read more on the About page.'
85+
};
86+
evt = myevt;
87+
};
88+
8189
function hoverAllocationMethod(id: string) {
8290
return hoverBuilder(
8391
(row) => `${id} in ${row.time} is ${row.mean.toFixed(0)} Mt CO₂e (with default settings)`
@@ -163,6 +171,13 @@
163171
0
164172
)} to ${data.ndcReduction.max.toFixed(0)} % reduction`}
165173
{/if}
174+
{#if !data.isEuMemberState}
175+
<span
176+
class="tooltip tooltip-right text-lg"
177+
data-tip="To calculate reduction numbers from NDC targets, country inventory data are compared to historic emissions, which are affected by uncertainties and varying land use accounting methods. These numbers may therefore differ from those shown in the graph."
178+
>ⓘ</span
179+
>
180+
{/if}
166181
</span>
167182
</p>
168183
</div>
@@ -229,9 +244,10 @@
229244
y1={range[1]}
230245
textNdcMin={`Min: ${range[0].toFixed(0)}`}
231246
textNdcMax={`Max: ${range[1].toFixed(0)}`}
232-
textNdc={`NDC`}
247+
textNdc="NDC"
233248
color="black"
234249
mouseover={hoverNdc}
250+
mousetextover={hoverTextNdc}
235251
mouseout={(e) => (evt = e)}
236252
/>
237253
{/if}

0 commit comments

Comments
 (0)