In this paper we argue that the sociopolitical context of the COVID-19 pandemic is as important for understanding the spread of the disease as more conventional factors like social distancing policies and the capacity of the health care system. To do so, we analyze COVID-19 case and test data from the fifty United States during the first seven months on the pandemic. We also devise a Bayesian modeling approach for semi-parametric identification of the infection rate that permits us to undertake more sophisticated covariate adjustment than previous studies, incorporating mediation analysis to better understand why and how sociopolitical, economic and demographic factors affected different channels of transmission. Our results show that partisan identity is a powerful predictor of the spread of the disease by increasing dangerous mobility patterns and reducing people's fear of the pandemic.