\begin{tikzpicture}
  % font choice
  \renewcommand\rmdefault{txr}\rmfamily\footnotesize
  \sisetup{
    round-mode=places,
    round-precision=1,
    add-decimal-zero,
    round-pad=true,
  }
  \begin{sankeydiagram}
    \colorlet{energy}{blue!30!cyan!80!black}
    \colorlet{lost energy}{red!50!orange!90!black}
    \sankeyset{
      ratio=13em/100,
      minimum radius=1em,
      start style=simple,end style=simple,
      draw/.style={draw=none,line width=0},
      energy/.style={
        fill/.style={
          draw=energy,
          line width=0,
          fill=energy,
        }
      },
      lost energy/.style={
        fill/.style={
          draw=lost energy,
          line width=0,
          fill=lost energy,
        }
      }
    }

    \newcommand\abovelabel[2]{ % valname, label
      \node[anchor=south east,align=center,inner xsep=0] at (#1.left) {#2};
    }

    \newcommand\energylabel[1]{ % valname
      \node[anchor=north east,text=energy,inner xsep=0] at (#1.right)
      {\num{\sankeygetnodeqty{#1}}};
    }

    \newcommand\lostenergylabel[2]{ % valname, label
      \node[anchor=north,text=lost energy] at ([yshift=-2.5mm]#1.center)
      (value)
      {\num{\sankeygetnodeqty{#1}}};
      \node[anchor=north,inner sep=0,align=center] at (value.south) {#2};
    }

    \newcommand\lostenergylabelbottom[2]{ % valname, label
      \draw[draw=lost energy,dashed,thick]
      ([yshift=-3mm]#1.center) coordinate (#1) -- ([yshift=-3mm]#1.center);
      \lostenergylabel{#1}{#2}
    }

    \sankeynode{name=Co,quantity=100.0}
    \path (Co.right) ++(0,-7mm) coordinate (c);

    \newcommand\turnandstop[2]{ % valname, label
      \begingroup
      \sankeyset{lost energy}
      \sankeyturnright{#1}{90}
      \sankeynode{as=#1,name=#1-stop,at={#1 |- c}}
      \sankeyoutin{#1}{#1-stop}
      \sankeynode{as=#1-stop,name=#1}
      \sankeyend{#1}
      \lostenergylabel{#1}{#2}
      \endgroup
    }

    \newcommand\turnandstopbottom[2]{ % valname, label
      \begingroup
      \sankeyset{lost energy}
      \sankeyturnright{#1}{90}
      \sankeynode{as=#1,name=#1-stop,at={#1 |- c}}
      \sankeyoutin{#1}{#1-stop}
      \sankeynode{as=#1-stop,name=#1}
      \sankeyend{#1}
      \lostenergylabelbottom{#1}{#2}
      \endgroup
    }

    \def\hshift{6.25em}

    \sankeyadvance[energy]{Co}{1.2*\hshift}
    \abovelabel{Co}{\textbf{Coal}\\(Primary energy)}
    \energylabel{Co}
    \sankeyfork{Co}{35/El1,65/Pg}
    \turnandstop{Pg}{Power generation}

    \sankeyadvance[energy]{El1}{1.8*\hshift}
    \abovelabel{El1}{\textbf{Electricity}\\(Secondary energy)}
    \energylabel{El1}
    \sankeyfork{El1}{33.5/El2,1.5/Tr}
    \turnandstopbottom{Tr}{Transmission}

    \sankeyadvance[energy]{El2}{.65*\hshift}
    \energylabel{El2}
    \sankeyfork{El2}{31.5/El3,2.0/Di}
    \turnandstop{Di}{Distribution}

    \sankeyadvance[energy]{El3}{.65*\hshift}
    \energylabel{El3}
    \sankeyfork{El3}{31.0/El4,0.5/Wi}
    \turnandstopbottom{Wi}{Wiring}

    \sankeyadvance[energy]{El4}{.65*\hshift}
    \abovelabel{El4}{\textbf{Electricity}\\(Final energy)}
    \energylabel{El4}
    \sankeyfork{El4}{3.0/Lr1,28.0/Lb}
    \turnandstop{Lb}{Lightbulb}

    \sankeyadvance[energy]{Lr1}{1.1*\hshift}
    \abovelabel{Lr1}{\textbf{Light radiation}\\(Useful energy)}
    \energylabel{Lr1}
    \sankeyfork{Lr1}{2.0/Lr2,1.0/Ls}
    \turnandstopbottom{Ls}{Lampshade}

    \sankeyadvance[energy]{Lr2}{.6*\hshift}
    \energylabel{Lr2}
    \sankeyfork{Lr2}{1.0/Il,1.0/Id}
    \turnandstop{Id}{Idle}

    \sankeyadvance[energy]{Il}{.6*\hshift}
    \abovelabel{Il}{\textbf{Illumination}\\(Energy services)}
    \energylabel{Il}
    \sankeyend[energy]{Il}
  \end{sankeydiagram}
\end{tikzpicture}
