top of page
Writer's pictureZayne Sember

Congressional Twitter and Coronavirus

As President Trump continues to insist on using controversial terminology for the coronavirus, I was curious to see if Republican members of Congress (MoCs) were following in his footsteps, at least in their tweets. Trump aside, I was also interested to see if Democrat MoCs were tweeting more about coronavirus than their Republican counterparts in both chambers. Besides, writing Python scripts makes pandemic self-isolation a little less boring.


For this brief project I’m using Python 3 and Jupyter Notebooks, Tweepy to interface with Twitter’s API, and some other par for the course Python libraries like numpy and datetime. Data is, of course, coming from Twitter and I’m reusing the spreadsheet of MoC Twitter accounts I put together for my last post. As usual, all my code is available on Github.

So, are MoCs calling this thing the “Chinese” or “Wuhan” virus in their tweets? No, not really.


Looking first at a breakdown of House member tweets by term, it’s immediately clear that virtually no Tweets from either party use the controversial terms and that “corona” is more common than “covid” for both parties. The Senate offers a similar story.


Note that these figures should not be misconstrued to claim one party or chamber is more concerned about coronavirus. This only shows the raw number of tweets for each term on a given day by a group. To compare tweet numbers across party and chamber lines the number of daily tweets must be divided by the number of seats the party controls in that chamber. This effectively gives the average number of tweets per member for that group on a given day. So let’s plot those adjusted results, this time combining all the terms checked for in the earlier plot to look at how much parties and chambers differ in their tweet rate.



The most immediate thing I notice in this plot is the similarity between all four trends. There is a dip present for each weekend (Feb. 29-Mar. 01, Mar. 7-8, Mar. 14-15.) and a reliable rise in tweets over the course of each week. The result is some sort of possibly linearly, possibly exponentially increasing oscillating function that, once I have more data, would be fun to try to create a fit for. The main thing I wonder is whether it follows the trajectory of infection rates in the US and Google search interest (more on that in a minute). Eyeballing this plot, it does appear that Democrat MoCs are tweeting more about coronavirus than Republicans, at least over the past 3 weeks—there is a noticeable spike in Senate Republicans tweeting on Mar. 16 and 17.


To get a more quantitative measure of volume of tweets, I numerically integrated each curve to get an approximate measure of attention given on Twitter by each group over 3 weeks. The result:


House GOP: 0.69 Senate GOP: 0.84

House Dems: 0.98 Senate Dems: 1.05

House Total: 1.67 Senate Total: 1.89


These measures seem to back up my eyeballing, Democrats in both chambers are tweeting more about coronavirus than Republicans. This still, however, can’t necessarily be equated to Democrat MoCs being more concerned about the virus than Republicans because Republican lawmakers, who are typically older, may just send fewer tweets than Democrats normally. Controlling for this may reveal that, given normal tweeting frequency, both parties are giving equal attention to it. I may try to apply this control as a future project—I think it may be useful in understanding future Twitter data I scrape from MoCs.


Looking at the totals for each chamber, the Senate’s members are, on average, sending more tweets about coronavirus. I see two possible explanations (or a combination of both) for this:


1. An average senator sends more tweets daily than an average House member because they have more staff.


2. Senators (generally) have a larger constituency in terms of number of constituents and geographic area. In the early stages of infection, before the virus is ubiquitous or known to be ubiquitous, senators are more likely to have cases in their constituency than House members. This argument, of course, only holds in the early stages of the pandemic and so, as things progress in the US, there may be an increased rate of tweeting in the House.



As an additional exercise, I’ve pulled the Google Trends US search data for the same terms I searched MoC tweets for over the same 3 weeks. The results again show that Trump’s terminology is exceedingly rare. Interestingly, similar weekend dips are visible for this plot just as they were earlier. The curves, at least until Mar. 12 or so, appear to increase more exponentially than my tweet plots—more time and data will make this clearer.


I’ll periodically be rerunning my script over a longer period of time to get more data but until the preliminary results are at a minimum neat to ponder.

42 views0 comments

Recent Posts

See All

留言


bottom of page