Using Data to Enhance Cyclone Disaster Preparedness
By: Sreelatha S
Tags: Data Science, Machine Learning, Exploratory Data Analysis, Clustering, Data Visualization

Applying Machine Learning algorithm to results from an exploratory analysis of cyclone data

In this section, we shall discuss how an ML clustering algorithm can help augment the information we have to provide newer insights that can be put to use while disaster preparedness planning.

For this illustration we will use the k-Means clustering algorithm. We will also narrow the scope by focusing on one of the regions which is highly disaster prone during a cyclone. We will select the coastal state of Andhra Pradesh. The method described should be expanded into other regions along the coastline which is considered as a subject of cyclone fury.

To get started we would need to first create a dataset that contains all the neighborhoods in each of the coastal districts of the state (i.e Andhra Pradesh, for this illustration).

Creating the dataset is the most important aspect here, we would first need a dataset of all areas within the state, this can be got from postal data of AP. We will then need to curate this data to have the columns we need and remove the columns we do not want. We will also need to trim this dataset to only hold information about areas in coastal districts of AP. Once the dataset has info on the areas in the coastal districts of AP, we will need to fetch the latitude, longitude values for each of these areas. We will use the Geopandas library to fetch the lat-long values and populate the DataFrame with these new columns. You will end up with a DataFrame such as the one below.

First few rows of DataFrame containing coastal areas in AP

Manipulating the DataFrame carrying the areas dataset for the state is not in the scope of this article.

Once you have the desired dataset ready, the next step is to apply the clustering algorithm and cluster the neighborhoods (or areas) in your dataset based on the similarity or dissimilarity of venues in the area. In our case, we will use the Foursquare API to find the hospitals or emergency care units in each of these areas and we will cluster regions based on how similar or dissimilar they are based on a number of medical care units they have or don’t have.

Cluster the neighborhoods based on similarity of venues close to it, find the centroid of the cluster, this centroid neighborhood would have the minimum distance to all other neighborhoods within that cluster.

USE OF FOURSQUARE API TO FIND HOSPITALS IN AN AREA IN THE COASTAL DISTRICT

We will use the FourSquare API to find the hospitals in a given area. To know more about FourSquare APIs you can go here.

Follow the getting started instrcutions from FourSquare API docs to create your ID and secret key to make the API calls.

We are interested to find a venue of the category hospitals for a given area hence we will use the explore venues API with the category Id 4bf58dd8d48988d196941735, which corresponds to the category for Hospitals. Please refer to the FourSquare API docs for details.

The API call we will make will be as below: https://api.foursquare.com/v2/venues/explore?&client_id=<your_client_id>&client_secret=<your_client_secret>&v=20180605&ll=18.5147147,83.2351241&radius=500&limit=100&categoryId=4bf58dd8d48988d196941735

Once you get the results from the API call, you will need to update your DataFrame with the results, such that you will end up with a dataset as below:

First few rows of a dataset with venue details

This API call is made for each of the area (or neighborhood) values in our dataset. Once we have the desired dataset then k-Means clustering is applied (using Python packages) and visualization of the clustered info will be something like below. Each of the dissimilar clusters is colored differently. You will need to inspect each of the cluster to understand the nature of the cluster and what are the features for that cluster.

Clustered neighborhoods based on the similarity of hospital venues in a district

Districts are clustered based on similarity in terms of the number of hospitals in proximity, number of emergency wards, etc.

Districts that fall into a cluster of having fewer hospitals and emergency wards would be the first focus for disaster management teams.

Extending the use-case

Neighborhoods in districts can be clustered based on proximity to bus stations, airports and train stations.

Focused Evacuation efforts can be planned based on insights from the clusters, neighborhoods having less access to public transportation hubs can be the first focus on disaster management teams.