Use case — COVID time-series data analysis with pandas

Lies, damned lies, and statistics” — Unknown

Time-series COVID data of confirmed infection and deaths from every single US county can be analyzed using pandas only. In this article, I will slice and dice the time-series data, plot them, compare them against each other, and present them for your interpretation. COVID data from Corona Virus Resource Center, John Hopkins University is used here for the purpose of demonstration.

Figure: COVID statistics of LA county, California and USA

At the end of this article you will be able to get time-series statistics like nominal daily new COVID infections for all US counties, and compare COVID statistics of your county with…

In this project I am going to show how to build your own COVID dashboard in Google Colab using pandas and plotly.


  1. Install packages and tools
  2. Import the data
  3. Analyze the data
  4. Graphically present the data in US choropleth map

1. Install packages and tools

In Google Colab environment you can pip install packages required for your code. You need plotly-geo , geopands , pyshp and shapely for this project.

!pip install plotly-geo!pip install geopandas!pip install pyshp!pip install shapely

After installing these packages, git clone data repository to import COVID data. I have build a data repository with submodule that takes the latest data from John Hopkins University’s COVID database and import necessary packages.

# Clone repository!git clone ./US-political-analysis!git submodule…

Photo by Jacob Stone on Unsplash

How political division exposing American weakness to fight pandemic

If you are a public official and looking for a playbook on things not to do in a pandemic, look no further than America’s failed response to the coronavirus crisis. Half baked, arbitrary, un-coordinated, incoherent public policy compounded with lack of leadership at the top caused America to surrender to this virus. When the President of the United States started a culture war over mask coverings, it surely resonated with his supporters. People in Trump leaning counties stopped adhering to their local and federal public safety guidelines of wearing masks or maintaining social distancing. Who can forget images of supporters…

Figure 1: USA county-wise COVID-19 scatter map where the bubble size represents number of confirmed cases per million population and color of bubble represents local growth rate of virus infection over last three days

An interactive COVID-19 map of USA is generated with a new open-source code based on John Hopkins University’s data (last updated on April 14, 2020)

Why region-based, data-driven decision is warranted to open the world’s biggest economy— and why Decatur, IN is a current COVID hotspot while San Francisco, CA is not

“In God we trust, all others must bring data.” — W. Edwards Deming

Questions of the day are: when and how are we going to open the country after weeks of lockdown to mitigate COVID-19 spread? Are the mitigation measures working? What can we learn from the data so far? To answer that, visualizing data can be very important in giving us a greater picture of the state of affairs during this pandemic…

A use case of GitHub and Google Colaboratory to track the spread of novel corona virus using John Hopkins University’s data repository

I developed a python codebase and published it in my GitHub repository to present spread of novel corona virus using database maintained by John Hopkins University. In this article, I do not present any projection models, but instead focus on presenting the data in a meaningful way intended to draw evidence-based judgement of how the novel corona virus infection is spreading in different geographical areas. Although there is clear sign that official numbers are grossly under-reported, this codebase intends to democratize official data and analysis toolkit on COVID-19 trends.

The data is presented in geo-scatter animation of reported cases of…

If remains unconstrained, epidemics like COVID-19 grows exponentially in infecting population. Using data-science and mathematics, one can derive simple projections of spread of highly infectious disease in a population.

Graph showing total COVID-19 cases outside China between February 15, 2020 and March 7, 2020
Graph showing total COVID-19 cases outside China between February 15, 2020 and March 7, 2020
Figure 1: Total number of COVID-19 infection outside China

Here is a graph showing total number of people affected by COVID-19 outside of China between mid-February and early-March of 2020, using World Health Organization’s database. It shows how rapidly COVID-19 had spread so far in population. This is a typical example of exponential growth of viral infection spreading across population. …

Siddhartha Banerjee, PhD

Computational physicist | Data science communicator | Author | Inventor | Life Enthusiast | Indian Classical Musician

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