EU and NATO countries imports of Russian energy (oil, gas, coal) 2021 to 2025
I have gathered the data. Here is the summary of EU and NATO countries' imports of Russian energy (oil, gas, coal) from 2021 onwards.
Key findings
The data come from Eurostat's energy-imports statistics, which report volumes imported by country of origin = Russia for each EU member state (and a few non-EU European countries). Gas is measured in million m³, oil and coal in thousand tonnes. The annual series run through 2024; for 2025 I used the monthly datasets (annual 2025 is not yet published).
EU27 imports of Russian fossil fuels12345
| Year | Natural gas (million m³) | Oil & petroleum products (kt) | Coal / solid fossil fuels (kt) |
|---|---|---|---|
| 2021 | 153,226 | 173,229 | 50,986 |
| 2022 | 83,824 | 132,022 | 28,091 |
| 2023 | 33,403 | 21,404 | 838 |
| 2024 | 37,843 | 15,308 | 241 |
| 2025* | ~28,198 | ~11,707 | n/a |
*2025 derived from monthly data (coal monthly by origin is not published). The collapse is dramatic: by 2024 Russian gas imports were –75% vs 2021, oil –91%, and coal –99.5%, with a further decline in 20256. The trend is illustrated in the charts generated in 6 (EU27 trend) and 7 (EU27 levels and top importers 2021 vs 2024).
Which countries still import Russian energy (2024)76
- Gas: France (7,406), Spain (6,436), Italy (5,696), Hungary (4,064), Belgium (3,445), Greece (3,340), Slovakia (3,089), Netherlands (2,127), Czechia (1,791); Germany, Poland, Bulgaria, Romania, the Baltics etc. fell to zero.
- Oil: Hungary (4,988), Slovakia (4,018), Czechia (2,715), Netherlands (1,579), Poland (1,083), Croatia (296), Bulgaria (233).
- Coal: Germany (138), Austria (67), Bulgaria (24) — essentially phased out elsewhere.
- In 2025, Russian oil imports were concentrated in Slovakia (~4,923 kt), Hungary (~3,762), Netherlands (~1,716), Czechia (~527)6.
NATO vs EU — and the Türkiye exception
Because Eurostat covers EU27 plus only a handful of non‑EU European countries, the NATO aggregate below excludes the United States, United Kingdom and Canada (not reported by Eurostat). Among covered members, Türkiye stands out as the only large NATO importer that did not cut Russian purchases:
| 2021 | 2022 | 2023 | 2024 | 2025* | |
|---|---|---|---|---|---|
| NATO (covered members) – gas | 180,128 | 105,729 | 55,158 | 59,764 | ~49,358 |
| NATO – oil | 184,155 | 152,220 | 47,834 | 49,169 | ~43,759 |
| NATO – coal | 63,711 | 48,003 | 29,235 | 25,396 | n/a |
| Türkiye – gas | 26,343 | 21,575 | 21,340 | 21,572 | ~21,160 |
| Türkiye – oil | 10,961 | 19,968 | 26,423 | 33,859 | ~32,052 |
| Türkiye – coal | 14,083 | 20,734 | 28,630 | 25,221 | n/a |
While EU27 imports of all three fuels collapsed, Türkiye's imports of Russian oil roughly tripled (2021→2024) and its coal imports rose ~80%, keeping the NATO aggregate (excluding US/UK/Canada) well above the EU27 level6.
Caveats
- Annual data cover 2021–2024; 2025 figures are monthly-derived and provisional.
- The monthly gas series uses a different methodology (consignment vs. origin) and gives sharply different country splits (e.g. it shows continued Bulgarian imports), so the 2025 gas figure should be treated as indicative58.
- Eurostat does not report imports for US, UK or Canada, so a complete NATO total cannot be produced fr
- Eurostat dataset: Natural gas imports - annual data
- Eurostat dataset: Oil and petroleum products imports - annual data
- Eurostat dataset: Solid fossil fuels imports
- Eurostat dataset: Oil and petroleum products imports - monthly data
- Eurostat dataset: Natural gas imports - monthly data
- Code Run 1Dataset: nrg_ti_gasm Dataset: nrg_ti_gas
Dataset filters for
nrg_ti_gasmFilter Value(s) partner RU geo DE, BE, CZ, EU27_2020 unit MIO_M3 siec G3000 sinceTimePeriod 2021-01 Dataset filters for
nrg_ti_gasFilter Value(s) partner RU geo DE, BE, CZ, EU27_2020 unit MIO_M3 siec G3000 sinceTimePeriod 2021 Program output
MONTHLY dataset (17) freq values: ['M'] MONTHLY rows for DE: 66 freq siec partner unit geo time value 191 M G3000 RU MIO_M3 DE 2021-01 5231.082 35 M G3000 RU MIO_M3 DE 2021-02 4632.046 18 M G3000 RU MIO_M3 DE 2021-03 5055.982 49 M G3000 RU MIO_M3 DE 2021-04 4885.920 50 M G3000 RU MIO_M3 DE 2021-05 5026.483 246 M G3000 RU MIO_M3 DE 2021-06 4763.817 10 M G3000 RU MIO_M3 DE 2021-07 3269.762 14 M G3000 RU MIO_M3 DE 2021-08 5005.853 219 M G3000 RU MIO_M3 DE 2021-09 4869.683 181 M G3000 RU MIO_M3 DE 2021-10 5012.221 224 M G3000 RU MIO_M3 DE 2021-11 5017.635 253 M G3000 RU MIO_M3 DE 2021-12 5192.534 243 M G3000 RU MIO_M3 DE 2022-01 4771.900 54 M G3000 RU MIO_M3 DE 2022-02 4488.998 136 M G3000 RU MIO_M3 DE 2022-03 4852.934 182 M G3000 RU MIO_M3 DE 2022-04 4819.831 227 M G3000 RU MIO_M3 DE 2022-05 5000.845 242 M G3000 RU MIO_M3 DE 2022-06 3048.891 101 M G3000 RU MIO_M3 DE 2022-07 1196.241 229 M G3000 RU MIO_M3 DE 2022-08 952.901 247 M G3000 RU MIO_M3 DE 2022-09 0.000 164 M G3000 RU MIO_M3 DE 2022-10 0.070 236 M G3000 RU MIO_M3 DE 2022-11 0.000 170 M G3000 RU MIO_M3 DE 2022-12 0.000 135 M G3000 RU MIO_M3 DE 2023-01 0.000 228 M G3000 RU MIO_M3 DE 2023-02 0.000 67 M G3000 RU MIO_M3 DE 2023-03 0.000 140 M G3000 RU MIO_M3 DE 2023-04 0.000 155 M G3000 RU MIO_M3 DE 2023-05 0.000 180 M G3000 RU MIO_M3 DE 2023-06 0.000 ANNUAL dataset (16) freq values: ['A'] freq siec partner unit geo time value 4 A G3000 RU MIO_M3 DE 2022 25941.144 10 A G3000 RU MIO_M3 DE 2024 0.000 13 A G3000 RU MIO_M3 DE 2021 55443.282 15 A G3000 RU MIO_M3 DE 2023 0.000 ANNUAL BE/CZ: freq siec partner unit geo time value 0 A G3000 RU MIO_M3 CZ 2024 1791.029 1 A G3000 RU MIO_M3 CZ 2023 551.475 2 A G3000 RU MIO_M3 CZ 2022 6837.935 3 A G3000 RU MIO_M3 BE 2023 4018.800 5 A G3000 RU MIO_M3 BE 2021 2404.900 6 A G3000 RU MIO_M3 CZ 2021 8718.897 8 A G3000 RU MIO_M3 BE 2022 2820.800 14 A G3000 RU MIO_M3 BE 2024 3444.700Code
import pandas as pd pd.set_option('display.width', 200) mon = pd.read_csv(DATASET_FILES[0]) ann = pd.read_csv(DATASET_FILES[1]) print("MONTHLY dataset (17) freq values:", mon['freq'].unique().tolist()) print("MONTHLY rows for DE:", mon[mon.geo=='DE'].shape[0]) print(mon[(mon.geo=='DE')].sort_values('time').head(30).to_string()) print("\nANNUAL dataset (16) freq values:", ann['freq'].unique().tolist()) print(ann[ann.geo=='DE'].to_string()) print("\nANNUAL BE/CZ:") print(ann[ann.geo.isin(['BE','CZ'])].to_string()) - Code Run 2
Images
eu27_ru_energy.svgtop_importers.svgDataset filters for
nrg_ti_gasFilter Value(s) partner RU geo AT, BE, BG, HR, CY, CZ, DK, EE, FI, FR, DE, EL, HU, IE, IT, LV, LT, LU, MT, NL, PL, PT, RO, SK, SI, ES, SE, AL, IS, ME, MK, NO, TR, EU27_2020 unit MIO_M3, TJ_GCV siec G3000 sinceTimePeriod 2021 Dataset filters for
nrg_ti_sffFilter Value(s) partner RU geo AT, BE, BG, HR, CY, CZ, DK, EE, FI, FR, DE, EL, HU, IE, IT, LV, LT, LU, MT, NL, PL, PT, RO, SK, SI, ES, SE, AL, IS, ME, MK, NO, TR, EU27_2020 unit THS_T siec C0000X0350-0370 sinceTimePeriod 2021 Dataset filters for
nrg_ti_oilFilter Value(s) partner RU geo AT, BE, BG, HR, CY, CZ, DK, EE, FI, FR, DE, EL, HU, IE, IT, LV, LT, LU, MT, NL, PL, PT, RO, SK, SI, ES, SE, AL, IS, ME, MK, NO, TR, EU27_2020 unit THS_T siec O4000 sinceTimePeriod 2021 Program output
EU27 aggregate (as reported) Russian imports: Gas (MIO m3) Gas (TJ GCV) Oil (kt) Coal (kt) year 2021 153226.0 5907965.0 173229.0 50986.0 2022 83824.0 3262546.0 132022.0 28091.0 2023 33403.0 1325877.0 21404.0 838.0 2024 37843.0 1495248.0 15308.0 241.0 EU27 = sum of 27 member states? Gas check: reported: [153226.0, 83824.0, 33403.0, 37843.0] sum MS: [153226.0, 83824.0, 33403.0, 37843.0] --- By country, GAS (MIO m3) --- year 2021 2022 2023 2024 geo AT 0.0 0.0 0.0 0.0 BE 2405.0 2821.0 4019.0 3445.0 BG 2627.0 1205.0 0.0 0.0 HR 0.0 0.0 0.0 0.0 CY 0.0 0.0 0.0 0.0 CZ 8719.0 6838.0 551.0 1791.0 DK 0.0 0.0 0.0 0.0 EE 58.0 0.0 0.0 0.0 FI 1927.0 673.0 181.0 141.0 FR 10756.0 8149.0 6010.0 7406.0 DE 55443.0 25941.0 0.0 0.0 EL 2604.0 1001.0 2111.0 3340.0 HU 7105.0 7671.0 6413.0 4064.0 IE 0.0 0.0 0.0 0.0 IT 29171.0 13988.0 2931.0 5696.0 LV 1187.0 190.0 0.0 0.0 LT 887.0 279.0 0.0 0.0 LU 142.0 0.0 2.0 0.0 MT 0.0 0.0 0.0 0.0 NL 9177.0 3910.0 1358.0 2127.0 PL 10468.0 2986.0 0.0 0.0 PT 780.0 299.0 367.0 246.0 RO 2766.0 365.0 0.0 0.0 SK 3536.0 2388.0 2877.0 3089.0 SI 129.0 72.0 0.0 0.0 ES 3220.0 4983.0 6466.0 6436.0 SE 120.0 65.0 118.0 62.0 AL 0.0 0.0 0.0 0.0 IS 0.0 NaN 0.0 NaN ME 0.0 0.0 0.0 0.0 MK 432.0 287.0 356.0 331.0 NO 128.0 44.0 58.0 19.0 TR 26343.0 21575.0 21340.0 21572.0 --- By country, OIL (thousand tonnes) --- year 2021 2022 2023 2024 geo AT 642.0 123.0 0.0 0.0 BE 11771.0 9017.0 210.0 0.0 BG 662.0 805.0 584.0 233.0 HR 266.0 345.0 369.0 296.0 CY 5.0 190.0 0.0 0.0 CZ 3429.0 4169.0 4308.0 2715.0 DK 1696.0 88.0 0.0 0.0 EE 803.0 440.0 12.0 17.0 FI 8651.0 3306.0 21.0 12.0 FR 11510.0 8759.0 57.0 0.0 DE 34592.0 28304.0 893.0 0.0 EL 6647.0 5947.0 754.0 0.0 HU 4060.0 5564.0 4813.0 4988.0 IE 349.0 120.0 0.0 0.0 IT 8374.0 14175.0 260.0 0.0 LV 448.0 360.0 419.0 331.0 LT 7025.0 1687.0 83.0 37.0 LU 0.0 0.0 0.0 0.0 MT 111.0 37.0 0.0 0.0 NL 32197.0 20168.0 1804.0 1579.0 PL 20432.0 15109.0 1998.0 1083.0 PT 800.0 302.0 0.0 0.0 RO 3745.0 3780.0 195.0 0.0 SK 5477.0 5261.0 4561.0 4018.0 SI 110.0 450.0 63.0 0.0 ES 6764.0 2658.0 0.0 0.0 SE 2663.0 857.0 0.0 0.0 AL 74.0 14.0 5.0 NaN IS 0.0 0.0 0.0 0.0 ME 4.0 1.0 0.0 0.0 MK 5.0 10.0 2.0 1.0 NO 988.0 674.0 0.0 0.0 TR 10961.0 19968.0 26423.0 33859.0 --- By country, COAL (thousand tonnes) --- year 2021 2022 2023 2024 geo AT 369.0 337.0 234.0 67.0 BE 1261.0 782.0 0.0 4.0 BG 802.0 526.0 0.0 24.0 HR 527.0 342.0 0.0 0.0 CY 65.0 58.0 0.0 0.0 CZ 210.0 59.0 0.0 0.0 DK 693.0 262.0 0.0 0.0 EE 4.0 2.0 0.0 0.0 FI 970.0 612.0 0.0 0.0 FR 2806.0 1354.0 14.0 4.0 DE 20455.0 12983.0 576.0 138.0 EL 255.0 10.0 0.0 0.0 HU 213.0 56.0 0.0 0.0 IE 1261.0 528.0 0.0 0.0 IT 4992.0 3959.0 7.0 0.0 LV 15.0 18.0 0.0 0.0 LT 225.0 214.0 0.0 0.0 LU 4.0 3.0 0.0 5.0 MT 0.0 0.0 0.0 0.0 NL 3355.0 970.0 0.0 0.0 PL 8247.0 2515.0 0.0 0.0 PT 0.0 0.0 0.0 0.0 RO 1024.0 541.0 6.0 0.0 SK 881.0 265.0 0.0 0.0 SI 0.0 0.0 0.0 0.0 ES 1687.0 1600.0 0.0 0.0 SE 665.0 94.0 0.0 0.0 AL 70.0 2.0 1.0 0.0 IS 0.0 0.0 0.0 0.0 ME 0.0 0.0 0.0 0.0 MK 32.0 3.0 0.0 0.0 NO 234.0 97.0 0.0 0.0 TR 14083.0 20734.0 28630.0 25221.0 charts writtenCode
import pandas as pd, numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt pd.set_option('display.width', 220) NAME = {'AL':'Albania','AT':'Austria','BE':'Belgium','BG':'Bulgaria','CY':'Cyprus','CZ':'Czechia', 'DE':'Germany','DK':'Denmark','EE':'Estonia','EL':'Greece','ES':'Spain','FI':'Finland','FR':'France', 'HR':'Croatia','HU':'Hungary','IE':'Ireland','IS':'Iceland','IT':'Italy','LT':'Lithuania','LU':'Luxembourg', 'LV':'Latvia','ME':'Montenegro','MK':'North Macedonia','MT':'Malta','NL':'Netherlands','NO':'Norway', 'PL':'Poland','PT':'Portugal','RO':'Romania','SE':'Sweden','SI':'Slovenia','SK':'Slovakia','TR':'Turkiye', 'EU27_2020':'EU27 (aggregate)'} EU27 = ['AT','BE','BG','HR','CY','CZ','DK','EE','FI','FR','DE','EL','HU','IE','IT','LV','LT','LU','MT','NL','PL','PT','RO','SK','SI','ES','SE'] NATOnonEU = ['AL','IS','ME','MK','NO','TR'] def load(i, unit): df = pd.read_csv(DATASET_FILES[i]); df=df[df['unit']==unit].copy() df['year']=df['time'].astype(int); return df gas_v=load(0,'MIO_M3'); gas_e=load(0,'TJ_GCV'); coal=load(1,'THS_T'); oil=load(2,'THS_T') def pv(df): return df.pivot_table(index='geo',columns='year',values='value',aggfunc='sum') gv,ge,co,oi = pv(gas_v),pv(gas_e),pv(coal),pv(oil) print("EU27 aggregate (as reported) Russian imports:") summ = pd.DataFrame({'Gas (MIO m3)':gv.loc['EU27_2020'],'Gas (TJ GCV)':ge.loc['EU27_2020'], 'Oil (kt)':oi.loc['EU27_2020'],'Coal (kt)':co.loc['EU27_2020']}) print(summ.round(0).to_string()) # cross-check: sum of member states print("\nEU27 = sum of 27 member states? Gas check:") print("reported:", gv.loc['EU27_2020'].round(0).tolist(), " sum MS:", gv.reindex(EU27).sum().round(0).tolist()) print("\n--- By country, GAS (MIO m3) ---") print(gv.reindex(EU27+NATOnonEU).round(0).to_string()) print("\n--- By country, OIL (thousand tonnes) ---") print(oi.reindex(EU27+NATOnonEU).round(0).to_string()) print("\n--- By country, COAL (thousand tonnes) ---") print(co.reindex(EU27+NATOnonEU).round(0).to_string()) # save for reuse gv.to_csv('gas_v.csv'); ge.to_csv('gas_e.csv'); co.to_csv('coal.csv'); oi.to_csv('oil.csv') # ---------- Chart 1: EU27 totals by fuel ---------- years=[2021,2022,2023,2024] fig,ax=plt.subplots(1,3,figsize=(15,4.2)) ax[0].bar(years,gv.loc['EU27_2020',years],color='#c0392b'); ax[0].set_title('Natural gas (million m³)') ax[1].bar(years,oi.loc['EU27_2020',years],color='#2c3e50'); ax[1].set_title('Oil & petroleum products (kt)') ax[2].bar(years,co.loc['EU27_2020',years],color='#7f8c8d'); ax[2].set_title('Solid fossil fuels / coal (kt)') for a in ax: a.set_xlabel('year'); a.set_xticks(years) for x,y in zip(years,a.patches if hasattr(a,'patches') else []): a.annotate(f'{y.get_height():,.0f}',(y.get_x()+y.get_width()/2,y.get_height()),ha='center',va='bottom',fontsize=8) fig.suptitle('EU27 imports of Russian energy, 2021-2024',fontsize=13) fig.tight_layout(); fig.savefig('eu27_ru_energy.svg'); plt.close(fig) # ---------- Chart 2: top countries 2021 vs 2024 per fuel ---------- fig,axs=plt.subplots(1,3,figsize=(16,4.6)) for ax,(df,title,col) in zip(axs,[(gv,'Natural gas (MIO m³)','#c0392b'),(oi,'Oil (kt)','#2c3e50'),(co,'Coal (kt)','#7f8c8d')]): d=df.reindex(EU27+NATOnonEU) top=d[2021].sort_values(ascending=False).head(10).index x=np.arange(len(top)); w=0.4 ax.bar(x-w/2,d.loc[top,2021],w,label='2021',color=col) ax.bar(x+w/2,d.loc[top,2024],w,label='2024',color=col,alpha=0.45) ax.set_xticks(x); ax.set_xticklabels([NAME[g] for g in top],rotation=45,ha='right',fontsize=8) ax.set_title(title); ax.legend() fig.suptitle('Top importers of Russian energy: 2021 vs 2024',fontsize=13) fig.tight_layout(); fig.savefig('top_importers.svg'); plt.close(fig) print("\ncharts written") - Code Run 3Dataset: nrg_ti_gas Dataset: nrg_ti_sff Dataset: nrg_ti_oil Dataset: nrg_ti_oilm Dataset: nrg_ti_gasm
Images
eu27_trend_2025.svgeu27_vs_turkiye.svgDataset filters for
nrg_ti_gasFilter Value(s) partner RU geo AT, BE, BG, HR, CY, CZ, DK, EE, FI, FR, DE, EL, HU, IE, IT, LV, LT, LU, MT, NL, PL, PT, RO, SK, SI, ES, SE, AL, IS, ME, MK, NO, TR, EU27_2020 unit MIO_M3 siec G3000 sinceTimePeriod 2021 Dataset filters for
nrg_ti_sffFilter Value(s) partner RU geo AT, BE, BG, HR, CY, CZ, DK, EE, FI, FR, DE, EL, HU, IE, IT, LV, LT, LU, MT, NL, PL, PT, RO, SK, SI, ES, SE, AL, IS, ME, MK, NO, TR, EU27_2020 unit THS_T siec C0000X0350-0370 sinceTimePeriod 2021 Dataset filters for
nrg_ti_oilFilter Value(s) partner RU geo AT, BE, BG, HR, CY, CZ, DK, EE, FI, FR, DE, EL, HU, IE, IT, LV, LT, LU, MT, NL, PL, PT, RO, SK, SI, ES, SE, AL, IS, ME, MK, NO, TR, EU27_2020 unit THS_T siec O4000 sinceTimePeriod 2021 Dataset filters for
nrg_ti_oilmFilter Value(s) partner RU geo AT, BE, BG, HR, CY, CZ, DK, EE, FI, FR, DE, EL, HU, IE, IT, LV, LT, LU, MT, NL, PL, PT, RO, SK, SI, ES, SE, AL, IS, ME, MK, NO, TR, EU27_2020 unit THS_T siec O4000 sinceTimePeriod 2021-01 Dataset filters for
nrg_ti_gasmFilter Value(s) partner RU geo AT, BE, BG, HR, CY, CZ, DK, EE, FI, FR, DE, EL, HU, IE, IT, LV, LT, LU, MT, NL, PL, PT, RO, SK, SI, ES, SE, AL, IS, ME, MK, NO, TR, EU27_2020 unit MIO_M3 siec G3000 sinceTimePeriod 2021-01 Program output
### EU27 imports of Russian fossil fuels (annual 2021-2024; 2025 from monthly) ### Gas MIO m3 Oil kt Coal kt 2021 153226.0 173229.0 50986.0 2022 83824.0 132022.0 28091.0 2023 33403.0 21404.0 838.0 2024 37843.0 15308.0 241.0 2025 28198.0 11707.0 NaN ### NATO (members present in Eurostat data; UK/US/CA not covered) ### Gas MIO m3 Oil kt Coal kt 2021 180128.0 184155.0 63711.0 2022 105729.0 152220.0 48003.0 2023 55158.0 47834.0 29235.0 2024 59764.0 49169.0 25396.0 2025 49358.0 43759.0 NaN ### Turkiye (non-EU NATO) ### Gas MIO m3 Oil kt Coal kt 2021 26343.0 10961.0 14083.0 2022 21575.0 19968.0 20734.0 2023 21340.0 26423.0 28630.0 2024 21572.0 33859.0 25221.0 2025 21160.0 32052.0 NaN ### 2025 (monthly-derived) by country, Oil kt ### year 2025 geo TR 32052.0 EU27_2020 11707.0 SK 4923.0 HU 3762.0 NL 1716.0 CZ 527.0 HR 423.0 PL 295.0 FR 29.0 FI 15.0 DE 8.0 LT 7.0 LV 3.0 AL 0.0 DK 0.0 EE 0.0 AT 0.0 IE 0.0 EL 0.0 ES 0.0 BE 0.0 CY 0.0 BG 0.0 LU 0.0 IT 0.0 MT 0.0 MK 0.0 ME 0.0 NO 0.0 RO 0.0 PT 0.0 SI 0.0 SE 0.0 ### 2025 (monthly-derived) by country, Gas MIO m3 ### year 2025 geo EU27_2020 28198.0 TR 21160.0 BG 15467.0 BE 5936.0 ES 3792.0 NL 2503.0 PT 294.0 IT 207.0 AL 0.0 EE 0.0 DK 0.0 EL 0.0 FI 0.0 CZ 0.0 DE 0.0 AT 0.0 CY 0.0 IE 0.0 HU 0.0 HR 0.0 FR 0.0 LV 0.0 ME 0.0 LU 0.0 LT 0.0 MT 0.0 MK 0.0 PL 0.0 NO 0.0 RO 0.0 SE 0.0 SI 0.0 SK 0.0 charts writtenCode
import pandas as pd, numpy as np import matplotlib; matplotlib.use('Agg'); import matplotlib.pyplot as plt pd.set_option('display.width',220) NAME={'AL':'Albania','AT':'Austria','BE':'Belgium','BG':'Bulgaria','CY':'Cyprus','CZ':'Czechia','DE':'Germany', 'DK':'Denmark','EE':'Estonia','EL':'Greece','ES':'Spain','FI':'Finland','FR':'France','HR':'Croatia','HU':'Hungary', 'IE':'Ireland','IS':'Iceland','IT':'Italy','LT':'Lithuania','LU':'Luxembourg','LV':'Latvia','ME':'Montenegro', 'MK':'N.Macedonia','MT':'Malta','NL':'Netherlands','NO':'Norway','PL':'Poland','PT':'Portugal','RO':'Romania', 'SE':'Sweden','SI':'Slovenia','SK':'Slovakia','TR':'Turkiye','EU27_2020':'EU27'} EU27=['AT','BE','BG','HR','CY','CZ','DK','EE','FI','FR','DE','EL','HU','IE','IT','LV','LT','LU','MT','NL','PL','PT','RO','SK','SI','ES','SE'] NATO_avail=['BE','BG','HR','CZ','DK','EE','FI','FR','DE','EL','HU','IT','LV','LT','LU','NL','PL','PT','RO','SK','SI','ES','SE','AL','IS','ME','MK','NO','TR'] def loadann(i): d=pd.read_csv(DATASET_FILES[i]); d['year']=d['time'].astype(int); return d def pv(d): return d.pivot_table(index='geo',columns='year',values='value',aggfunc='sum') gv=pv(loadann(0)); co=pv(loadann(1)); oi=pv(loadann(2)) oil_m=pd.read_csv(DATASET_FILES[3]); oil_m['year']=oil_m['time'].str[:4].astype(int) gas_m=pd.read_csv(DATASET_FILES[4]); gas_m['year']=gas_m['time'].str[:4].astype(int) oi25=oil_m.groupby(['geo','year'])['value'].sum().unstack('year') gv25=gas_m.groupby(['geo','year'])['value'].sum().unstack('year') print("### EU27 imports of Russian fossil fuels (annual 2021-2024; 2025 from monthly) ###") tbl=pd.DataFrame({ 'Gas MIO m3':list(gv.loc['EU27_2020',[2021,2022,2023,2024]])+[gv25.loc['EU27_2020',2025]], 'Oil kt':list(oi.loc['EU27_2020',[2021,2022,2023,2024]])+[oi25.loc['EU27_2020',2025]], 'Coal kt':list(co.loc['EU27_2020',[2021,2022,2023,2024]])+[np.nan]}, index=[2021,2022,2023,2024,2025]) print(tbl.round(0).to_string()) print("\n### NATO (members present in Eurostat data; UK/US/CA not covered) ###") nat=pd.DataFrame({ 'Gas MIO m3':list(gv.reindex(NATO_avail).sum()[ [2021,2022,2023,2024] ])+[gv25.reindex(NATO_avail).sum()[2025]], 'Oil kt':list(oi.reindex(NATO_avail).sum()[[2021,2022,2023,2024]])+[oi25.reindex(NATO_avail).sum()[2025]], 'Coal kt':list(co.reindex(NATO_avail).sum()[[2021,2022,2023,2024]])+[np.nan]}, index=[2021,2022,2023,2024,2025]) print(nat.round(0).to_string()) print("\n### Turkiye (non-EU NATO) ###") tr=pd.DataFrame({'Gas MIO m3':list(gv.loc['TR',[2021,2022,2023,2024]])+[gv25.loc['TR',2025]], 'Oil kt':list(oi.loc['TR',[2021,2022,2023,2024]])+[oi25.loc['TR',2025]], 'Coal kt':list(co.loc['TR',[2021,2022,2023,2024]])+[np.nan]}, index=[2021,2022,2023,2024,2025]) print(tr.round(0).to_string()) print("\n### 2025 (monthly-derived) by country, Oil kt ###") print(oi25[[2025]].dropna().round(0).sort_values(2025,ascending=False).to_string()) print("\n### 2025 (monthly-derived) by country, Gas MIO m3 ###") print(gv25[[2025]].dropna().round(0).sort_values(2025,ascending=False).to_string()) # ---- Chart: EU27 trend 2021-2025 ---- years=[2021,2022,2023,2024,2025] fig,ax=plt.subplots(1,3,figsize=(15,4.3)) ax[0].plot(years,tbl['Gas MIO m3'],'o-',color='#c0392b'); ax[0].set_title('Natural gas (million m³)') ax[1].plot(years,tbl['Oil kt'],'o-',color='#2c3e50'); ax[1].set_title('Oil & petroleum products (kt)') ax[2].plot([2021,2022,2023,2024],tbl['Coal kt'].iloc[:4],'o-',color='#7f8c8d'); ax[2].set_title('Coal (kt)') for a in ax: a.set_xticks(years); a.set_xlabel('year'); a.grid(alpha=.3) a.axvspan(2024.5,2025.5,color='orange',alpha=.12) for x,y in zip(years,a.get_lines()[0].get_xdata() if False else []): pass fig.suptitle('EU27 imports of Russian energy, 2021–2025 (2025 = monthly-based; coal 2025 n/a)',fontsize=12) fig.tight_layout(); fig.savefig('eu27_trend_2025.svg'); plt.close(fig) # ---- Chart: Turkiye vs EU27, oil & gas 2021-2025 ---- fig,ax=plt.subplots(1,2,figsize=(12,4.3)) ax[0].plot(years,tr['Gas MIO m3'],'o-',label='Turkiye',color='#e67e22') ax[0].plot(years,tbl['Gas MIO m3'],'o-',label='EU27',color='#c0392b'); ax[0].set_title('Natural gas (million m³)'); ax[0].legend() ax[1].plot(years,tr['Oil kt'],'o-',label='Turkiye',color='#e67e22') ax[1].plot(years,tbl['Oil kt'],'o-',label='EU27',color='#2c3e50'); ax[1].set_title('Oil (kt)'); ax[1].legend() for a in ax: a.set_xticks(years); a.set_xlabel('year'); a.grid(alpha=.3) fig.suptitle('Russian energy imports: EU27 vs Turkiye') fig.tight_layout(); fig.savefig('eu27_vs_turkiye.svg'); plt.close(fig) print("\ncharts written")