Tracking Covid-19 Infection Risk With Local Forecast

Tracking Covid-19 Infection Risk With Local Forecast

In this tutorial, we will walk you through how to track Covid-19 infection risk with local forecasts and a weather API.

The Covid-19 pandemic has been called the black swan that no one saw coming, taking the world by storm. While each country fights to stop the spread of the disease among their people using information and advice from the WHO, a new Harvard study shows that there may be a connection between weather conditions and the rate of the spread.

To sum up the study, it states that certain environmental factors might have an impact on the transmission rate of Covid-19. 

These factors include:

  • Wind speed
  • Precipitation
  • Air pressure
  • Humidity
  • Temperature
  • Ozone(O3)
  • Sulfur Dioxide(so2)
  • Solar radiation

The study captured these fields in their _Relative COVID-19 Risk due to Weather and Air Pollution _(CRW).

CRW compares the relative changes in reproductive number for the disease due to weather factors (average and diurnal temperature, ultraviolet (UV) index, humidity, pressure, precipitation) and air pollutants (SO2 and Ozone). For example, a shift over a season in CRW from 1 (the 95 percentile in our sample) to 0.7 in a given location points to a 30% reduction in estimated reproduction number over that period due to weather and air pollutants (i.e. assuming everything else is constant).”

— Harvard 

Based on this information, I decided to make a web application that shows how to track the value of these factors for different geographical locations. The application will be the world map and when the user clicks on a certain location, the app will place a marker in that spot, and inside a card will show the current value for fields presented in the study.

A demo can be seen in the next .gif.

world map gif

Let’s Build It

As you've probably already guessed, we need an API from which we can acquire the weather data and map of the world.

For weather data, we’ll use ClimaCell Weather API, because it provides all the required environmental factors and for the map, we’ll use Open Street Map. This map API is not that powerful and easy to use and customize as the map from Google or other tools, but the benefit it has compared to the others is that it is the only one that can be used for free, is an open-source project.

To make things simpler for you I already wrote the code for this map including the marker and the click event and I wrapped it up together with the boilerplate for this project in a zip file.

Step 1 - Project Setup

The first step is to download the code from that zip file and create a free account on ClimaCell to receive an API key.

covid 19 weather api

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

6 Best Weather APIs for Measuring Air Quality Worldwide

Weather APIs, powered by technology, provide weather data (some real-time, some at specific times). These data can influence personal decisions and business decisions. There are also numerous APIs that offer Air Quality information. Each with their own features which makes one better than the other.

Top 10 API Security Threats Every API Team Should Know

Learn what are the most important API security threats engineering leaders should be aware of and steps you can take to prevent them

An API-First Approach For Designing Restful APIs | Hacker Noon

I’ve been working with Restful APIs for some time now and one thing that I love to do is to talk about APIs.

Public ASX100 APIs: The Essential List

The method used for this initial research was to obtain a list of the ASX100 (as of 18 September 2020). Then work through each company looking at the following

Postman lends its API power to the COVID-19 fight

The API development platform provider has launched an API resource center for tapping COVID-19 data including testing location information throughout the U.S.