Track COVID-19’s progression with The Weather Company’s API
Use Python and Watson Studio to access the API
Weather Company Data Disease Tracker API
Tracking a disease’s progression is incredibly useful in a pandemic like COVID-19. The Weather Company created a Data Disease Tracker API that allows you to track the progression of a disease for a given location. It provides information regarding active diseases including confirmed cases, deaths, and recoveries over a period of up to 60 days in the past.
In this tutorial, I show you how to access the Weather Company Data Disease Tracker API endpoint in Python from Watson Studio.
Obtain a Weather Company API Key
If you’re participating in the Call for Code Global Challenge, you have access to The Weather Company API for COVID-19 Disease Tracking.
(Optional) Obtain a HERE Location Services API Key
When using the application, you may pass it a geocode (for example, ‘35.843686,-78.78548’), a postal key (for example, 90210:US), or an address. If you pass an address, the application will try to use HERE Location Services for geocoding.
Import the notebook into IBM Watson Studio
- Sign into IBM Watson Studio Cloud
- Create a project
- From your project, click Add to Project
- Select Notebook
- On the New Notebook page, select From URL
- Enter a Name for the notebook
For the Notebook URL, enter the URL for the notebook (found in this GitHub repo):
The notebook should be uploaded into your project and opened up.
Run the notebook
From within the notebook:
- Update the cell under the Set API keys section and set the Weather Company Data API key (i.e.,
- Update the cell under the Set API keys section and set the HERE Location services API key (i.e.,
- Run through the notebook and execute each cell
In the Run section of the notebook, you can set the location you want to get data for. The location can be a geocode (i.e.,
42.3584,-71.0598), postal key (i.e.,
02109:US), or an address (e.g.,
Boston, MA) if HERE AP Key is set.
Examine the Add function to query TWC API to get most recent report section to see how exactly disease tracking API endpoint is used.
This code is licensed under Apache 2.0. Full license text is available in LICENSE.