Each year, it seems the number of extreme weather and natural disasters that occur set a new record. The frequency of these events continue to increase each year. And the impact they have on people and the amount of damage they cause are escalating.
Severe and devastating weather is not going away. It is only going to get worse, according to the National Climate Assessment. Last year, extreme weather events affected over 60 million people, according to the Centre for Research on the Epidemiology of Disasters.
Call for Code
Call for Code is a challenge to the world’s developers.It aims to get developers thinking about natural disasters and driving positive change by creating solutions that lessen the impacts from a natural disaster. Developers are called upon to use their skills to help save lives.
Call for Code submissions can tackle aspects, such as:
- Improving preparedness before an event.
- Offering relief during severe weather.
- Supporting recovery after natural disasters.
Last year’s winning team, Project Owl, developed an off-line communication network that connects disaster victims and first responders once connectivity is lost.
The Weather Company
We cannot control the weather, but we can better understand it. In doing so, we can use data and analytics to get ahead of an occurrence and reduce the impact severe weather can have on our communities. We can better predict, prepare, and recover from extreme weather and natural disasters events with the right knowledge!
Solving problems where weather is involved, or more specifically any application that takes into account weather conditions, means we need access to the weather data itself.
Global weather data access is back
Once again, The Weather Company® is opening its Weather Data APIs to developers who are participating in the Call for Code Global Challenge. It is free of charge for developers to use as they’re building their submissions.
Over 25 of The Weather Company’s critical and popular API endpoints are available. The endpoints span multiple weather data packages:
- Core Weather Data Package: Includes the most essential weather APIs, such as current conditions, forecasts, and radar and satellite data.
- Enhanced Current Conditions Weather Data Package: Includes one of the highest-resolution weather observation networks in the field, based on over 200,000 personal weather stations (PWSs).
- Enhanced Forecast Weather Data Package: Built by using our leading-edge model forecasting; expertise from 200 meteorologists and related scientists; and our network of observations, radar, and satellite assimilation and modelling capabilities. The package delivers the most accurate forecasts at 500-square-meter resolution globally.
- Severe Weather Data Package: Includes forecasted, real-time, and trailing estimates of severe weather data. Weather conditions, such as hail, lightning, severe wind, tornadoes, and more are in this package.
Developers will be able to quickly add weather data, such as severe weather alerts, tropical storm forecasts, power disruption index, and more into their innovative and potentially life-saving solutions.
Getting started with the Weather APIs
To access and use the Weather APIs, you must first register for an API Key. Registration is free and will be available while the Call for Code Challenge is taking place. After you submit your registration form, you will receive your API key at the email address that you registered with.
You can review the API documentation for detailed information on each of the available endpoints. The documentation can also help you determine which endpoints are right for your application.
Using the API requires you to make a
GET request to the appropriate endpoint. The request must include the API key and any parameters required by the endpoint. For example, getting the short-range “Fifteen Minute Forecast” for Raleigh, NC (latitude: 35.843686, longitude: -78.78548) would look something like this (using
curl -X GET "https://api.weather.com/v1/geocode/35.843686/-78.78548/forecast/fifteenminute.json?units=m&language=en-US&apiKey=WXYZ" -H "accept: application/json" -H "Accept-Encoding: gzip"
WXYZ is the API key you received from registration.
Learning by doing
GitHub repositories with sample applications that use the API endpoints are available online for you to gain inspiration from and see them in action. The repositories also provide a starting point for creating an application. The sample code demonstrates how you can query and process responses from the following endpoints:
- Weather Alerts – Headlines API: Provides weather watches, warnings, statements and advisories that are issued by the National Weather Service (NWS), Environment Canada, and MeteoAlarm.
- Daily Forecast API: Returns the geocode weather forecasts for the current day in the API endpoint.
- Severe Weather Power Disruption Index 15 Day v2.0: Provides insight that indicates the potential for power disruptions due to weather.
- Tropical -Forecast – Projected Path: Provides the ability to query the single projected path per active storm.
- Weather Alerts Detail: Provides weather watches, warnings, statements, and advisories issued by the NWS, Environment Canada, and MeteoAlarm.
There are Node.js and Python implementations of the sample application that are available for you to use on GitHub. You can run the sample code to see how to incorporate the endpoints into an application or examine the code to learn how you could go about consuming any of the other available endpoints. Instructions on how to obtain and run the sample codes are in both repositories.
For a quick look at how easy it is, here are the basic steps to run the samples locally with Node.js or Python:
- Clone the desired GitHub repository (Node.js and Python).
- Create the
WEATHER_API_KEYenvironment variable and set it to your API key.
- Install dependencies using
npm(for Node.js) or
app.js(for Node.js) or
Here’s how to deploy the samples to IBM Cloud by using the IBM Cloud Developer Tools:
- Clone the desired GitHub repository (Node.js and Python).
- Update the
WEATHER_API_KEYvariable in the
- Push the application/repository to IBM Cloud using
ibmcloud cf push.
- Start the IBM Cloud application.
The README for both sample code implementations include more detailed steps:
How you and other developers can make a difference
Have a solution for a more effective severe weather preparedness system? Want to mitigate health concerns in the aftermath of a natural disaster? Whatever your idea may be, join the cause.
Interested in building a solution that can have an immediate and lasting impact? It is not too late for you to accept the challenge. Submission deadlines for Call for Code 2019 is July 29, 2019.
You can make a difference!
Raj Singh contributed to this blog.