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.
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.
IBM Cloud Services
HERE Location Services
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.
ANDROID_HOME
Log in to IBM Cloud and provision a Watson Assistant instance.
starter-kit-flood-dialog-skill.json
file.⋮
) and click on API Details.https://api.us-south.assistant.watson.cloud.ibm.com
or https://api.eu-gb.assistant.watson.cloud.ibm.com
) but do not include the directory/path.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:
starter-kit/server-app
directory of the cloned repo..env.example
file in the starter-kit/server-app
directory, and create a new file named .env
..env
file and update the ASSISTANT_ID
, ASSISTANT_IAM_APIKEY
, and ASSISTANT_URL
with the values from the dialog skill's API Detail page in Watson Assistant.manifest.yml
file to your application name (for example, my-app-name).starter-kit/server-app
directory of the cloned repo.npm install
.npm start
.ibmcloud login
.ibmcloud target --cf
.ibmcloud app push
.routes
) after the app successful uploads and starts (for example, https://solution-starter-kit-disasters-2020-server-random-route.bluemix.net).To run the mobile application (using the Xcode iOS Simulator or Android Studio Emulator):
starter-kit/mobile-app
directory of the cloned repo..env.example
file in the starter-kit/mobile-app
directory, and create a file named .env
..env
file.
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
HERE_APIKEY
with the API Key generated in the HERE Developer Portal.starter-kit/mobile-app
directory.npm install
.ios
directory: cd ios
.pod install
.mobile-app
directory: cd ../
.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.
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.
This solution starter is made available under the Apache 2 License.