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

Tracking Covid-19 Infection Risk With Local Forecast
1.20 GEEK