This solution starter was created by the United Nations Human Rights Office in Geneva, Switzerland, on February 27-28, 2020. It features contributions by technologists from Unity, Johnson & Johnson, and Red Hat.
- Scott Sewell - Unity
- Jochen Bertels - JNJ
- DeveloperSteve Coochin - IBM
- Joshua Zheng - IBM
- Overview
- Video
- The idea
- How it works
- Diagrams
- Documents
- Datasets
- Technology
- Getting started
- Resources
- License
Natural disasters kill an estimated 90,000 people and affect close to 160 million people worldwide every year, according to the World Health Organization. Severe weather events in particular have been increasing in frequency and intensity over the past decade and scientists believe climate change is a significant factor.
Read the Sendai Framework for Disaster Risk Reduction to see how we make our communities safer and more resilient to disasters.
Technology can help our society better prepare for and respond to natural disasters. Specific use cases include reducing exposure to hazards, lessening vulnerability of people and property, wise management of land and the environment, and improving preparedness and early warning for adverse weather events that are gaining in frequency through climate change.
Due to climate change, floods are becoming more frequent and more severe, leading to specific issues for affected communities. This solution starter kit aims to reduce mortality rates by helping potential victims better prepare for, act during, and recover from a flood. Using a mobile application that helps users share knowledge of best practices and facilitates communities organizing themselves, communities will be able to reduce mortality rates and mitigate economic damage so they can recover faster after a flood.
The goal of the application is to provide an end-to-end solution to help potential victims combat floods. The team approached the problem by breaking it down into three phases: before the flood, during the flood, and after the flood.
Before the flood, the user is presented a checklist of best practices on how to prepare for the upcoming flood. The checklist is derived from the Sendak Framework for disaster preparedness, along with recommendations from seasoned search and rescue professionals. The application will also enable the local authorities to communicate with the user to better enforce disaster preparedness.
In the event of a flood, the app will switch into emergency mode. This mode can be activated by either the user or the local authorities. While in this mode, the app displays a simple evacuation route to the nearest shelter that still has capacity.
After the flood, the app will provide post-flood best practices to help victims rebuild their homes. The app will also enable a community marketplace, providing a platform for residents to trade resources and help push the economy to recover.
By combining IBM Data & AI offerings with HERE Technologies' Location Services, a developer can quickly get started building such a solution. The starter kit offers a React Native template that has integration with Watson Assistant and HERE Technologies' Location Services prebuilt, helping developers jump-start the development process.
This solution starter idea combines machine learning and location services with real-time information to get users the information they need to take action quickly.
- The user launches the mobile app and can access information across multiple services.
- The user can ask questions to Watson Assistant and get answers to flood planning and recovery-related questions.
- The user can access recommendations on flood preparation checklists and best practices with Watson Machine Learning.
- The user receives real-time weather updates from The Weather Company.
- The user can obtain geolocation data for safety points and plot evacuation routes using HERE Location Services.
- Terminology on disaster risk reduction
- Using global indicators to measure progress
- Words into Action guidelines: Enhancing disaster preparedness for effective response
- Health care challenges during and after a natural disaster
- IBM Code and Response: COVID-19
- Malawi Spatial Data Platform (MASDAP)
- Land Usage from MASDAP
- Malawi Disaster & Risk Profile
- Disparities in Cellphone Ownership Pose Challenges in Africa
- Data.gov disaster data sets
- HERE Geocoding and Search
IBM Cloud Services
- Generate insights from multiple data sources
- Transform and load big data CSV files into a database
- 2018 Finalist PD3R
- Create domain-specific bots using an agent bot
- Automate post-disaster checks using drone imagery
- Configuring mesh networking for the IoT
- Build and deploy a disaster donations website with end-to-end encryption
- Build a chatbot for your mobile app
- Rapid development of a scalable mobile application
HERE Location Services
- HERE.com API Key
- HERE Maps
- HERE Routing
- Integrate interactive maps and location features into your application
Use the following steps to get this starter kit up and running. The starter kit is composed of a React Native front end and a Node.js back end. The application includes a chatbot powered by Watson Assistant that answers questions about flood emergencies and integrates map and location services provided by HERE Technologies.
- Register for an IBM Cloud account.
- Install and configure IBM Cloud CLI.
- Register for a HERE account.
- Install React Native CLI dependencies.
- Node.js
- Watchman
- iOS only
- Android only
- Java Development Kit
- Android Studio - add Android 9 (Pie) SDK & configure
ANDROID_HOME
- Create an Android Virtual Device (AVD) - with Pie image (API Level 28)
- Clone the repository.
- Set up an instance of Watson Assistant.
- Generate an API Key from the HERE Developer Portal.
- Run the server.
- Run the mobile application.
Log in to IBM Cloud and provision a Watson Assistant instance.
- Provision an instance of Watson Assistant from the IBM Cloud catalog.
- Launch the Watson Assistant service.
- Create an Assistant.
- Add a dialog skill to the Assistant by importing the
starter-kit-flood-dialog-skill.json
file. - Go back to All Assistants page, open Settings from the action menu (
⋮
) and click on API Details. - Note the Assistant ID and API Key. From the Assistant URL, make note of the base URL/domain (e.g.,
https://api.us-south.assistant.watson.cloud.ibm.com
orhttps://api.eu-gb.assistant.watson.cloud.ibm.com
) but do not include the directory/path. - Go to Preview Link to get a link to test and verify the dialog skill.
The application uses HERE Location Services for maps, searching, and routing.
To access these services, an API Key is required. Follow the instructions outlined in the HERE Developer Portal to generate a JavaScript API Key.
To set up and launch the server application:
- Go to the
starter-kit/server-app
directory of the cloned repo. - Copy the
.env.example
file in thestarter-kit/server-app
directory, and create a new file named.env
. - Edit the newly created
.env
file and update theASSISTANT_ID
,ASSISTANT_IAM_APIKEY
, andASSISTANT_URL
with the values from the dialog skill's API Detail page in Watson Assistant. - Edit the name value in the
manifest.yml
file to your application name (for example, my-app-name). - From a terminal:
- Go to the
starter-kit/server-app
directory of the cloned repo. - Install the dependencies:
npm install
. - Launch the server application locally or deploy to IBM Cloud:
- To run locally:
- Start the application:
npm start
. - The server can be accessed at http://localhost:3000.
- Start the application:
- To deploy to IBM Cloud:
- Log in to your IBM Cloud account using the IBM Cloud CLI:
ibmcloud login
. - Target a Cloud Foundry org and space:
ibmcloud target --cf
. - Push the app to IBM Cloud:
ibmcloud app push
. - The server can be accessed at the URL shown in the console (
routes
) after the app successful uploads and starts (for example, https://solution-starter-kit-disasters-2020-server-random-route.bluemix.net).
- Log in to your IBM Cloud account using the IBM Cloud CLI:
- To run locally:
- Go to the
To run the mobile application (using the Xcode iOS Simulator or Android Studio Emulator):
- Go to the
starter-kit/mobile-app
directory of the cloned repo. - Copy the
.env.example
file in thestarter-kit/mobile-app
directory, and create a file named.env
. - Edit the newly created
.env
file.- Update the
STARTER_KIT_SERVER_URL
with the URL to the server app launched in the previous step.Note: If you are running the server locally and testing with the Android Emulator set the
STARTER_KIT_SERVER_URL
using the local machine's URL (e.g.,http://10.0.2.2:3000
) instead oflocalhost
- Update the
HERE_APIKEY
with the API Key generated in the HERE Developer Portal.
- Update the
- From a terminal:
- Go to the
starter-kit/mobile-app
directory. - Install the dependencies:
npm install
. - iOS only: Go to the
ios
directory:cd ios
. - iOS only: Install pod dependencies:
pod install
. - iOS only: Return to the
mobile-app
directory:cd ../
. - Launch the app in the simulator/emulator:
- iOS only:
npm run ios
Note: You should be running at least iOS 13.0. The first time you launch the simulator, you should ensure that you set a Location in the Features menu.
- Android only:
npm run android
Note: Your Android Studio needs to have the
Android 9 (Pie)
SDK and aPie API Level 28
virtual device- Alternative way to run on Android:
react-native run-android
- Android only: Open Android Studio and setup the project with the android folder.
- Android only: Open Android Virtual Device Manager and launch the virtual device installed.
- Android only: Click on Debug in Android Studio.
- Alternative way to run on Android:
- iOS only:
- Go to the
This solution starter is made available under the Apache 2 License.