Covid-19: A DataScience Approach on Brazil’s Geoeconomic Regions Using Google Mobility Report

Carmem Stefanie
Oct 2, 2020 · 5 min read

Analyzing Brazil’s data for Covid-19 given its three geoeconomics regions and their economic poles, which are “Amazonia, Nordeste, and Centrosul” and “Manaus, Recife and São Paulo”, respectively.

Created in collaboration with Joao Vitor Dias Xavier

Introduction

When we look at the “retail” column in Google Mobility Report’s dataset, we can see the mobility trends of people in places like restaurants, cafes, shopping centers, theme parks, museums, libraries, and movie theaters. This data, in other words, shows the economic recovery of countries, states, and even some cities.

Knowing this, we can divide Brazil into three “Geoeconomic Regions” — which is an unofficial division that groups states with similar economic activities — in order to compare and see what is happening in these three regions and in their respective economic centers. This way, the main objective of this analysis is to assess the economic recovery between the regions of Brazil.

Method

First of all, data was extracted from Google Mobility Report, a free and open base of data that can be accessed in:

The study was made using Python, one of the most used languages for data science for its simpleness and versatility. Besides this, the programming language ranking site PYPL has ranked Python as the number one programming language with a considerable popularity gain in 2020:

Source: http://pypl.github.io/PYPL.html

Python has a range of libraries that can be used for data analysis, and one of the most famous is pandas. Using pandas, we can, with a simple line of command, do the initial lecture of data, saving the results in a structured table that can be easily manipulated.

Libraries importations, data reading and first view of complete table. Source: authors.

How can be seen, the Google Mobility Report contains data of every country, but we will use just Brazil ones. So, data was cleaned to remove unnecessary or dirty lines and the unnused countries, this stage is essential to a more accurate analysis. Then, data was aggregated in new subdivisions, each representing one of the unofficials geoeconomics regions of Brazil: Amazonia, Nordeste and Centrosul. Not only that, three cities were collected, representing the biggest economical centers of each geo economic area, respectively: Manaus, Recife and São Paulo.

As the regions represent more than one city, the values of each region were marked as the average of the cities that compose it. The first result is the following table

Source: authors.

The next step was to apply the moving average of the last seven days to all columns in the dataframe — this was done to neutralize possible outliers. That done, the data is now ready. However, the table view is not the best way to show the results, so it was used matplotlib library for plotting graphs with the finded values. We will priorize code developed can be better seen in

The first graph produced is an overview of the “retail” values over time for each place we work. Even if this format offers a better understanding of the data, it is also not clear enough.

Source: authors

So, a second way was developed: for each regions one graph, placed in two lines and three columns, allowing data to be compared both vertically and horizontally — that is, we can compare between regions, the region and its pole city and only cities. A deeper analysis of the information acquired through the chart was placed next session.

Sourche: authors

Results

As shown in the six generated graphs, we can see some interesting things to talk about. For example, the arrows and percentage give an overview on how much the retail values increased over time. This way, if we observe, for instance, the graphics for “Amazonia” and its biggest economical center, “Manaus”, we can clearly see that the city has been recovering its economy much better than the region in general, which enables us to infer that Manaus has recovered much faster than other cities in the geoeconomic Amazonia region. As shown in the news, specifically this one from “Folha de São Paulo” journal: Recuperação na Zona Franca de Manaus indica que economia já reage, dizem especialistas. Other thing we can see in the graphic is that Manaus’s smallest value wasn’t in early April, like almost every other state.

If we now compare the three regions, we can see that Amazonia is the one with the highest retail recovery value, followed by Nordeste. But this state isn’t the same all the time. If we look closely by middle-end May, we can see that the Centrosul region had a higher retail value than its neighbors. Looking deeper into journals and news, we can see that the Centrosul region really started to return its economical activities, like in this report: Em meio a aberturas, Sul vê número de casos de coronavírus subir 86%, which is a pattern that was happening all over the region. That is probably why its retail value was so high back then.

Looking deeper into the Nordeste region, we can see that its retail value stayed below the retail in the other regions almost all the time. This value started to grow in early June and it is gradually growing, showing a percentage value that became higher than Centrosul’s. From the data collected by Inloco: Segurança e performance para apps, privacidade para pessoas regarding social distancing in Brazil, the Nordeste region had the highest rate back in April, which confirms the data shown in our graphics.

Conclusion

The data available on the internet can tell us many things about our reality, if we can use it properly. The objective of this article was to analyze data given by Google Mobility Report to confirm suspicions about three macro regions in Brazil, the Geoeconomic Regions. As we saw in results, this subdivision of Brazil is strongly related to the retail value in Google’s dataset, showing that our initial idea makes sense and actually happens.

The use of Google Collab and Python language were of extreme help to achieve our goals in this work, making the work easier to do and even easier to show. Also, the material given by professor Ivanovitch Silva as basis, helped us a lot.

Contributions

Conceptualization, Carmem and João; Development, Carmem and João; Introduction, Carmem and João; Methodology, Carmem; Results, João; Conclusion, João.

The Startup

Get smarter at building your thing. Join The Startup’s +788K followers.

Sign up for Top 10 Stories

By The Startup

Get smarter at building your thing. Subscribe to receive The Startup's top 10 most read stories — delivered straight into your inbox, once a week. Take a look.

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy practices.

Check your inbox
Medium sent you an email at to complete your subscription.

The Startup

Get smarter at building your thing. Follow to join The Startup’s +8 million monthly readers & +788K followers.

Carmem Stefanie

Written by

The Startup

Get smarter at building your thing. Follow to join The Startup’s +8 million monthly readers & +788K followers.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store