I have been wanting to work with some statistical data for a while now. Recently, I came across The COVID Tracking Project (a project of The Atlantic) and I figured that I would would look at what I could get out of the project’s APIs. The project has a lot of API endpoints but I figured that I would look at three of them for the moment. I am also limiting my experimentation to data for the state of Wisconsin.
The first endpoint shows metadata for the state.
As you can see, this mainly gets you things like the sources for the data, DHS’s contact info, and notes about the state’s dataset.
So, let’s move on and see if we can get something more interesting from the next API endpoint.
This one gives us useful data for the most recent day that we have data for. It includes test results, hospitalizations, deaths, daily changes, etc. This snapshot is valuable but let’s see if we can get a little more.
Our next API is going to show us historical values through the pandemic. This should give more context to the data.
This table shows day-by-day changes from the beginning of the dataset to the end. One of the things that I would like to do though is chart the data and in order to do that, we are going to need to isolate the columns.
In this final example, I implemented a form that can be used to pick a column and a “focus” variable that the column’s data gets dumped into.
In next week’s post, we are going to use these data points with D3.js and see if we can generate some visualizations. Meanwhile, if you have any questions, comments, etc, feel free to leave a comment below.