Looking at Coronavirus COVID-19 cases in Africa

Looking at Coronavirus COVID-19 cases in Africa

I wanted to build a dashboard to look specifically and the number of COVID-19 cases in Africa and how it is affecting different countries.

Summary of the Charts

The main focus of the dashboard is a map of Africa showing confirmed cases / deaths / and the number of deaths relative to the number of confirmed cases.

a map of Africa showing confirmed cases / deaths / and the number of deaths relative to the number of confirmed cases.

You can use the Optional Metrics control at the top of the dashboard to switch between the three metrics.

use the Optional Metrics control at the top of the dashboard to switch between the three metric

Another main focus of the dashboard is a table showing the number of confirmed cases, deaths and rate of deaths to cases for each country in Africa. At the time of writing South Africa had the highest number of coronavirus cases, followed by the north African countries of Egypt, Algeria and Morocco.

Another table shows the number of infections, deaths and percentage of fatalities compared with other continents. At the time of writing Europe had the most infections followed by North America (Canada, Mexico and the United States), Asia, South America, Africa, Central America and Caribbean and Oceania.

The final chart on the page shows the number of confirmed cases by country over time. It shows the top 20 countries in Africa by number of confirmed COVID-19 cases.

a chart in data studio showing the top 20 countries in Africa by number of confirmed COVID-19 cases.

You can click on a specific country on the map or in the table to focus on that particular country. For example, below is the same chart showing just the number of COVID-19 cases in South Africa and Nigeria over time.

a chart in google data studio showing the number of confirmed corona virus cases in south africa and nigeria

The Johns Hopkins University Coronavirus COVID-19 Global Cases dataset

It’s made using a public data set provided by Johns Hopkins University and available to connect to on Google BigQuery.

JHU Coronavirus COVID-19 Global Cases used to create a COVID-19 dashboard in Google Data Studio

The JHU dataset includes the location and number of confirmed COVID-19 cases, deaths, and recoveries for affected countries.

Find out more about the public data set at this link.

If you’d like to learn about how to connect to the public data sets available in BigQuery you can read this blog post on the topic.

Using a CASE statement to divide countries into continents

The public dataset from Johns Hopkins University does not provide data separating out countries into continents. Therefore I used a CASE statement to create my own regions.

Here is the CASE statement below.

CASE 
WHEN Country / Region IN ( "Algeria","Algeria",	"Angola","Benin","Botswana","Burkina Faso","Burundi","Cameroon","Cabo Verde","Central African Republic","Chad","Comoros","Congo (Brazzaville)","Congo (Kinshasa)","Cote d'Ivoire","Djibouti",	"Egypt","Equatorial Guinea","Eritrea","Ethiopia","Gabon","Gambia",	"Ghana","Guinea","Guinea-Bissau","Kenya","Lesotho","Liberia",	"Libya","Madagascar","Malawi","Mali","Mauritania","Mauritius",	"Morocco","Mozambique",	"Namibia","Niger","Nigeria","Rwanda","Sao Tome and Principe","Senegal","Seychelles","Sierra Leone","Somalia","South Africa","South Sudan","Sudan","Eswatini","Tanzania","Togo",	"Tunisia","Uganda","Western Sahara","Zambia","Zimbabwe") THEN "Africa"
WHEN Country / Region IN ("Mainland China","West Bank and Gaza", "Afghanistan","Armenia","Azerbaijan","Bahrain",	"Bangladesh","Bhutan",	"Brunei","Cambodia","China","Cyprus","Timor-Leste",	"Georgia","India","Indonesia","Iran","Iraq","Israel",	"Japan","Jordan","Kazakhstan","Kuwait",	"Kyrgyzstan","Laos","Lebanon",	"Malaysia","Maldives","Mongolia","Burma","Nepal","Korea, North",	"Oman",	"Pakistan","Philippines","Qatar","Russia","Saudi Arabia",	"Singapore","Korea, South","Sri Lanka","Syria","Tajikistan",	"Thailand","Turkey","Turkmenistan","Taiwan*","United Arab Emirates","Uzbekistan","Vietnam","Yemen") THEN "Asia"
WHEN Country / Region IN ("Antigua and Barbuda","Anguilla",	"Aruba","Bahamas","Barbados","Belize","Bermuda","Bonaire","British Virgin Islands","Cayman Islands","Clipperton Island","Costa Rica","Cuba",	"Curacao","Dominica","Dominican Republic","El Salvador",	"Greenland","Grenada","Guadeloupe","Guatemala","Haiti","Honduras",	"Jamaica","Martinique","Montserrat","Navassa Island",	"Nicaragua","Panama","Puerto Rico","Saba","Saint Barthelemy","Saint Kitts and Nevis","Saint Lucia","Saint Martin","Saint Pierre and Miquelon","Saint Vincent and the Grenadines","Sint Eustatius","Sint Maarten","Trinidad and Tobago","Turks and Caicos","US Virgin Islands") THEN "Central America and Caribbean"
WHEN Country / Region IN ("Diamond Princess", "MS Zaandam","Holy See", "Albania", "Andorra", "Austria","Belarus","Belgium","Bosnia and Herzegovina","Bulgaria","Croatia","Czechia","Denmark","Estonia","Finland",	"France","Germany","Greece","Hungary","Iceland",	"Ireland","Italy","Kosovo","Latvia","Liechtenstein","Lithuania","Luxembourg","North Macedonia","Malta","Moldova","Monaco","Montenegro","Netherlands","Norway","Poland","Portugal","Romania","Russia","San Marino","Serbia","Slovakia","Slovenia",	"Spain","Sweden",	"Switzerland","Ukraine","United Kingdom","Vatican City") THEN "Europe"
WHEN Country / Region IN ("Canada","Mexico","US") THEN "North America"
WHEN Country / Region IN ("Australia","Federated States of Micronesia","Fiji","Kiribati","Marshall Islands","Nauru","New Zealand",	"Palau","Papua New Guinea","Samoa","Solomon Islands",	"Tonga","Tuvalu","Vanuatu") THEN "Oceania"
WHEN Country / Region IN ("Argentina","Bolivia","Brazil","Chile","Colombia","Ecuador","Falkland Islands","French Guiana","Guyana","Paraguay","Peru","South Georgia and the South Sandwich Islands","Suriname","Uruguay","Venezuela") THEN "South America"
ELSE "Other"
END

I hope you found this dashboard showing COVID-19 cases in Africa useful and interesting.

My Other Coronavirus / COVID-19 dashboards

I’ve created two previous dashboard focusing on Coronavirus COVID-19 cases.

The first focuses on worldwide cases: A COVID-19 dashboard in Google Data Studio

A map showing worldwide cases of coronavirus covid-19 in various countries

The second looks at the differences in the number of cases between Europe and the United States: Comparing COVID-19 cases in the United States and Europe

Two maps created in google data studio showing the number of covid-19 cases in europe and the united states

My Other Blog Posts

If you found this article interesting you might like these other blog posts.