Parse historical Eurostat GDP and unemployment wording
Match GDP table labels without case sensitivity and accept the observed seasonally-adjusted wording. Add real 2025 announcement excerpts and verify dates, previous values, and rejection of non-GDP tables.
This commit is contained in:
1 parent
2dedaf3127
commit
1b2076a41b
4 files changed
+209
-2
No files matched your search
@@ -307,7 +307,7 @@ def parse_announcement(family: str, body: str) -> Announcement:
|
|||||||
if p is None:
|
if p is None:
|
||||||
raise ValueError("Eurostat GDP 公告缺少季度")
|
raise ValueError("Eurostat GDP 公告缺少季度")
|
||||||
period = period_of(p[1], quarter=True)
|
period = period_of(p[1], quarter=True)
|
||||||
table = next((t for t in s.css("table") if "Growth rates of GDP in volume" in compact(t.xpath("string(.)").get())), None)
|
table = next((t for t in s.css("table") if "growth rates of gdp in volume" in compact(t.xpath("string(.)").get()).lower()), None)
|
||||||
if table is None:
|
if table is None:
|
||||||
raise ValueError("Eurostat 缺少实际 GDP 增长表,不能使用就业增长表")
|
raise ValueError("Eurostat 缺少实际 GDP 增长表,不能使用就业增长表")
|
||||||
row = eurostat_row(table, "Euro area")
|
row = eurostat_row(table, "Euro area")
|
||||||
@@ -316,7 +316,7 @@ def parse_announcement(family: str, body: str) -> Announcement:
|
|||||||
raise ValueError("Eurostat GDP 表格列口径改变")
|
raise ValueError("Eurostat GDP 表格列口径改变")
|
||||||
values = {"gdp_qoq": value(row[count], row[count - 1]), "gdp_yoy": value(row[-1], row[-2])}
|
values = {"gdp_qoq": value(row[count], row[count - 1]), "gdp_yoy": value(row[-1], row[-2])}
|
||||||
else:
|
else:
|
||||||
p = re.search(r"In ([A-Z][a-z]+ 20\d\d), the euro area seasonally adjusted unemployment rate was\s*(" + N + r")%", text)
|
p = re.search(r"In ([A-Z][a-z]+ 20\d\d), the euro area seasonally[- ]adjusted unemployment rate was\s*(" + N + r")%", text)
|
||||||
if p is None:
|
if p is None:
|
||||||
raise ValueError("Eurostat 公告未识别到欧元区季调失业率")
|
raise ValueError("Eurostat 公告未识别到欧元区季调失业率")
|
||||||
period = period_of(p[1])
|
period = period_of(p[1])
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
<!-- 来源:https://ec.europa.eu/eurostat/en/web/products-euro-indicators/w/2-30012025-ap;保留正式日期、标题、导语及欧元区表头和数值行。 -->
|
||||||
|
<html><head>
|
||||||
|
<meta property="article:published_time" content="2025-01-30T10:00:00Z">
|
||||||
|
</head><body>
|
||||||
|
<h1 class="ecl-page-header__title ecl-u-mt-none ecl-u-mb-l ">
|
||||||
|
GDP stable in the euro area and up by 0.1% in the EU
|
||||||
|
</h1>
|
||||||
|
<div class="ecl-page-header__info">
|
||||||
|
<span class="ecl-label ecl-label--highlight ecl-u-mb-m ecl-u-mt-m ecl-u-mt-m-none">Preliminary flash estimate for the fourth quarter of 2024</span>
|
||||||
|
</div>
|
||||||
|
<main class="component-euind-content">
|
||||||
|
<p marginleft="0">In the fourth quarter of 2024, seasonally adjusted GDP remained stable in the <strong>euro area</strong> and increased by 0.1% in the <strong>EU</strong>, compared with the previous quarter, according to a preliminary flash estimate published by <strong>Eurostat, the statistical office of the European Union</strong>. In the third quarter of 2024, GDP had grown by 0.4% in both areas.</p>
|
||||||
|
<table>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th colspan="9" data-colwidth="92,71,71,71,71,71,71,71,71" rowspan="1" class="title numeric"><p marginleft="0">Published growth rates of GDP in volume up to 2024Q4 </p><p marginleft="0">(based on seasonally adjusted* data)</p></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th colspan="1" data-colwidth="92" rowspan="1" class="datalabel numeric"><p marginleft="0"></p></th>
|
||||||
|
<th colspan="4" data-colwidth="71,71,71,71" rowspan="1" class="datalabel border-right"><p marginleft="0"><strong>Percentage change compared with the previous quarter</strong></p></th>
|
||||||
|
<th colspan="4" data-colwidth="71,71,71,71" rowspan="1" class="datalabel numeric"><p marginleft="0"><strong>Percentage change compared with the same quarter of the previous year</strong></p></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th colspan="1" data-colwidth="92" rowspan="1" class="datalabel numeric"><p marginleft="0"></p></th>
|
||||||
|
<th colspan="1" data-colwidth="71" rowspan="1" class="datalabel"><p marginleft="0"><strong>2024Q1</strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="71" rowspan="1" class="datalabel"><p marginleft="0"><strong>2024Q2</strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="71" rowspan="1" class="datalabel"><p marginleft="0"><strong>2024Q3</strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="71" rowspan="1" class="datalabel border-right"><p marginleft="0"><strong>2024Q4</strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="71" rowspan="1" class="datalabel"><p marginleft="0"><strong>2024Q1</strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="71" rowspan="1" class="datalabel"><p marginleft="0"><strong>2024Q2</strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="71" rowspan="1" class="datalabel"><p marginleft="0"><strong>2024Q3</strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="71" rowspan="1" class="datalabel numeric"><p marginleft="0"><strong>2024Q4</strong></p></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th colspan="1" data-colwidth="92" rowspan="1" class="datalabel highlight numeric"><p marginleft="0"><strong>Euro area</strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="71" rowspan="1" class="datalabel highlight"><p marginleft="0">0.3</p></th>
|
||||||
|
<th colspan="1" data-colwidth="71" rowspan="1" class="highlight"><p marginleft="0">0.2</p></th>
|
||||||
|
<th colspan="1" data-colwidth="71" rowspan="1" class="highlight"><p marginleft="0">0.4</p></th>
|
||||||
|
<th colspan="1" data-colwidth="71" rowspan="1" class="border-right highlight"><p marginleft="0"><strong>0.0</strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="71" rowspan="1" class="highlight"><p marginleft="0">0.4</p></th>
|
||||||
|
<th colspan="1" data-colwidth="71" rowspan="1" class="highlight"><p marginleft="0">0.5</p></th>
|
||||||
|
<th colspan="1" data-colwidth="71" rowspan="1" class="highlight"><p marginleft="0">0.9</p></th>
|
||||||
|
<th colspan="1" data-colwidth="71" rowspan="1" class="highlight numeric"><p marginleft="0"><strong>0.9</strong></p></th>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</main></body></html>
|
||||||
+142
@@ -0,0 +1,142 @@
|
|||||||
|
<!-- 来源:https://ec.europa.eu/eurostat/en/web/products-euro-indicators/w/3-07012025-bp;保留正式日期、标题、导语及欧元区表头和数值行。 -->
|
||||||
|
<html><head>
|
||||||
|
<meta property="article:published_time" content="2025-01-07T10:00:00Z">
|
||||||
|
</head><body>
|
||||||
|
<h1 class="ecl-page-header__title ecl-u-mt-none ecl-u-mb-l ">
|
||||||
|
Euro area unemployment at 6.3%
|
||||||
|
</h1>
|
||||||
|
<div class="ecl-page-header__info">
|
||||||
|
<span class="ecl-label ecl-label--highlight ecl-u-mb-m ecl-u-mt-m ecl-u-mt-m-none">November 2024</span>
|
||||||
|
</div>
|
||||||
|
<main class="component-euind-content">
|
||||||
|
<p marginleft="0">In November 2024, the <strong>euro area</strong> seasonally-adjusted unemployment rate was 6.3%, stable compared with October 2024 and down from 6.5% in November 2023. The <strong>EU</strong> unemployment rate was 5.9% in November 2024, also stable compared with October 2024 and down from 6.1% in November 2023. These figures are published by <strong>Eurostat, the statistical office of the European Union</strong>.</p>
|
||||||
|
<table>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th colspan="11" data-colwidth="112,64,64,64,64,61,70,64,64,64,64" rowspan="1" class="title numeric"><p marginleft="0">Seasonally adjusted unemployment, totals</p></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th colspan="1" data-colwidth="112" rowspan="3" class="datalabel border-right"><p marginleft="0"></p></th>
|
||||||
|
<th colspan="5" data-colwidth="64,64,64,64,61" rowspan="1" class="datalabel numeric border-right"><p marginleft="0"><strong><span>Rates (%)</span></strong></p></th>
|
||||||
|
<th colspan="5" data-colwidth="70,64,64,64,64" rowspan="1" class="datalabel numeric"><p marginleft="0"><strong><span>Number of persons (in thousands)</span></strong></p></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric border-right"><p marginleft="0"><strong>2023</strong></p></th>
|
||||||
|
<th colspan="4" data-colwidth="64,64,64,61" rowspan="1" class="datalabel numeric border-right"><p marginleft="0"><strong>2024</strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="70" rowspan="1" class="datalabel numeric border-right"><p marginleft="0"><strong>2023</strong></p></th>
|
||||||
|
<th colspan="4" data-colwidth="64,64,64,64" rowspan="1" class="datalabel numeric"><p marginleft="0"><strong>2024</strong></p></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric datalabel border-right"><p marginleft="0"><strong>Nov</strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric datalabel"><p marginleft="0"><strong>Aug</strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric datalabel"><p marginleft="0"><strong><span>Sep</span></strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric datalabel"><p marginleft="0"><strong><span>Oct</span></strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="61" rowspan="1" class="datalabel numeric datalabel border-right"><p marginleft="0"><strong><span>Nov</span></strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="70" rowspan="1" class="datalabel numeric datalabel border-right"><p marginleft="0"><strong>Nov</strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric datalabel"><p marginleft="0"><strong>Aug</strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric datalabel"><p marginleft="0"><strong><span>Sep</span></strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric datalabel"><p marginleft="0"><strong><span>Oct</span></strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric datalabel"><p marginleft="0"><strong><span>Nov</span></strong></p></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th colspan="1" data-colwidth="112" rowspan="1" class="vertical-header border-right highlight"><p marginleft="0"><strong><span>Euro area</span></strong></p></th>
|
||||||
|
<td colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric datalabel border-right highlight"><p marginleft="0">6.5</p></td>
|
||||||
|
<td colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric datalabel highlight"><p marginleft="0">6.3</p></td>
|
||||||
|
<td colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric datalabel highlight"><p marginleft="0"><span>6.3</span></p></td>
|
||||||
|
<td colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric datalabel highlight"><p marginleft="0"><span>6.3</span></p></td>
|
||||||
|
<td colspan="1" data-colwidth="61" rowspan="1" class="datalabel numeric datalabel border-right highlight"><p marginleft="0"><strong><span>6.3</span></strong></p></td>
|
||||||
|
<td colspan="1" data-colwidth="70" rowspan="1" class="datalabel numeric datalabel border-right highlight"><p marginleft="0"><span>11 152</span></p></td>
|
||||||
|
<td colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric datalabel highlight"><p marginleft="0"><span>10 850</span></p></td>
|
||||||
|
<td colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric datalabel highlight"><p marginleft="0"><span>10 862</span></p></td>
|
||||||
|
<td colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric datalabel highlight"><p marginleft="0"><span>10 858</span></p></td>
|
||||||
|
<td colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric datalabel highlight"><p marginleft="0"><strong><span>10 819</span></strong></p></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<table>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th colspan="11" data-colwidth="111,64,64,64,64,64,64,64,64,64,64" rowspan="1" class="title numeric"><p marginleft="0">Seasonally adjusted youth (under 25s) unemployment</p></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th colspan="1" data-colwidth="111" rowspan="3" class="datalabel border-right"><p marginleft="0"></p></th>
|
||||||
|
<th colspan="5" data-colwidth="64,64,64,64,64" rowspan="1" class="datalabel numeric border-right"><p marginleft="0"><strong><span>Rates (%)</span></strong></p></th>
|
||||||
|
<th colspan="5" data-colwidth="64,64,64,64,64" rowspan="1" class="datalabel numeric"><p marginleft="0"><strong><span>Number of persons (in thousands)</span></strong></p></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric border-right"><p marginleft="0"><strong>2023</strong></p></th>
|
||||||
|
<th colspan="4" data-colwidth="64,64,64,64" rowspan="1" class="datalabel numeric border-right"><p marginleft="0"><strong>2024</strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric border-right"><p marginleft="0"><strong>2023</strong></p></th>
|
||||||
|
<th colspan="4" data-colwidth="64,64,64,64" rowspan="1" class="datalabel numeric"><p marginleft="0"><strong>2024</strong></p></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric datalabel border-right"><p marginleft="0"><strong><span>Nov</span></strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric datalabel"><p marginleft="0"><strong><span>Aug</span></strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric datalabel"><p marginleft="0"><strong><span>Sep</span></strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric datalabel"><p marginleft="0"><strong><span>Oct</span></strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric datalabel border-right"><p marginleft="0"><strong><span>Nov</span></strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric datalabel border-right"><p marginleft="0"><strong><span>Nov</span></strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric datalabel"><p marginleft="0"><strong><span>Aug</span></strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric datalabel"><p marginleft="0"><strong><span>Sep</span></strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric datalabel"><p marginleft="0"><strong><span>Oct</span></strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric datalabel"><p marginleft="0"><strong><span>Nov</span></strong></p></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th colspan="1" data-colwidth="111" rowspan="1" class="border-right vertical-header highlight"><p marginleft="0"><strong><span>Euro area</span></strong></p></th>
|
||||||
|
<td colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric datalabel border-right highlight"><p marginleft="0"><span>14.6</span></p></td>
|
||||||
|
<td colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric datalabel highlight"><p marginleft="0"><span>14.9</span></p></td>
|
||||||
|
<td colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric datalabel highlight"><p marginleft="0"><span>14.9</span></p></td>
|
||||||
|
<td colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric datalabel highlight"><p marginleft="0"><span>15.0</span></p></td>
|
||||||
|
<td colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric datalabel border-right highlight"><p marginleft="0"><strong><span>15.0</span></strong></p></td>
|
||||||
|
<td colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric datalabel border-right highlight"><p marginleft="0"><span>2 322</span></p></td>
|
||||||
|
<td colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric datalabel highlight"><p marginleft="0"><span>2 384</span></p></td>
|
||||||
|
<td colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric datalabel highlight"><p marginleft="0"><span>2 390</span></p></td>
|
||||||
|
<td colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric datalabel highlight"><p marginleft="0"><span>2 421</span></p></td>
|
||||||
|
<td colspan="1" data-colwidth="64" rowspan="1" class="datalabel numeric datalabel highlight"><p marginleft="0"><strong><span>2 423</span></strong></p></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<table>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th colspan="11" data-colwidth="111,66,66,66,66,66,66,65,65,66,65" rowspan="1" class="title numeric"><p marginleft="0">Seasonally adjusted unemployment rates (%), by sex</p></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th colspan="1" data-colwidth="111" rowspan="3" class="datalabel border-right"><p marginleft="0"></p></th>
|
||||||
|
<th colspan="5" data-colwidth="66,66,66,66,66" rowspan="1" class="datalabel numeric border-right"><p marginleft="0"><strong><span>Males</span></strong></p></th>
|
||||||
|
<th colspan="5" data-colwidth="66,65,65,66,65" rowspan="1" class="datalabel numeric"><p marginleft="0"><strong><span>Females</span></strong></p></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th colspan="1" data-colwidth="66" rowspan="1" class="datalabel numeric border-right"><p marginleft="0"><strong>2023</strong></p></th>
|
||||||
|
<th colspan="4" data-colwidth="66,66,66,66" rowspan="1" class="datalabel numeric border-right"><p marginleft="0"><strong>2024</strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="66" rowspan="1" class="datalabel numeric border-right"><p marginleft="0"><strong>2023</strong></p></th>
|
||||||
|
<th colspan="4" data-colwidth="65,65,66,65" rowspan="1" class="datalabel numeric"><p marginleft="0"><strong>2024</strong></p></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th colspan="1" data-colwidth="66" rowspan="1" class="datalabel numeric datalabel border-right"><p marginleft="9"><strong>Nov</strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="66" rowspan="1" class="datalabel numeric datalabel"><p marginleft="9"><strong>Aug</strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="66" rowspan="1" class="datalabel numeric datalabel"><p marginleft="9"><strong>Sep</strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="66" rowspan="1" class="datalabel numeric datalabel"><p marginleft="9"><strong>Oct</strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="66" rowspan="1" class="datalabel numeric datalabel border-right"><p marginleft="9"><strong>Nov</strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="66" rowspan="1" class="datalabel numeric datalabel border-right"><p marginleft="9"><strong>Nov</strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="65" rowspan="1" class="datalabel numeric datalabel"><p marginleft="9"><strong>Aug</strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="65" rowspan="1" class="datalabel numeric datalabel"><p marginleft="9"><strong>Sep</strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="66" rowspan="1" class="datalabel numeric datalabel"><p marginleft="9"><strong>Oct</strong></p></th>
|
||||||
|
<th colspan="1" data-colwidth="65" rowspan="1" class="datalabel numeric datalabel"><p marginleft="9"><strong>Nov</strong></p></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th colspan="1" data-colwidth="111" rowspan="1" class="vertical-header highlight border-right"><p marginleft="0"><strong><span>Euro area</span></strong></p></th>
|
||||||
|
<td colspan="1" data-colwidth="66" rowspan="1" class="datalabel numeric datalabel border-right highlight"><p marginleft="9">6.2</p></td>
|
||||||
|
<td colspan="1" data-colwidth="66" rowspan="1" class="datalabel numeric datalabel highlight"><p marginleft="9">6.2</p></td>
|
||||||
|
<td colspan="1" data-colwidth="66" rowspan="1" class="datalabel numeric datalabel highlight"><p marginleft="9">6.2</p></td>
|
||||||
|
<td colspan="1" data-colwidth="66" rowspan="1" class="datalabel numeric datalabel highlight"><p marginleft="9">6.1</p></td>
|
||||||
|
<td colspan="1" data-colwidth="66" rowspan="1" class="datalabel numeric datalabel border-right highlight"><p marginleft="9"><strong>6.1</strong></p></td>
|
||||||
|
<td colspan="1" data-colwidth="66" rowspan="1" class="datalabel numeric datalabel border-right highlight"><p marginleft="9">6.8</p></td>
|
||||||
|
<td colspan="1" data-colwidth="65" rowspan="1" class="datalabel numeric datalabel highlight"><p marginleft="9">6.5</p></td>
|
||||||
|
<td colspan="1" data-colwidth="65" rowspan="1" class="datalabel numeric datalabel highlight"><p marginleft="9">6.5</p></td>
|
||||||
|
<td colspan="1" data-colwidth="66" rowspan="1" class="datalabel numeric datalabel highlight"><p marginleft="9">6.5</p></td>
|
||||||
|
<td colspan="1" data-colwidth="65" rowspan="1" class="datalabel numeric datalabel highlight"><p marginleft="9"><strong>6.5</strong></p></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</main></body></html>
|
||||||
@@ -25,7 +25,9 @@ def fixture(name):
|
|||||||
("ea_hicp", "ea_cpi", "2026-09", "final", {"hicp_yoy": "3.8", "hicp_mom": "0.6", "core_hicp_yoy": "2.5"}),
|
("ea_hicp", "ea_cpi", "2026-09", "final", {"hicp_yoy": "3.8", "hicp_mom": "0.6", "core_hicp_yoy": "2.5"}),
|
||||||
("ea_hicp", "ea_flash", "2026-09", "flash", {"hicp_yoy": "3.8", "hicp_mom": "0.6", "core_hicp_yoy": "2.5"}),
|
("ea_hicp", "ea_flash", "2026-09", "flash", {"hicp_yoy": "3.8", "hicp_mom": "0.6", "core_hicp_yoy": "2.5"}),
|
||||||
("ea_jobs", "ea_jobs", "2026-08", None, {"ilo_unemployment": "6.4"}),
|
("ea_jobs", "ea_jobs", "2026-08", None, {"ilo_unemployment": "6.4"}),
|
||||||
|
("ea_jobs", "ea_jobs_2025_01", "2024-11", None, {"ilo_unemployment": "6.3"}),
|
||||||
("ea_gdp", "ea_gdp", "2026-Q2", "preliminary", {"gdp_qoq": "0.4", "gdp_yoy": "1"}),
|
("ea_gdp", "ea_gdp", "2026-Q2", "preliminary", {"gdp_qoq": "0.4", "gdp_yoy": "1"}),
|
||||||
|
("ea_gdp", "ea_gdp_2025_01", "2024-Q4", "preliminary", {"gdp_qoq": "0", "gdp_yoy": "0.9"}),
|
||||||
("ea_gdp", "ea_gdp_flash", "2026-Q2", "flash", {"gdp_qoq": "0.4", "gdp_yoy": "1"}),
|
("ea_gdp", "ea_gdp_flash", "2026-Q2", "flash", {"gdp_qoq": "0.4", "gdp_yoy": "1"}),
|
||||||
("ea_gdp", "ea_gdp_final", "2026-Q2", "final", {"gdp_qoq": "0.6", "gdp_yoy": "1.2"}),
|
("ea_gdp", "ea_gdp_final", "2026-Q2", "final", {"gdp_qoq": "0.6", "gdp_yoy": "1.2"}),
|
||||||
("de_cpi", "de_cpi", "2026-09", "final", {"eu_cpi_yoy": "3.3", "eu_cpi_mom": "0.6", "hicp_yoy": "3.3", "hicp_mom": "0.6"}),
|
("de_cpi", "de_cpi", "2026-09", "final", {"eu_cpi_yoy": "3.3", "eu_cpi_mom": "0.6", "hicp_yoy": "3.3", "hicp_mom": "0.6"}),
|
||||||
@@ -61,6 +63,22 @@ def test_monthly_previous_is_previous_month_not_same_month_last_year():
|
|||||||
assert result.values["eu_core_cpi_yoy"]["previous"] == "2.6"
|
assert result.values["eu_core_cpi_yoy"]["previous"] == "2.6"
|
||||||
|
|
||||||
|
|
||||||
|
def test_historical_eurostat_results_preserve_previous_values_and_real_publication_dates():
|
||||||
|
gdp = parse_announcement("ea_gdp", fixture("ea_gdp_2025_01.html"))
|
||||||
|
assert gdp.at == datetime(2025, 1, 30, 10, tzinfo=UTC)
|
||||||
|
assert gdp.values["gdp_qoq"]["previous"] == "0.4"
|
||||||
|
assert gdp.values["gdp_yoy"]["previous"] == "0.9"
|
||||||
|
jobs = parse_announcement("ea_jobs", fixture("ea_jobs_2025_01.html"))
|
||||||
|
assert jobs.at == datetime(2025, 1, 7, 10, tzinfo=UTC)
|
||||||
|
assert jobs.values["ilo_unemployment"]["previous"] == "6.3"
|
||||||
|
|
||||||
|
|
||||||
|
def test_eurostat_gdp_does_not_take_an_employment_table_when_the_gdp_table_is_missing():
|
||||||
|
body = fixture("ea_gdp_2025_01.html").replace("growth rates of GDP in volume", "growth rates of employment")
|
||||||
|
with pytest.raises(ValueError, match="GDP 增长表"):
|
||||||
|
parse_announcement("ea_gdp", body)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("period,expected", [("December 2024 to February 2025", "2025-02"),
|
@pytest.mark.parametrize("period,expected", [("December 2024 to February 2025", "2025-02"),
|
||||||
("December 2025 to February 2026", "2026-02"),
|
("December 2025 to February 2026", "2026-02"),
|
||||||
("June to August 2026", "2026-08")])
|
("June to August 2026", "2026-08")])
|
||||||
|
|||||||
Reference in new issue
Block a user