Seasonally adjusted government deficit at 4.1% of GDP in the euro area and 4.0% in the EU (2024)

Euro indicators 22 April 2024 Next release: 22 July 2024

Fourth quarter of 2023

Skip to the content

Euro area and EU deficits increase compared to the third quarter of 2023

Overview

In the fourth quarter of 2023, the seasonally adjusted general government deficit to GDP ratio stood at 4.1% in the euro area (EA20) and 4.0% in the EU. In the fourth quarter of 2023, the euro area and EU deficit to GDP ratios increased compared to 3.6% and 3.5% in the third quarter of 2023.

These data are released by Eurostat, the statistical office of the European Union.

Seasonally adjusted* government revenue, expenditure and surplus / deficit
in the euro area and EU (% of GDP)

(% of GDP)

2021Q4

2022Q1

2022Q2

2022Q3

2022Q4

2023Q1

2023Q2

2023Q3

2023Q4

Euro area

surplus (+) / deficit (-)

-3.6

-2.7

-2.6

-4.0

-5.3

-3.2

-3.5

-3.6

-4.1

total revenue

47.9

47.2

47.1

47.0

46.7

46.3

46.2

46.7

46.6

total expenditure

51.5

49.9

49.7

51.0

52.0

49.5

49.7

50.2

50.7

EU

surplus (+) / deficit (-)

-3.4

-2.4

-2.3

-3.8

-5.0

-3.0

-3.4

-3.5

-4.0

total revenue

47.2

46.7

46.6

46.3

46.1

45.6

45.7

46.2

46.2

total expenditure

50.6

49.1

48.8

50.0

51.1

48.6

49.2

49.7

50.2

* Calendar day and seasonally adjusted

Data are a combination of national and Eurostat estimates.

Seasonally adjusted government deficit at 4.1% of GDP in the euro area and 4.0% in the EU (1)

Seasonally adjusted government revenue and expenditure for the euro area and EU

In the fourth quarter of 2023, government total revenue in the euro area amounted to 46.6% of GDP. A decrease compared with 46.7% in the third quarter of 2023 was due to an increase of seasonally adjusted government total revenue in absolute terms as well as a comparatively stronger increase in nominal GDP. In absolute terms, seasonally adjusted total revenue in the euro area increased by around €21 billion compared with the third quarter of 2023. Government total expenditure in the euro area stood at 50.7% of GDP, an increase in the ratio compared with 50.2% in the previous quarter, due to an increase in seasonally adjusted total government expenditure by around €42 billion.

In the EU, government total revenue was 46.2% of GDP in the fourth quarter of 2023, unchanged compared to the previous quarter. Seasonally adjusted total revenue in the EU increased by around €30 billion compared with the third quarter of 2023. Government total expenditure in the EU was 50.2% of GDP, an increase compared with 49.7% of GDP in the previous quarter. Seasonally adjusted total expenditure increased by around €54 billion compared with the previous quarter.

Seasonally adjusted government deficit at 4.1% of GDP in the euro area and 4.0% in the EU (2)

Tables

Seasonally adjusted* general government surplus (+) / deficit (-)

% of GDP

2021Q4

2022Q1

2022Q2

2022Q3

2022Q4

2023Q1

2023Q2

2023Q3

2023Q4

Euro area

-3.6

-2.7

-2.6

-4.0

-5.3

-3.2

-3.5

-3.6

-4.1

EU

-3.4

-2.4

-2.3

-3.8

-5.0

-3.0

-3.4

-3.5

-4.0

Belgium

-3.3

-2.2

-4.2

-4.5

-3.4

-4.1

-4.1

-4.4

-5.2

Bulgaria

-10.6

-3.3

-3.3

-5.3

0.4

-2.7

-3.6

-5.5

3.6

Czechia

-4.0

-2.0

-2.8

-4.5

-3.3

-3.4

-4.4

-3.4

-3.4

Denmark

3.4

3.7

3.6

2.8

3.4

3.9

3.2

3.1

2.6

Germany

-3.0

-0.4

-1.2

-2.6

-5.7

-2.0

-2.8

-2.0

-3.0

Estonia

0.4

-1.2

0.8

-1.4

-2.0

-2.5

-1.3

-3.6

-6.5

Ireland

0.9

1.1

1.7

2.8

1.1

1.9

1.9

1.5

1.3

Greece

:

:

:

:

:

:

:

:

:

Spain

-4.0

-3.5

-4.6

-4.9

-5.9

-2.7

-4.6

-4.1

-3.1

France

-4.4

-4.7

-3.5

-4.8

-6.1

-5.2

-5.4

-5.7

-5.7

Croatia

0.7

1.2

0.9

0.2

-1.1

-0.4

-0.2

0.1

-1.9

Italy

:

:

:

:

:

:

:

:

:

Cyprus

:

:

:

:

:

:

:

:

:

Latvia

-5.7

-4.0

-4.8

-3.1

-5.6

-3.2

-0.3

-3.9

-1.8

Lithuania

1.1

0.7

0.5

-0.8

-2.8

-1.8

-0.3

0.1

-1.3

Luxembourg

1.6

1.3

-0.1

-0.9

-1.4

-1.1

-0.6

-1.0

-2.1

Hungary

-6.0

-3.8

-4.4

-7.4

-9.1

-9.9

-5.7

-5.4

-5.9

Malta

-6.9

-6.2

-3.3

-5.1

-6.5

-2.7

-3.3

-3.1

-9.4

Netherlands

-0.8

-0.2

1.0

-1.2

0.0

-1.1

-0.1

-0.1

0.0

Austria

-2.1

-3.4

0.0

-5.2

-4.4

-2.2

-1.7

-4.7

-2.0

Poland

-2.8

-0.9

-1.3

-3.4

-7.7

-2.4

-4.5

-5.6

-7.4

Portugal

-0.9

0.4

2.7

1.4

-5.5

2.1

2.0

2.4

-1.6

Romania

-7.5

-7.1

-4.1

-7.3

-6.7

-6.7

-7.0

-6.6

-6.4

Slovenia

-4.3

-2.3

-3.2

-3.1

-3.1

-2.6

-2.1

-2.8

-1.3

Slovakia

-5.3

-1.7

-1.7

-1.5

-1.8

-4.3

-4.1

-4.3

-6.8

Finland

-0.1

-2.0

1.1

0.3

-0.9

-1.2

-3.1

-3.2

-3.2

Sweden

0.7

1.3

2.7

0.6

0.1

0.0

-1.0

-0.5

-1.1

Iceland**

-9.6

-0.1

-1.5

-4.4

-7.8

-2.2

-2.1

-1.6

-1.8

Switzerland

0.7

1.0

1.2

1.3

1.4

0.5

0.5

0.5

0.5

* Calendar and seasonally adjusted. EU and euro area data are a combination of national and Eurostat estimates.
** Seasonally adjusted GDP used for the denominator

: Confidential or Eurostat estimate

Source dataset: gov_10q_ggnfa

Seasonally adjusted government deficit at 4.1% of GDP in the euro area and 4.0% in the EU (3)

Seasonally adjusted* general government surplus (+) / deficit (-)

Change on the previous quarter in percentage points of GDP

2022Q1

2022Q2

2022Q3

2022Q4

2023Q1

2023Q2

2023Q3

2023Q4

Euro area

0.9

0.1

-1.4

-1.3

2.1

-0.4

-0.1

-0.5

EU

1.0

0.1

-1.5

-1.2

2.0

-0.5

-0.1

-0.5

Belgium

1.1

-1.9

-0.3

1.0

-0.7

0.0

-0.3

-0.9

Bulgaria

7.3

-0.1

-2.0

5.7

-3.1

-0.8

-1.9

9.1

Czechia

2.0

-0.9

-1.6

1.2

-0.1

-1.0

1.0

0.1

Denmark

0.3

-0.1

-0.8

0.6

0.5

-0.7

-0.1

-0.5

Germany

2.6

-0.7

-1.4

-3.1

3.8

-0.9

0.8

-1.0

Estonia

-1.6

2.0

-2.2

-0.6

-0.5

1.2

-2.3

-3.0

Ireland

0.2

0.6

1.1

-1.7

0.8

-0.1

-0.4

-0.2

Greece

:

:

:

:

:

:

:

:

Spain

0.5

-1.1

-0.4

-1.0

3.1

-1.9

0.5

1.1

France

-0.3

1.1

-1.3

-1.3

0.9

-0.2

-0.3

0.0

Croatia

0.5

-0.3

-0.8

-1.2

0.7

0.2

0.3

-2.0

Italy

:

:

:

:

:

:

:

:

Cyprus

:

:

:

:

:

:

:

:

Latvia

1.7

-0.8

1.7

-2.5

2.4

2.9

-3.6

2.0

Lithuania

-0.4

-0.1

-1.3

-2.0

1.0

1.4

0.4

-1.3

Luxembourg

-0.3

-1.4

-0.7

-0.5

0.3

0.5

-0.5

-1.1

Hungary

2.2

-0.6

-3.0

-1.7

-0.9

4.2

0.3

-0.6

Malta

0.6

2.9

-1.8

-1.4

3.7

-0.5

0.1

-6.2

Netherlands

0.6

1.1

-2.2

1.2

-1.1

1.0

0.0

0.1

Austria

-1.3

3.4

-5.2

0.8

2.2

0.6

-3.1

2.8

Poland

1.9

-0.4

-2.1

-4.3

5.3

-2.1

-1.1

-1.8

Portugal

1.2

2.3

-1.2

-6.9

7.6

-0.1

0.4

-4.0

Romania

0.3

3.0

-3.2

0.6

0.0

-0.3

0.4

0.1

Slovenia

1.9

-0.9

0.0

0.0

0.5

0.5

-0.6

1.5

Slovakia

3.5

0.1

0.2

-0.3

-2.5

0.2

-0.3

-2.4

Finland

-1.9

3.1

-0.8

-1.2

-0.3

-1.9

-0.1

0.0

Sweden

0.6

1.5

-2.1

-0.5

-0.2

-0.9

0.5

-0.6

Iceland**

9.5

-1.4

-2.9

-3.4

5.6

0.1

0.5

-0.2

Switzerland

0.3

0.2

0.1

0.1

-0.8

0.0

0.0

0.0

* Calendar and seasonally adjusted. EU and euro area data are a combination of national and Eurostat estimates.
** Seasonally adjusted GDP used for the denominator

: Confidential or Eurostat estimate

Source dataset: gov_10q_ggnfa

Seasonally adjusted government deficit at 4.1% of GDP in the euro area and 4.0% in the EU (4)

Non-seasonally adjusted general government surplus (+) / deficit (-)

% of GDP

2021Q4

2022Q1

2022Q2

2022Q3

2022Q4

2023Q1

2023Q2

2023Q3

2023Q4

Euro area

-2.7

-4.1

-2.3

-3.8

-4.5

-4.5

-3.2

-3.4

-3.3

EU

-3.0

-3.6

-1.7

-3.4

-4.7

-4.1

-2.9

-3.3

-3.7

Belgium

0.2

-7.0

0.1

-7.9

0.0

-8.4

0.5

-7.9

-2.3

Bulgaria

-17.4

-1.8

-1.5

-1.6

-6.0

-1.4

-1.7

-2.0

-2.3

Czechia

-6.0

-4.1

0.2

-3.2

-5.5

-6.3

-0.6

-2.2

-5.6

Denmark

2.3

3.2

4.2

3.4

2.7

4.1

3.8

3.8

0.9

Germany

-3.3

-0.6

0.1

-3.3

-5.9

-2.2

-1.6

-2.9

-3.1

Estonia

-0.6

-3.2

2.2

0.0

-3.0

-4.4

0.2

-2.1

-7.1

Ireland

4.2

-0.2

1.3

1.5

4.0

0.7

1.4

0.0

4.6

Greece

-3.5

-9.4

1.4

-2.2

-0.5

-10.0

1.4

2.3

-1.2

Spain

-8.4

-1.9

-8.5

2.5

-10.3

-1.0

-8.8

2.3

-6.7

France

0.7

-7.5

-4.0

-6.1

-1.7

-7.5

-5.9

-7.1

-1.7

Croatia

-4.8

-0.2

2.7

4.6

-7.2

-1.2

0.9

4.5

-8.1

Italy

-4.6

-12.0

-6.2

-9.7

-6.7

-11.6

-5.5

-7.1

-5.7

Cyprus

-1.1

4.0

-4.5

10.5

0.4

5.4

-4.3

10.3

0.6

Latvia

-13.3

-1.9

-1.9

-0.4

-13.5

-1.0

3.2

-1.5

-9.0

Lithuania

-3.0

0.6

4.6

0.5

-7.6

-1.4

4.1

1.0

-6.8

Luxembourg

-1.3

2.0

2.5

-1.1

-4.5

-0.2

2.1

-1.1

-5.5

Hungary

-10.8

-3.0

-1.6

-5.6

-13.2

-10.8

-3.0

-3.6

-9.7

Malta

-6.6

-8.8

-2.0

-4.0

-7.6

-5.5

-0.5

-1.6

-12.1

Netherlands

-1.6

2.6

0.9

-3.1

-0.6

1.3

0.1

-2.2

-0.6

Austria

-2.7

-5.8

0.3

-3.2

-4.5

-4.3

-1.4

-2.4

-2.6

Poland

-5.4

0.4

-0.7

-2.6

-9.5

-0.9

-3.5

-5.4

-9.8

Portugal

-3.8

-0.6

1.4

6.6

-8.5

1.1

0.7

7.7

-4.7

Romania

-9.4

-9.0

-2.3

-5.4

-8.6

-8.5

-4.9

-4.9

-8.3

Slovenia

-4.2

-3.0

-3.9

-1.0

-4.1

-3.1

-3.0

-1.2

-2.6

Slovakia

-8.4

-1.3

-0.8

0.0

-4.5

-3.8

-3.0

-2.3

-10.1

Finland

-0.5

-1.2

3.6

-2.9

-1.1

-1.1

-0.2

-5.7

-3.7

Sweden

-1.4

0.3

5.8

0.6

-1.9

-1.1

2.0

-0.4

-3.0

Iceland

-8.4

-0.5

-4.0

-4.9

-6.1

-2.2

-4.7

-1.8

0.6

Norway

16.8

23.5

26.0

31.2

20.9

22.7

19.5

11.4

11.6

Switzerland

0.7

1.0

1.2

1.3

1.3

0.5

0.5

0.5

0.5

Source dataset: gov_10q_ggnfa

Seasonally adjusted government deficit at 4.1% of GDP in the euro area and 4.0% in the EU (5)

Non-seasonally adjusted general government surplus (+) / deficit (-)

Change on the previous year's quarter in percentage points of GDP

2022Q4

2023Q1

2023Q2

2023Q3

2023Q4

Euro area

-1.8

-0.4

-1.0

0.4

1.2

EU

-1.7

-0.5

-1.2

0.2

1.0

Belgium

-0.2

-1.4

0.4

-0.1

-2.3

Bulgaria

11.4

0.4

-0.2

-0.4

3.7

Czechia

0.5

-2.2

-0.7

0.9

-0.1

Denmark

0.3

0.9

-0.4

0.4

-1.7

Germany

-2.7

-1.6

-1.7

0.4

2.9

Estonia

-2.4

-1.2

-2.0

-2.1

-4.1

Ireland

-0.1

0.9

0.1

-1.5

0.5

Greece

3.0

-0.7

0.0

4.5

-0.7

Spain

-1.9

0.9

-0.3

-0.1

3.6

France

-2.4

0.0

-1.9

-1.0

-0.1

Croatia

-2.4

-1.0

-1.7

-0.1

-0.9

Italy

-2.0

0.4

0.8

2.6

1.0

Cyprus

1.5

1.3

0.2

-0.1

0.2

Latvia

-0.2

1.0

5.0

-1.1

4.4

Lithuania

-4.7

-2.0

-0.5

0.5

0.8

Luxembourg

-3.2

-2.3

-0.4

-0.1

-1.0

Hungary

-2.3

-7.8

-1.4

2.0

3.5

Malta

-1.0

3.3

1.5

2.4

-4.5

Netherlands

1.0

-1.3

-0.7

0.9

0.1

Austria

-1.8

1.4

-1.7

0.8

2.0

Poland

-4.1

-1.3

-2.8

-2.8

-0.3

Portugal

-4.7

1.7

-0.7

1.1

3.8

Romania

0.7

0.5

-2.6

0.5

0.3

Slovenia

0.1

-0.2

0.9

-0.2

1.6

Slovakia

3.9

-2.6

-2.2

-2.3

-5.7

Finland

-0.5

0.1

-3.8

-2.8

-2.6

Sweden

-0.4

-1.4

-3.8

-1.0

-1.1

Iceland

2.3

-1.7

-0.7

3.1

6.7

Norway

4.2

-0.9

-6.5

-19.7

-9.4

Switzerland

0.7

-0.5

-0.6

-0.8

-0.8

Source dataset: gov_10q_ggnfa

Seasonally adjusted government deficit at 4.1% of GDP in the euro area and 4.0% in the EU (6)

Notes for users

Methods and definitions

Data for the euro area and EU aggregates are calendar and seasonally adjusted by Eurostat using an indirect approach (bycountry) for total revenue and total expenditure. Both revenue and expenditure exhibit a clear seasonal pattern. The surplus (+) / deficit (-) is derived indirectly from the above-mentioned transactions. For the ratios to GDP, calendar and seasonally adjusted GDP data are used. Most countries supply Eurostat with their own estimates of calendar and seasonally adjusted data for general government total revenue and total expenditure on a voluntary basis and permit Eurostat to publish these estimates.

Detailed metadata on seasonal adjustment are available in Statistics Explained.

Quarterly non-financial accounts for general government use concepts that are in line with the methodology laid out in the European System of Accounts (ESA 2010) as well as the concept of general government deficit/surplus used in the context of the Excessive Deficit Procedure (EDP). Annual EDP data, last published in April 2024, are the subject of a thorough verification by Eurostat.

Quarterly data on GDP are the most recent ones transmitted by EU Member States. While non-seasonally adjusted quarterly government deficit/surplus figures are consistent with annual figures with the exception of differences due to data updates, differences between the sum of quarterly non-seasonally adjusted data and annual figures may occur for EU and euro area aggregates due to exchange rates effects. Differences between annualised seasonally adjusted data and annual data occur for technical reasons. Differences between quarterly and annual GDP figures also occur, due to differences in data updates.

Differences between the change in total revenue and total expenditure and the change in surplus (+) / deficit (-) are due to rounding, as are differences between data in percentage of GDP and changes in data in percentage points of GDP.

Since the first quarter of 2020, Member States have implemented COVID-19 containment measures. In all quarters of 2022 and 2023, the impact of the measures to mitigate the economic and social impact of the COVID-19 pandemic had a significantly lower impact than in quarters of 2020 and 2021. However, government revenue and expenditure continued to be impacted by the measures undertaken by most Member States to alleviate the impact of increasing energy prices. Country specific explanatory metadata are published.

A full harmonisation of recording practices for measures to alleviate the impact of increasing energy prices was not yet achieved. Revisions in the coming quarters are thus expected to be larger than usual. Data for the first three quarters of 2023 were significantly revised compared to the previous release.

Geographical information

Euro area (EA20): Belgium, Germany, Estonia, Ireland, Greece, Spain, France, Croatia, Italy, Cyprus, Latvia, Lithuania, Luxembourg, Malta, the Netherlands, Austria, Portugal, Slovenia, Slovakia and Finland.

European Union (EU27): Belgium, Bulgaria, Czechia, Denmark, Germany, Estonia, Ireland, Greece, Spain, France, Croatia, Italy, Cyprus, Latvia, Lithuania, Luxembourg, Hungary, Malta, the Netherlands, Austria, Poland, Portugal, Romania, Slovenia, Slovakia, Finland and Sweden.

For more information

  • Eurostat “Statistics Explained” article on quarterly government finance statistics

  • Eurostat database section on quarterly non-financial accounts for general government

  • Further data are available in the “Presentation on integrated government finance statistics

  • ESA 2010: Regulation (EU) No 549/2013 on the European system of national and regional accounts in the European Union

  • Most recent government deficit and debt News Release

  • Eurostat Euro indicators dashboard

  • Eurostat €-indicators release calendar

  • European Statistics Code of Practice

Get in touch

Media requests

Eurostat Media Support

Phone: (+352) 4301 33 408

E-mail: eurostat-mediasupport@ec.europa.eu

Further information on data

Kurt WASS

Laura WAHRIG

Phone: (+352) 4301 37 687

E-mail: estat-stpfs-data@ec.europa.eu

Mihail ANDREEV

Edoardo PIZZOLI

Floris JANSEN

Share component will be rendered here.

'; /** Retrieve the order from the tooltip option */ var sortOrder = option.tooltip.order; /** Sort the 'params' array based on the 'sortOrder' parameter. */ switch (sortOrder) { /** Sort by series name in ascending order. */ case 'seriesAsc': params = params.sort((a, b) => a.seriesName.localeCompare(b.seriesName)); break; /** Sort by series name in descending order. */ case 'seriesDesc': params = params.sort((a, b) => b.seriesName.localeCompare(a.seriesName)); break; /** Sort by numerical value in ascending order. */ case 'valueAsc': params = params.sort((a, b) => parseFloat(a.value) - parseFloat(b.value)); break; /** Sort by numerical value in descending order. */ case 'valueDesc': params = params.sort((a, b) => parseFloat(b.value) - parseFloat(a.value)); break; /** Reverse the current order. */ case 'reverse': params.reverse(); break; default: break; } /** Iterate over each series in the tooltip parameters */ for (var i = 0; i < params.length; i++) { /** Retrieve the name and value of the current series */ var seriesName = params[i].seriesName; var value = params[i].value; /** Replace every specific apostrphe by simple one. */ seriesName = seriesName.replaceAll("’", "'"); /** Convert the numeric value to its string representation. */ var strValue = String(value); /** Retrieve the axis used as value */ var axis = option.yAxis.type === 'value' ? option.yAxis : option.xAxis; /** Initialize the number of decimal places */ var decimals = option.tooltip.decimals; /** Check if decimals configuration is set to default and the value contains decimal places */ if (!decimals && strValue.indexOf('.') > -1) { /** Calculate the number of decimal places */ decimals = strValue.substring(strValue.indexOf('.'), strValue.length - 1).length; } else { /** If there are no decimal places, format the value with 1 decimal place */ decimals = decimals ? decimals : 1; /** Convert the value to a fixed-point notation string with a specified number of decimal places. */ value = Number(value).toFixed(decimals); } /** Convert -0 value to 0 with the specified or calculated number of decimal places.*/ if (Number(value) == -0) { value = (Number(value) + 0).toFixed(decimals); } /** Extract the unit from within the axis label */ var unit = axis.axisLabel.unit ? axis.axisLabel.unit : ''; /** Format the value using the appropriate number of decimal places */ value = isNaN(value) ? 'N/A' : Number(value).toLocaleString(option.lang ? option.lang : 'en', { minimumFractionDigits: decimals }) + unit; /** Retrieve the color of the current series */ const color = params[i].color; /** * Add the series name and value to the tooltip content * Use a circle icon with the series color */ tooltipContent += '

' + '' + '' + '' + seriesName + '' + '' + '' + value + '' + '

'; } /** Close the tooltip content container */ tooltipContent += '

'; /** Return the formatted tooltip content */ return tooltipContent; }}/* * This content is licensed according to the W3C Software License at * https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document * * File: sortable-table.js * * Desc: Adds sorting to a HTML data table that implements ARIA Authoring Practices */'use strict';class SortableTable { constructor(tableNode) { this.tableNode = tableNode; this.columnHeaders = tableNode.querySelectorAll('thead th.sortable'); this.sortColumns = []; for (var i = 0; i < this.columnHeaders.length; i++) { var ch = this.columnHeaders[i]; var buttonNode = ch.querySelector('button'); if (buttonNode) { this.sortColumns.push(i); // buttonNode.setAttribute('data-column-index', i); // buttonNode.addEventListener('click', this.handleClick.bind(this)); ch.setAttribute('data-column-index', i); ch.addEventListener('click', this.handleClick.bind(this)); } } this.optionCheckbox = document.querySelector( 'input[type="checkbox"][value="show-unsorted-icon"]' ); if (this.optionCheckbox) { this.optionCheckbox.addEventListener( 'change', this.handleOptionChange.bind(this) ); if (this.optionCheckbox.checked) { this.tableNode.classList.add('show-unsorted-icon'); } } } setColumnHeaderSort(columnIndex) { if (typeof columnIndex === 'string') { columnIndex = parseInt(columnIndex); } for (var i = 0; i < this.columnHeaders.length; i++) { var ch = this.columnHeaders[i]; var buttonNode = ch.querySelector('button'); if (i === columnIndex) { var value = ch.getAttribute('aria-sort'); if (value === 'ascending') { ch.setAttribute('aria-sort', 'descending'); this.sortColumn( columnIndex, 'descending', ch.classList.contains('num')); } else if (value === 'descending') { ch.removeAttribute('aria-sort'); this.sortColumn( columnIndex, 'initial', true ); } else { ch.setAttribute('aria-sort', 'ascending'); this.sortColumn( columnIndex, 'ascending', ch.classList.contains('num') ); } } else { if (ch.hasAttribute('aria-sort') && buttonNode) { ch.removeAttribute('aria-sort'); } } } } sortColumn(columnIndex, sortValue, isNumber) { function compareValues(a, b) { if (a.value === b.value) return 0; if (sortValue === 'descending') { return isNumber ? b.value - a.value : (a.value > b.value ? -1 : 1); } else { return isNumber ? a.value - b.value : (a.value < b.value ? -1 : 1); } } if (typeof isNumber !== 'boolean') { isNumber = false; } var tbodyNode = this.tableNode.querySelector('tbody'); var rowNodes = []; var dataCells = []; var rowNode = tbodyNode.firstElementChild; var index = 0; while (rowNode) { rowNodes.push(rowNode); var rowCells = rowNode.querySelectorAll('th, td'); var dataCell = rowCells[columnIndex]; var data = {}; data.index = index; if (sortValue !== 'initial') { data.value = dataCell.textContent.toLowerCase().trim(); } else { data.value = rowNode.getAttribute('initial-position').toLowerCase().trim(); } if (isNumber) { data.value = parseFloat(data.value); } dataCells.push(data); rowNode = rowNode.nextElementSibling; index += 1; } dataCells.sort(compareValues); // remove rows while (tbodyNode.firstChild) { tbodyNode.removeChild(tbodyNode.lastChild); } // add sorted rows for (var i = 0; i < dataCells.length; i += 1) { let pos = [dataCells[i].index]; if (sortValue === "initial") { rowNodes[pos].classList.remove("sorted"); } else { rowNodes[pos].classList.add("sorted"); } tbodyNode.appendChild(rowNodes[pos]); } } /* EVENT HANDLERS */ handleClick(event) { var tgt = event.currentTarget; this.setColumnHeaderSort(tgt.getAttribute('data-column-index')); } handleOptionChange(event) { var tgt = event.currentTarget; if (tgt.checked) { this.tableNode.classList.add('show-unsorted-icon'); } else { this.tableNode.classList.remove('show-unsorted-icon'); } }}$(document).ready(function() { load(); });;}());

Subscribe to receive the latest Eurostat Euro indicators releases

Subscribe
Seasonally adjusted government deficit at 4.1% of GDP in the euro area and 4.0% in the EU (2024)
Top Articles
Latest Posts
Article information

Author: Jamar Nader

Last Updated:

Views: 5861

Rating: 4.4 / 5 (75 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Jamar Nader

Birthday: 1995-02-28

Address: Apt. 536 6162 Reichel Greens, Port Zackaryside, CT 22682-9804

Phone: +9958384818317

Job: IT Representative

Hobby: Scrapbooking, Hiking, Hunting, Kite flying, Blacksmithing, Video gaming, Foraging

Introduction: My name is Jamar Nader, I am a fine, shiny, colorful, bright, nice, perfect, curious person who loves writing and wants to share my knowledge and understanding with you.