Analysis of CDC Data on US Counties by Mask Mandates and Coronavirus Transmission

Did Mask Mandates have impact on Coronavirus transmission rates in US counties?

In this article we took the official data [1, 2] from the Centers for Disease Control and Prevention (CDC) of the United States of America to analyze the effect of face masks mandates in the transmission rates of COVID-19, this article should be viewed only as a raw Data Analysis exercise without any prior political or medical prejudice, the code has been published on GitHub repository.

By the date of this run (April 19th of 2022) we had 2,632,374 rows for the Transmission database and 2,484,480 rows for the mask mandates comprising data from March 11th of 2020 to April 17th of 2022. 

With Python and its library pandas we separated and averaged the rates for all the counties grouping by mask mandate code, we got the following results for average coronavirus rates by date:


Fig. 1. Plot of average coronavirus transmission in all counties by Mask Mandates or not.

In Fig. 1 we can see for some time periods (corresponding to Summer and start of Fall) a higher transmission average for counties without mask mandates but in other periods (Winter and Spring) a higher level for counties with mask mandates; in the last and higher peak (the Omicron wave) we see that the values for counties with mask mandates were consistently higher than for those without.

Let's see a boxplot with all the daily data:

 Fig. 2. Boxplot of coronavirus transmission by Mask Mandates or not, there is no difference in sight and we confirm that the transmission peaks got higher in Masked counties.

Table summarizing the results, we see that in the counties with mask mandates there is a higher mean value of transmission but it is not a statistically significant difference according to a t-Student Test:

_______________________________________________________________________
Value of COVID-19 Community Transmission in All US Counties
         separating by Mask Mandates or Not.               
 
Dates from 2020-03-11 00:00:00 to 2022-04-17 00:00:00
 
                                             Values
Mean of Cases/100k with Mask Mandate     245.134917
Mean of Cases/100k without Mask Mandate   240.84496
t-Statistic                                0.315096
p-value                                    0.752735
Significant Difference                           No
_______________________________________________________________________
            Analysis: https://cadecastro.com
Mask Mandates Source: https://data.cdc.gov/api/views/42jj-z7fa/rows.csv
 Transmission Source: https://data.cdc.gov/api/views/8396-v7yb/rows.csv
_______________________________________________________________________

Analysis Code:

GitHub Repository: https://github.com/cadecastro/covid19/blob/main/cdc_us_counties_masks_transmission.py

References:

 [1] CDC Mask Mandates by County Data: https://data.cdc.gov/Policy-Surveillance/U-S-State-and-Territorial-Public-Mask-Mandates-Fro/42jj-z7fa/data 

[2] CDC COVID-19 Level of Transmission by County: https://data.cdc.gov/Public-Health-Surveillance/United-States-COVID-19-County-Level-of-Community-T/nra9-vzzn/data


Most read posts

Image

Site navigation