Resolve the Thriller of the Serrated COVID Chart | by Lee Vaughan | Sep, 2023


Downsample knowledge to the right decision with pandas

DreamShaper_v7_A_computer_monitor_displaying_a_chart_with_a_jagged_blue_line (by creator & Leonardo AI)

Within the first yr of the COVID-19 pandemic, the mortality toll of the illness was the topic of a lot controversy. Among the many points had been early underestimation as a result of an absence of testing, mortalities going unrecorded exterior of hospitals, and distinguishing deaths of COVID-19 from deaths with COVID-19 [1][2].

On prime of every thing, and to everybody’s nice misfortune, the pandemic rapidly turned politicized. Partisan pundits leaped on every bit of knowledge, on the lookout for methods they might twist it to their benefit. Affirmation bias ran rampant. Should you had been on social media on the time, you most likely noticed posts that challenged the veracity of official charts and graphs.

On this Fast Success Knowledge Science undertaking, we’ll take a look at a selected chart that confirmed up on my Fb wall on the time. The chart information US COVID-19 mortalities for the primary yr of the pandemic, and it shows a distinctly serrated or “sawtooth” nature.

US COVID-19 mortalities for the primary yr of the pandemic (by creator from “The COVID Monitoring Challenge” at The Atlantic [3])

The curve oscillations have a excessive frequency, and it’s uncertain that the illness progressed on this method. Whereas some thought-about this proof that COVID mortality counts had been clearly incorrect and couldn’t be trusted, these of us blessed with knowledge science expertise rapidly made quick work of this overblown thriller.

The information we’ll use was collected as a part of “The COVID Tracking Project” at The Atlantic [3]. It consists of COVID-19 statistics from March 3, 2020, to March 7, 2021. To cut back the scale of the dataset, I’ve downloaded the information for simply the state of Texas and saved it as a CSV file on this Gist.

You’ll find the unique dataset here and the license for the information here.

Moreover Python, we’ll want the pandas library. You’ll be able to set up it utilizing both:

conda set up pandas

or

pip set up pandas

Leave a Reply

Your email address will not be published. Required fields are marked *