You will need Livebook installed. And then you can click the following link to see how to create a moving average graph in Livebook

Run in Livebook

Here is the main part of the work:

df =
  |> DataFrame.filter_with(&Series.equal(&1["country"], "DEMOCRATIC PEOPLE S REPUBLIC OF KOREA"))
  |> DataFrame.mutate_with(fn data ->
    moving_average =
      |> Series.window_mean(3)

    %{moving_average: moving_average}

South Korea was the first country I found with a significant decrease in total fossil fuel production, which displays the moving average nicely.

And here is the final graph image tooltip here