Conceito de Desenho de Geração de Energia criado por vectorpocket — br.freepik.com

This will make us (Brazilians) rethink our energy investments.

Luís Garavaso
5 min readJan 25, 2021

--

Motivation

As a mechanical engineering undergraduate currently researching rotating machines for energy generation, I figured it’s about time I use some Data Science to analyze Brazil’s last decades’ energy investments.
This is my very first post on the topic, so I will not do any fancy machine learning modeling just yet, but I intend to continue writing about it, so stay in touch !

Introduction

I downloaded the data from the World Bank, where you can find lots of resources to assist you on your analysis.
The specific link I downloaded from can be found here.

With this Data I intend to answer the following questions:

  1. Are we, Brazilians, investing in Energy generation?
  2. Are we getting more efficient in our production?
  3. Brazil is well known for its renewable energy sources, but are we still on the podium?
  4. Which other countries should we look to?

Code

Imports

Setup

Functions

Data Analysis

Read File

First things first, let’s read the data with the predefined function etl

These are the DataFrames we have:

Energy Production vs. Consumption

Now we’re going to find out if Brazil is investing in energy production.

We’re going to use the predefined function plotting_prep to assist us in our analysis.
First for the Production

This is what the DataFrame looks like:

Now we’re going to transform it to get specific information about Brazil with the predefined function plotting_prep .

And this is what it looks like

Now we do the same for the Consumption

And this is what it looks like

Now plotting both transformed DataFrames

From the plotwe can see that we became self-sufficient in Energy since the Productioncurve finally reached the Consumptioncurve.

This gets us the answer to our first question:

Are we, Brazilians, investing in Energy generation?

Yes, we are !!

Eletricity Production vs. Consumption

Now since humans don’t use pure Energy, we are gonna evaluate Brazil’s efficiency in terms of Eletricity.

Now the plot :

We see that the Eletricity Production curve is drifting away from the Consumption curve.

So going back to our second question:

Are we getting more efficient in our production?

We have to be very careful here. Even though this might indicate that we are becoming more efficient, which is expected considering the fast technological development in the field, it can also indicate that we are not keeping up with the demand and wasting a lot of the electricity produced.
Therefore, I decided not to jump to conclusions right now, but this ambiguity will be analyzed deeper in future works.

Renewables vs. Other Sources

Now we’re going to investigate our production coming from renewable energy sources.

Since the data is in percentage, some transformations are necessary to get the actual values in TWh.

And next, plotting:

Well, well, this is disappointing.

Remember that we were able to answer our first question positively.

Are we, Brazilians, investing in Energy generation?

Unfortunately, we are letting non-renewable energy sources become more important in our country. So even though we are investing in energy production, I think we are not doing it properly.

Top 10 Countries in Renewables Sources in 2017

Now let’s investigate the Top 10 countries in Renewables Sources in 2017.

Let’s give a round of applause to Norway, Colombia and New Zealand who made it to the Podium.

Countries with Higher Renewables Share than Brazil

With the last result, we are able to answer the 4th question:

Which other countries should we look to?

Since Norway, Colombia and New Zealand are the Top 3 countries, why not investigate them ?

Let’s plot the DataFrame to see what these countries have been up to lately.

As we can see from the plot, Norway has always been impressive.

Besides, Brazil only lost its position on the podium recently, so we still have a chance to get it back.

Conclusion

In this post I tried to answer four questions:

1. Are we, Brazilians, investing in Energy generation?
2. Are we getting more efficient in our production?
3. Brazil is well known for its renewable energy sources, but are we still on the podium?
4. Which other countries should we look to?

And the answers were:

  1. Yes, but not doing it properly
  2. The results were ambiguous therefore require further analysis
  3. We lost our position recently to Colombia and New Zealand
  4. We should definitely look to Norway, New Zealand and Colombia

Finally, this is my very first post on the topic (and on Medium) so I will gladly take any critics and advices.
If you want to chat about it, here is my LinkedIn.

Also, I invite you to clone the GitHub repository and do some analysis yourself. Please tell me if you find any interesting results.

If you’re not from Brazil, check how your country has been dealing with its energy investments.

Thank you for your attention and I hope you liked it !!

--

--

Luís Garavaso

Mechanical Engineering Undergraduate who loves Python and Data Science.