Skip to main content

From Lignite to Sunshine: How Greece Makes Its Electricity

Greek electricity in Eurostat data since 1990: how lignite gave way to gas, sun and wind, what changes with the seasons, how Greece compares with the EU, what households pay, and how Greece began to sell electricity abroad.

What is this?

For most of the last century Greece made its electricity by burning lignite, a soft brown coal dug from open-pit mines around Ptolemaida and Kozani in Western Macedonia and around Megalopoli in the Peloponnese. Today most of it comes from natural gas, the sun and the wind. This story follows the change with official data, in six questions:

  1. What does Greece make its electricity from?
  2. When did the sun and the wind overtake lignite?
  3. What changes with the seasons?
  4. How does Greece compare with the rest of the EU?
  5. What do households pay?
  6. Does Greece now sell electricity abroad?

All the data come from Eurostat, the statistical office of the EU. They are downloaded when the page is rendered, so a new render brings in the latest figures. Electricity is counted in terawatt hours (TWh), a billion kilowatt hours each, or in gigawatt hours (GWh), a million kilowatt hours each.


Packages

Code
# install.packages(c("eurostat","plotly"))
library(eurostat)
library(plotly)

The data

Code
# a Eurostat dataset, without its missing values; the time as text: "2024", "2024-05", "2024-S1"
eurostat_values<-function(id,filters) {
  x<-get_eurostat(id,filters=filters,time_format="raw",cache=FALSE)
  result<-as.data.frame(x[!is.na(x$values),])
  result$time<-as.character(result$time)
  return(result)
}

# the fuels of the charts, in the order of the stack, with their codes in the yearly and the monthly
# data, and colors that color-blind readers can also tell apart. The solid fuel of Greece is
# lignite
fuels<-data.frame(fuel=c("Lignite","Oil","Natural gas","Hydro","Wind","Solar"),
                  yearly=c("C0000X0350-0370","O4000XBIO","G3000","RA100","RA300","RA420"),
                  monthly=c("C0000","O4000XBIO","G3000","RA100","RA300","RA400"),
                  color=c("#8f5a12","#8e6bb8","#d1495b","#1f5f99","#4aa3df","#d29a00"))

# production by fuel, one column for each fuel and the rest (biomass, waste) as "Other", GWh
by_fuel<-function(x,codes) {
  times<-sort(unique(x$time))
  result<-data.frame(time=times)
  for(k in seq_along(codes)) {
    s<-x[x$siec==codes[k],]
    result[[fuels$fuel[k]]]<-s$values[match(times,s$time)]
  }
  total<-x[x$siec=="TOTAL",]
  result$total<-total$values[match(times,total$time)]
  result$Other<-result$total-rowSums(result[fuels$fuel],na.rm=TRUE)
  return(result)
}

# gross production of electricity in Greece by fuel, every year since 1990, TWh
production<-eurostat_values("nrg_bal_peh",list(geo="EL",nrg_bal="GEP",unit="GWH",
                                              siec=c("TOTAL",fuels$yearly)))
yearly<-by_fuel(production,fuels$yearly)
yearly$year<-as.integer(yearly$time)
columns<-c(fuels$fuel,"Other","total")
yearly[columns]<-yearly[columns]/1000
last<-max(yearly$year)
# the share of each fuel in the production of each year, %
shares<-cbind(year=yearly$year,100*yearly[c(fuels$fuel,"Other")]/yearly$total)
shares$sun_wind<-shares$Wind+shares$Solar
at<-function(column,year,x=shares) {
  result<-x[[column]][x$year==year]
  return(result)
}
# the first year in which the sun and the wind made more than lignite
crossing<-min(shares$year[shares$sun_wind>shares$Lignite])

# net production by fuel every month since January 2017, when the monthly data first split lignite,
# gas and the sun, GWh
monthly<-eurostat_values("nrg_cb_pem",list(geo="EL",unit="GWH",siec=c("TOTAL",fuels$monthly)))
monthly<-by_fuel(monthly[monthly$time>="2017-01",],fuels$monthly)
monthly$year<-as.integer(substr(monthly$time,1,4))
monthly$month<-as.integer(substr(monthly$time,6,7))
monthly$sun_wind<-100*(monthly$Wind+monthly$Solar)/monthly$total
latest_month<-monthly$time[nrow(monthly)]
# the last three years with all twelve months
full_years<-as.integer(names(which(table(monthly$year)==12)))
recent_years<-tail(full_years,3)
recent<-monthly[monthly$year%in%recent_years,]
# their average month: the share of the sun and the wind, the production and the gas
sun_wind_month<-tapply(recent$sun_wind,recent$month,mean)
monthly_total<-tapply(recent$total,recent$month,mean)
monthly_gas<-tapply(recent[["Natural gas"]],recent$month,mean)
best<-which.max(sun_wind_month)
worst<-which.min(sun_wind_month)
peak<-which.max(monthly_total)
low<-which.min(monthly_total)
season<-rep(c("winter","spring","summer","autumn","winter"),c(2,3,3,3,1))

# the share of renewables in the electricity that each country consumes, %, as the EU counts it for
# its targets. Its newest year is provisional at first (flag "p"), so the comparison uses the last
# year that Greece has a final figure for
renewables<-as.data.frame(get_eurostat("nrg_ind_ren",time_format="raw",cache=FALSE,
                                       keepFlags=TRUE))
renewables$year<-as.integer(as.character(renewables[[intersect(c("time","TIME_PERIOD"),
                                                               names(renewables))[1]]]))
renewables<-renewables[renewables$nrg_bal=="REN_ELC"&!is.na(renewables$values),]
final<-is.na(renewables$flags)|renewables$flags==""
greece_renewables<-renewables[renewables$geo=="EL",]
ren_year<-max(greece_renewables$year[final[renewables$geo=="EL"]])
ren_latest<-max(greece_renewables$year)
eu_name<-c(setNames(eu_countries$name,eu_countries$code),EU27_2020="EU-27")
eu_renewables<-renewables[renewables$year==ren_year&renewables$geo%in%names(eu_name),]
eu_renewables$name<-eu_name[eu_renewables$geo]
eu_renewables<-eu_renewables[order(-eu_renewables$values),]
ren_at<-function(geo,year) {
  result<-renewables$values[renewables$geo==geo&renewables$year==year]
  return(result)
}

# what households pay for a kilowatt hour, euros with all taxes, in Eurostat's middle band of
# 2,500 to 5,000 kWh a year, every half year since 2007
prices<-eurostat_values("nrg_pc_204",list(geo=c("EL","EU27_2020"),nrg_cons="KWH2500-4999",
                                         tax="I_TAX",currency="EUR",unit="KWH"))
# a half year as the day it starts: 2024-S2 is 1 July 2024
prices$date<-as.Date(paste0(substr(prices$time,1,4),
                            ifelse(substr(prices$time,7,7)=="1","-01-01","-07-01")))
prices<-prices[order(prices$date),]
both<-merge(prices[prices$geo=="EL",c("time","date","values")],
            prices[prices$geo=="EU27_2020",c("time","values")],by="time",
            suffixes=c("_greece","_eu"))
both<-both[order(both$date),]
# the dearest half year of the energy crisis in Greece
crisis<-both[both$date>=as.Date("2021-01-01")&both$date<=as.Date("2023-07-01"),]
crisis<-crisis[order(-crisis$values_greece),]

# electricity bought from and sold to other countries, every year since 1990, TWh
trade<-eurostat_values("nrg_cb_e",list(geo="EL",siec="E7000",unit="GWH",nrg_bal=c("IMP","EXP")))
trade<-reshape(trade[,c("nrg_bal","time","values")],idvar="time",timevar="nrg_bal",
               direction="wide")
trade<-data.frame(year=as.integer(trade$time),imports=trade$values.IMP/1000,
                  exports=trade$values.EXP/1000)
trade<-trade[order(trade$year),]
trade$net<-trade$exports-trade$imports
trade_last<-max(trade$year)
# the years of the latest run of years in which Greece sold more than it bought, and the year
# before them in which it last did so
last_import<-max(trade$year[trade$net<=0])
first_export<-last_import+1
earlier_export<-trade$year[trade$net>0&trade$year<last_import]
Code
greek_red<-"#d62728"
blue<-"#1f77b4"
gray<-"#9e9e9e"
dark_gray<-"#6b6b6b" # also the color of the notes and the labels
# a scale from a small share (white) to a large one (dark blue)
blues<-list(c(0,"#f4f8fd"),c(0.5,"#3987e5"),c(1,"#0d366b"))

# the source of a chart, as a note under it, and the common layout
chart<-function(p,title,source,y_title="",y_axis=list(),x_axis=list(),annotations=list(),
                margin=list(t=70,b=90),note_y=-0.16,...) {
  note<-list(text=paste("Source:",source),xref="paper",yref="paper",x=0,y=note_y,xanchor="left",
             yanchor="top",showarrow=FALSE,font=list(size=11,color=dark_gray))
  result<-layout(p,
                 title=list(text=title,x=0.02,xanchor="left",y=0.97,yanchor="top"),
                 yaxis=modifyList(list(title=y_title),y_axis),
                 xaxis=modifyList(list(title=""),x_axis),
                 margin=margin,
                 annotations=c(annotations,list(note)),
                 ...) %>%
    config(displaylogo=FALSE)
  return(result)
}
legend_top<-list(orientation="h",x=0,y=1.02,yanchor="bottom")
months<-factor(month.abb,levels=month.abb) # in this order on an axis

# labels just right of the plot, at the given heights, moved apart where they would touch
spread<-function(y,gap) {
  o<-order(y)
  for(k in seq_along(o)[-1])
    y[o[k]]<-max(y[o[k]],y[o[k-1]]+gap)
  return(y)
}
right_labels<-function(y,text) {
  result<-lapply(seq_along(y),function(k) {
    list(x=1.01,y=y[k],text=text[k],xref="paper",yref="y",xanchor="left",showarrow=FALSE,
         font=list(size=12,color=dark_gray))
  })
  return(result)
}

# short labels of numbers
twh<-function(x) {
  result<-paste(format(round(x,1),nsmall=1,trim=TRUE),"TWh")
  return(result)
}
percent<-function(x,digits=0) {
  result<-paste0(format(round(x,digits),nsmall=digits,trim=TRUE),"%")
  return(result)
}
gwh<-function(x) {
  result<-paste(format(round(x),big.mark=",",trim=TRUE),"GWh")
  return(result)
}
euro<-function(x) {
  result<-paste0("€",format(round(x,3),nsmall=3,trim=TRUE))
  return(result)
}
month_label<-function(time) {
  result<-paste(month.name[as.integer(substr(time,6,7))],substr(time,1,4))
  return(result)
}
# a half year in words: "2024-S2" is "the second half of 2024"
half<-function(time) {
  result<-paste(ifelse(substr(time,7,7)=="1","the first half of","the second half of"),
                substr(time,1,4))
  return(result)
}
ordinal<-function(n) {
  suffix<-ifelse(n%%100%in%11:13,"th",c("th","st","nd","rd",rep("th",6))[n%%10+1])
  result<-paste0(n,suffix)
  return(result)
}

1. What does Greece make its electricity from?

Mostly from natural gas, the sun and the wind; hardly any more from lignite. In 2024 Greece produced 57.9 TWh of electricity. Natural gas made 37% of it, the wind 21%, the sun 19% and lignite 6%. In 1990 lignite had made 72%, and the sun and the wind nothing at all.

Code
stack<-data.frame(fuel=c(fuels$fuel,"Other"),color=c(fuels$color,gray))
p<-plot_ly()
for(k in seq_len(nrow(stack))) {
  band<-data.frame(year=yearly$year,twh=yearly[[stack$fuel[k]]])
  p<-p %>%
    add_trace(data=band,x=~year,y=~twh,type="scatter",mode="lines",stackgroup="one",
              name=stack$fuel[k],fillcolor=stack$color[k],
              line=list(color=stack$color[k],width=0.5),
              hovertemplate=paste0(stack$fuel[k],": %{y:.1f} TWh<extra></extra>"))
}
# the name of each fuel next to its band in the last year
top<-cumsum(unlist(yearly[yearly$year==last,stack$fuel]))
middle<-top-unlist(yearly[yearly$year==last,stack$fuel])/2
p %>%
  chart("Greek electricity by fuel, TWh a year",
        paste0("Eurostat, nrg_bal_peh, gross production, 1990–",last,
               ". Other: biomass, biogas and waste."),"TWh",
        annotations=right_labels(spread(middle,0.07*max(yearly$total)),stack$fuel),
        hovermode="x unified",showlegend=FALSE,margin=list(t=70,b=90,r=110),
        x_axis=list(range=c(1990,last)))

The same years as shares of the production:

Code
table_years<-unique(c(1990,2000,2010,2019,last))
mix<-shares[shares$year%in%table_years,c("year",fuels$fuel,"Other")]
mix[-1]<-lapply(mix[-1],function(x) percent(x))
knitr::kable(mix,col.names=c("Year",fuels$fuel,"Other"),row.names=FALSE,align="r")
Year Lignite Oil Natural gas Hydro Wind Solar Other
1990 72% 22% 0% 5% 0% 0% 1%
2000 64% 17% 11% 7% 1% 0% 1%
2010 54% 11% 17% 13% 5% 0% 1%
2019 25% 11% 30% 8% 15% 9% 2%
2024 6% 8% 37% 6% 21% 19% 2%

2. When did the sun and the wind overtake lignite?

In 2020. That year the sun and the wind made 29% of the electricity of Greece, lignite 14%. Lignite had made 73% in 1994; by 2024 it was down to 6%. Natural gas, which hardly made any electricity in 1990, took over much of the rest: it now makes 37%, and almost all of that gas comes from abroad, by pipeline and by ship.

Code
lines<-data.frame(series=c("Lignite","Natural gas","Sun and wind"),
                  column=c("Lignite","Natural gas","sun_wind"),
                  color=c(fuels$color[1],fuels$color[3],fuels$color[6]))
p<-plot_ly()
for(k in seq_len(nrow(lines))) {
  line<-data.frame(year=shares$year,share=shares[[lines$column[k]]])
  p<-p %>%
    add_trace(data=line,x=~year,y=~share,type="scatter",mode="lines",name=lines$series[k],
              line=list(color=lines$color[k],width=2),
              hovertemplate=paste0(lines$series[k],": %{y:.1f}%<extra></extra>"))
}
ends<-sapply(lines$column,function(column) at(column,last))
p %>%
  chart("Share of Greek electricity, %",
        paste0("Eurostat, nrg_bal_peh, gross production, 1990–",last),"% of production",
        annotations=c(right_labels(spread(ends,6),lines$series),
                      list(list(x=crossing,y=at("sun_wind",crossing),
                                text=paste0(crossing,": the sun and the wind<br>overtake lignite"),
                                showarrow=TRUE,ax=-180,ay=-10,arrowcolor=dark_gray,
                                font=list(size=12,color=dark_gray)))),
        hovermode="x unified",showlegend=FALSE,margin=list(t=70,b=90,r=110),
        x_axis=list(range=c(1990,last)),y_axis=list(range=c(0,100)))

3. What changes with the seasons?

The sun and the wind make the largest share in spring, when there is plenty of both and little need for heating or cooling. In 2023–2025 they made on average 47% of the electricity of April, but 33% of December. Their best month so far was October 2022, with 53%.

The monthly figures are net production and Eurostat’s first estimates, so they do not add up exactly to the yearly ones above.

Code
z<-tapply(monthly$sun_wind,list(monthly$year,monthly$month),mean)
plot_ly(x=months,y=rownames(z),z=z,type="heatmap",colorscale=blues,zmin=0,
        zmax=max(monthly$sun_wind),xgap=2,ygap=2,
        colorbar=list(title=list(text="% from sun<br>and wind"),thickness=12),
        hovertemplate="%{x} %{y}: %{z:.0f}% from the sun and the wind<extra></extra>") %>%
  chart("Sun and wind, % of each month",
        paste0("Eurostat, nrg_cb_pem, net production, January 2017 to ",month_label(latest_month),
               "; blank: no data yet"),
        y_axis=list(type="category",autorange="reversed"),note_y=-0.1)

The rest comes mostly from gas, and gas also follows the demand. Greece uses the most electricity in summer, for air conditioning (see Athens Is Getting Hotter), and in winter. In an average July it produced 5,515 GWh, 2,159 GWh more than in an average April, and gas made 1,122 GWh of the difference.

Code
average<-aggregate(recent[c(fuels$fuel,"Other")],list(month=recent$month),mean)
p<-plot_ly()
for(k in seq_len(nrow(stack))) {
  bars<-data.frame(month=months[average$month],gwh=average[[stack$fuel[k]]])
  p<-p %>%
    add_trace(data=bars,x=~month,y=~gwh,type="bar",name=stack$fuel[k],
              marker=list(color=stack$color[k],line=list(color="white",width=1)),
              hovertemplate=paste0(stack$fuel[k],": %{y:,.0f} GWh<extra></extra>"))
}
p %>%
  chart("An average month by fuel, GWh",
        paste0("Eurostat, nrg_cb_pem, net production, the average of ",
               paste(range(recent_years),collapse="–"),". Other: biomass, biogas and waste."),"GWh",
        barmode="stack",bargap=0.15,hovermode="x unified",
        legend=c(legend_top,traceorder="normal"),margin=list(t=100,b=90))

4. How does Greece compare with the rest of the EU?

The EU sets its targets with another measure: the share of renewable energy in the electricity a country consumes, counting hydro and biomass as well as the sun and the wind, and averaging hydro and wind over several years so that one wet or windy year does not count too much. On that measure Greece went from 7.8% in 2004 to 51.2% in 2024, 10th of the 27 countries of the EU and above its average of 47.5%. Eurostat’s first, provisional figure for 2025 is 60.9%.

Code
eu_renewables<-eu_renewables[order(eu_renewables$values),]
bar_colors<-ifelse(eu_renewables$geo=="EL",greek_red,
                   ifelse(eu_renewables$geo=="EU27_2020",blue,gray))
plot_ly(eu_renewables,x=~values,y=~factor(name,levels=name),type="bar",orientation="h",
        marker=list(color=bar_colors),text=~percent(values),textposition="outside",
        cliponaxis=FALSE,hovertemplate="%{y}: %{x:.1f}%<extra></extra>") %>%
  chart(paste0("Renewable electricity in the EU, ",ren_year,", %"),
        paste("Eurostat, nrg_ind_ren (REN_ELC):",
              "the share of renewable energy in gross electricity consumption"),
        x_axis=list(range=c(0,105)),margin=list(l=130,t=70,b=90),note_y=-0.08)

5. What do households pay?

Less than the average household of the EU, in every half year since 2007. In the energy crisis of 2021–2023, sharpened by the Russian invasion of Ukraine, the price of a kilowatt hour for a Greek household rose to €0.244 in the second half of 2022 (with all taxes, in the middle band of 2,500 to 5,000 kWh a year), against €0.277 in the EU. In the first half of 2026 it was €0.240, against €0.283.

Code
plot_ly(both,x=~date,y=~values_greece,type="scatter",mode="lines+markers",name="Greece",
        line=list(color=greek_red,width=2),marker=list(color=greek_red,size=8),
        hovertemplate="Greece: €%{y:.3f}<extra></extra>") %>%
  add_trace(y=~values_eu,name="EU-27",line=list(color=blue,width=2),
            marker=list(color=blue,size=8),hovertemplate="EU-27: €%{y:.3f}<extra></extra>") %>%
  chart("Price of a kilowatt hour for households, euros",
        paste("Eurostat, nrg_pc_204, with all taxes, for households using 2,500 to 5,000 kWh a",
              "year, every half year"),
        "Euros per kWh",y_axis=list(rangemode="tozero"),hovermode="x unified",
        legend=legend_top,margin=list(t=100,b=90))

6. Does Greece now sell electricity abroad?

Yes, since 2024. For three decades Greece bought more electricity from its neighbors than it sold them: in 2019 it bought 9.9 TWh more than it sold. In 2024 it sold more than it bought, for the first time since 2000, and in 2025 it sold 3.0 TWh more: 6.4 TWh went abroad and 3.4 TWh came in.

Code
trade$hover<-paste0(trade$year,": sold ",twh(trade$exports),", bought ",twh(trade$imports))
plot_ly(trade,x=~year,y=~net,type="bar",marker=list(color=ifelse(trade$net>0,greek_red,gray)),
        hovertext=~hover,hovertemplate="%{hovertext}<extra></extra>") %>%
  chart("Sold abroad minus bought, TWh a year",
        paste0("Eurostat, nrg_cb_e, 1990–",trade_last,
               ". Below zero: Greece bought more than it sold."),
        "TWh")

Sources

  • Eurostat: nrg_bal_peh (production of electricity by fuel, every year), nrg_cb_pem (production of electricity by fuel, every month), nrg_ind_ren (share of renewable energy), nrg_pc_204 (electricity prices for households), nrg_cb_e (supply of electricity, with imports and exports).

Rendered with R 4.6.2 · plotly