Drawing a Bar Chart with Covid-19 Case Data

Bar Chart
Beginner

Since the beginning of the COVID-19 outbreak, many articles feature data visualizations to highlight the situation. These visualizations—usually bar charts, line charts, and maps—digest complex data and convey key insights to the general audience. Effective and engaging charts usually get the audience’s attention to the article at a first glance. Data visualizations have become a universal language in COVID-19 reports, and journalists may need to produce relevant charts for their stories. For most journalists, creating visuals could be overwhelming and tedious with searching data sources, cleaning data, and formatting charts.


These challenges shouldn't limit journalists from creating insightful stories with brilliant data visualizations. In this series for COVID-19 visualizations, Thibi Recipes will provide step-by-step recipes to create time-series charts, logarithmic-scale charts, choropleth maps, bubble maps, and spike maps. All journalists, beginning or advanced in data visualization, can profit from our straightforward and accessible recipes. They will guide you to efficiently create informative charts through three simple steps:  

  1. Preparing the Data
  2. Crafting the Chart
  3. Communicating with the Audience

This recipe was produced with the generous support of the Institute for War and Peace Reporting.

Stats

Ingredients
Covid-19 Cases in Myanmar Data
Tools
Google Sheets, Datawrapper
Read in other Languages

Introduction

In this first recipe, we will create a time-series bar chart for a single country (Myanmar) using national-level data from the Myanmar government’s Ministry of Health and Sports.

  • Time-series graphs show trends in counts or numerical values over time. This is the most widely used visualization to show the trend of COVID-19 cases and death.
  • The horizontal axis is used to plot the date or time intervals, and the vertical axis is used to plot the case number or deaths.
  • Both the line chart and bar chart may be used to visualize time-series data, but we will create a bar chart in this recipe.


Bar charts may be used to chart a set of time-series data. In this recipe, we will show you how bar charts can be used to depict fluctuations in the daily reported number of coronavirus cases.  Other contexts in which bar charts may be informative are when covering progress in vaccine distribution, documenting surges in cases or deaths, reporting on hospital bed capacities, and tracking the number of Covid-19 tests in the country. Needless to say, the use of bar charts is not just limited to the context of Covid-19 as they can be effective in communicating the differences between the values of variables in other contexts.

We will create the time-series bar chart as shown in the image. This bar chart displays the daily number of cases starting from the onset of  the second wave of Covid-19 outbreak in Myanmar (Mid Aug 2020 - November 2020). It also highlights the day with the highest number of cases.

1

Preparing the Data

Gathering and Cleaning the Dataset

1.1) Gathering and Verifying the Data

First, we will need to look for reliable data. Whenever we are using data, it is important to check their source, especially if it is on the internet where anyone can post content. In regards to data related to Covid-19, sources such as the World Health Organization, government health departments and other official public health related agencies are considered to be reliable as they go through comprehensive processes for data collection and fact checking before reporting their information.

For this recipe, we will need the daily numbers of coronavirus cases in Myanmar. While the Myanmar government’s Ministry of Health and Sports is the official authority collecting and reporting information on Covid-19 in the country, they unfortunately do not provide all the information that they have announced in one place. Fortunately, there is the “Covid Myanmar Dashboard” site which has compiled the daily Covid-19 announcements made by the Ministry. You may also want to compare their numbers with the Ministry’s just to verify their data. Now that we have identified a reliable data source, we are ready to start cooking!

You will be directed to a Google Sheet which contains all the compiled data related to Covid-19 in Myanmar. Since our graph requires the daily total number of coronavirus cases, we will have to find the relevant tab and extract it. The tab named “cumulative number” contains the data we want. Go ahead and click on it.


1.2) Importing to Google Sheets

Since the data already exists in Google Sheets, we can simply copy the data we want onto our own new spreadsheet.

  • Right-click on the tab “cumulative number.”
  • Select “Copy to”.
  • Select “New spreadsheet.”
  • Click on File > Open.
  • In your Drive, find the new untitled spreadsheet with the tab that you have just copied.
  • Rename the file as “Myanmar-Covid-Data.”

You have now successfully extracted the relevant data we need to start making the graph!

1.3) Cleaning the Data

Since we are only showing daily cases for the second wave of COVID-19, which presumably started on August 16, we will need to delete all the rows before this date (16/08/2020).

  • The rows may be hidden in the spreadsheet. If so, please click on the arrow buttons on the left to unhide them.
  • Select the rows we want to delete from Row 2 (from 01/02/2020) to Row 201 (15/08/2020).
  • Right-click. And then, select Delete rows 2 - 201.

In graphing the daily number of Covid-19 cases, we will only need the “announced date” and “positive” variables. As such, we will keep just these variables and delete the other columns. Please beware that some columns may be hidden. Click on the arrow buttons next to the column labels to unhide them so that you can delete them.

Once we have just the 2 relevant variables, we may also rename them for better clarity:

  • announced date > Announced Date
  • positive > New Cases

The final Google Sheet should look like below:

Before we jump into the Datawrapper software, we need to allow access for this Google Sheet so that it can be incorporated to create the data visualization.

  • In the top right corner, click the Share button.
  • In the Get Link box, click Change to anyone with the link.
  • If you would like to skip the data preparation part, you can use the Sheet that has already been prepared in this URL, which will be pasted to Datawrapper to create the bar chart.


2

Crafting the Chart

Making and Designing a Chart using Datawrapper

In this step, we will create a bar chart using the Datawrapper.

The Datawrapper Work page will pop up. You can see that Datawrapper uses an easy 4-step method to create charts: Upload Data; Check & Describe, Visualize; Publish and Embed.

2.1) Uploading Data

As a first step, we will need to upload data.

  • Choose Import Google Spreadsheet.
  • Enter the URL of the Google Sheet that you have just created.

(Alternatively, you may readily use our google sheet. Copy this URL).

  • Click the  Proceed >  button.

2.2) Checking and Describing Data

You can see that dataset as below. For the “announced date” variable, you can see that Datawrapper automatically converts the dates into the most user-friendly and intuitive format. We will continue with this format.

  • Make sure that the column type for “New Cases” is Number.
  • Then click the Proceed > button.

2.3) Visualizing and Styling the Chart

Now, we can start working on our chart: choosing the chart type, adjusting design elements, and adding annotation.

In the Chart type tab,

  • Select Column Chart.
  • Click Proceed > .

Now, in the Refine tab, we can start working on design elements.

Let’s make some changes in the Vertical Axis panel.

  • Leave blank for custom range.
  • Turn on the buttons for Show Grid Lines and Show Axis Label.
  • For Number format, choose 1,000[.00].
  • Leave blank for Custom ticks.
  • For Position, choose inside.
  • For Alignment, choose left.

Now, we will move on to refine the Horizontal Axis.

  • Turn on the button for Show Grid Lines.
  • For Line type, choose ticks.
  • We don’t need to set Custom range again since we have cleaned dates for the second wave in the Google Sheet.
  • We will customize the Date format. We would rather like to format the date as the day and the first three initials of the month.

For example, 11 Oct, 20 Sep.

  • To set this format, Choose (custom) and in the box, type in "DD MMM".
  • Leave blank for Custom ticks.

Now, we will adjust the Appearance of the bars in the graph.

  • We will set the color for the chart. For the Column Color, type in the hex color code: #4ba2c5. The bars will turn light blue.
  • Turn on the button for Show values.
  • Select on the hover. By choosing this option, the values of the horizontal axis (date) and vertical axis (case number) of the bar will show as we move along.
  • Type in 50% for Space between columns.  

After all these steps, our bar chart will be neat and organized as below.

Note that Datawrapper does not have an option to add labels to your vertical or horizontal axis. There are alternatives to include the titles of the axes. In this case, some audiences may not realize the vertical axis shows the number of cases. We will use text annotation for clarification by adding “This chart shows the daily number of confirmed COVID-19 cases in Myanmar since August 16, 2020” as a note.

Now, in the annotation section, we will fill out the following respective fields as below:

  • Title: New Cases per Day in Myanmar during Second Wave
  • Description: Myanmar reported over 2,000 Covid-19 cases on Oct 10, 2020 -- the highest daily rate since the first confirmed case.
  • Note: This chart shows the daily number of confirmed Covid-19 cases in Myanmar since August 16, 2020.
  • Data Source: Dr. Nyein Chan Ko Ko (referenced from the Ministry of Health and Sports)
  • Link to data source: https://datastudio.google.com/reporting/445c1281-c6ea-45e4-9bc0-5d561c511354/page/I44CB
  • Byline: (Type in your organization)

We will highlight the bar chart we want to elaborate on. In the chart, you will see that the daily number of cases are the highest on Oct 10, 2020. Assume that this peak is the main point in your article and you need to make sure that the number of cases of this date stands out among all other dates.

  • Click the dropdown arrow under Highlight elements.
  • Select the desired date: 10/10/2020.

After this step, the chart should look like below.

We can skip Text annotations and Highlight range.

Now, we will go to the Design tab and finalize the map by selecting layout and enabling share option.

  • For the Select layout dropdown, choose Datawrapper (with data).
  • Output locale will be English (en-US).

To allow others to embed and share your map,

  • Turn on Enable social media share buttons.
  • Select Share chart URL.
  • Click Proceed >.

2.4) Uploading Data

In the final step, you can publish and embed your beautifully-crafted chart. You can either download a PNG file or embed the interactive chart in your website.


3

Communicating with the Audience

Making Sure that the Chart is not Misinterpreted

3.1) Diving Deeper into the Data

While visualizations are useful in communicating information, they can be misinterpreted. We need to make the readers aware of uncertainties regarding the number of cases. We are using the reported number of confirmed cases, not the actual number of cases. The actual number of cases is likely to be higher than the reported numbers we used in the chart. It may then be worth exploring the Covid-19 testing capacities in Myanmar, compared to other countries. For one, higher use of inaccurate testing methods may result in false negatives among those who have been tested. Second, a low number of tests per 100,000 people may indicate that all cases of Covid-19 in the country are not being detected. (To make fair comparisons between countries with different population numbers, it is advised to look at normalized rates, which are usually calculated as the amount per 100,000 or 1,000,000 people. We will talk more about this in a later recipe.)    

Another aspect of this chart to highlight is the time period that is shown as the current chart only captures a snapshot of the Covid-19 saga in Myanmar that has started before August 2020 and is still currently ongoing. To those who may be reading the recipe now, there may already have been other significant events that deserve to be paid more attention to instead, such as a third wave or the introduction of vaccines.

3.2) Applying Bar Charts Elsewhere

It is important to choose the type of visualization which would be most insightful for your readers and most relevant to your story. In this case, we show time-series data, which can be depicted using either a line chart or a bar chart. Bar charts are the best to show the daily cases; each rectangular block is assigned to each day, which helps the readers easily visualize the daily number of cases. This type of graph shows how fast Covid-19 cases are changing on a daily basis.

There may also be other instances where you may want to reproduce bar charts with other data. One bar chart by the BBC’s Visual and Data Journalism team showed up in at least 3 separate articles: on France’s reopening, on comparing the US to global COVID trends, and on a surge in coronavirus cases in the UK.

3.2) Beyond Bar Charts

To visualize the full extent of the outbreak, we need to create a cumulative graph.** In this graph, each day’s data point is the total number of all previously confirmed cases. We will create a line chart for cumulative cases in the upcoming recipe.

**You can learn more about different uses of charts to show cumulative or new cases of COVID-19 in this blog from SAS.

Recommended Recipes

Drawing Line Charts with Covid-19 Case Data

Line Chart
Beginner

Scrolly Map in Tableau and Webflow (Part 1)

Map
Beginner