A quick investigation into coronavirus coverage by state in the US. This pulls news data by state from Media Cloud (using the US geographic collections), and gets coronavirus incidence data from John Hopkins. It charts the percentage of media attention in each state being paid to the coronavirus pandemic over time.
- Setup Python 3 and Jupyter Notebooks. This is no small task; if you are new I suggest installing via Conda.
- Create a
.env
file in this directory and put your Media cloud API key in like this:MC_API_KEY=12344567890
- You need to install a web browser engine for exporting Bokeh charts to SVG. On Mac try this to install chromedriver:
brew cask install chromedriver
All the data from my version is committed here, under the data
directory. You can run the notebook yourself - just run through
the cells in the corona-by-state
notebook to regenerate it all, and you'll end up with some CSVs and pretty charts 📉👏🏾.
This was created by Rahul Bhargava (@rahulbot on Twitter).
I was inspired by this tweet from Tyler Dukes to compare the new coronavirus case rate and the media attention paid to the pandemic.