Coronavirus (COVID-19) Visualization In Animated Bar Chart.

Ubajaka CJ
2 min readJun 9, 2020
Nigeria eases coronavirus lockdown

With the gradual easing of the lockdown in most countries, we might take a look at how the COVID-19 (Coronavirus) has affected the top ten countries in animated visualization, from the inception to the 9th of June 2020. This will help us better appreciate the effects of the virus. Visualization helps us to judge with heightened perception, to grasp the nature and value of these datasets which would remain bland and uninteresting without it. And hopefully, to increase our preventive measures towards the virus.

This dataset is gotten from Kaggle, the Data Science platform and we are considering the confirmed, recovered and death cases.

I created the two functions, country_modified and country_frames, to wrangle the datasets in order to make it easily consumed by flourish studio, a data visualization platform.

So, in the first function, country_modified, the columns — ‘Province/State’, ‘Lat’ and ‘Long’ — are dropped because they are not necessary for this simple visualization. Next, countries that have several provinces/states are lumped and summed up

In the second function, country_frames, looping across the set of countries and running the country_modified function for each country, we get a new data frame for each country which is then appended to the list, frames. These datasets are eventually concatenated to have a joined and complete data frame for all the countries in the set

These results are the new datasets, each for the confirmed, recovered, and death cases which are then uploaded to the flourish platform for visualization.

To have the visualization displayed in my notebook, I use the HTML class from IPython.core.display package

These are the animated visualizations for the three cases:

An Observation

It seems that the effect of the coronavirus is moving away from the developed countries to the developing countries. We have seen the rise of Brazil, a South American country to become the second most affected country. India, an Asian country is also rising rapidly to become the fifth most affected country. And we have seen a trail of other South American countries — Peru, Chile, and Mexico in the list of most affected countries.

While there is the easing of the lockdown, we should still be very cautious, the virus is still here and there are death tolls.

There is the Igbo saying, ‘Nkwucha aburo Ujo’, which is literally translated as ‘Precaution is not Fear’, or loosely translated as ‘Prevention is better than Cure’.

You can still continue to work remotely if your job does not require a physical presence. Wash your hands regularly. Use facemask. Sanitize.

Together we will flatten the curve and overcome COVID-19

You can find the link to the code in my Github. What are your observations? You can put them in the comment section. Peace.

--

--