Network Analysis: Investigate Chennai Floods

  • 👟 Ready To Run!
  • 🔬 Data Science


  • 🗄️ Utility Service Configuration: Geocoding
  • 🗄️ Utility Service Configuration: Hydrology

On December 1–2, 2015, the Indian city of Chennai received more rainfall in 24 hours than it had seen on any day since 1901. The deluge followed a month of persistent monsoon rains that were already well above normal for the Indian state of Tamil Nadu. At least 250 people had died, several hundred had been critically injured, and thousands had been affected or displaced by the flooding that ensued.

The image above provides satellite-based estimates of rainfall over southeastern India on December 1–2, accumulating in 30–minute intervals. The rainfall data is acquired from the Integrated Multi-Satellite Retrievals for GPM (IMERG), a product of the Global Precipitation Measurement mission. The brightest shades on the map represent rainfall totals approaching 400 millimeters (16 inches) during the 48-hour period. These regional, remotely-sensed estimates may differ from the totals measured by ground-based weather stations. According to Hal Pierce, a scientist on the GPM team at NASA’s Goddard Space Flight Center, the highest rainfall totals exceeded 500 mm (20 inches) in an area just off the southeastern coast.

[Source: NASA]

Summary of this sample

This sample showcases not just the analysis and visualization capabilities of your GIS, but also the ability to store illustrative text, graphics and live code in a Jupyter notebook.

The sample starts off reporting the devastating effects of the flood. We plot the locations of rainfall guages and interpolate the data to create a continuous surface representing the amount of rainfall throughout the state.

Next, we plot the locations of major lakes and trace downstream the path floodwaters would take. We create a buffer around this path to show at-risk areas.

In the second part of the sample, we take a look at time series satellite imagery and observe the human impacts on natural reservoirs over a period of two decades.

We then vizualize the locations of relief camps and analyze their capacity using pandas and matplotlib. We aggregate the camps by district to understand which ones have the largest number of refugees.

In the last section, we perform a routing analysis to figure out the best path to route emergency supplies from storage to the relief camps.

First, let's import all the necessary libraries and connect to our GIS.

from datetime import datetime as dt
from IPython.display import YouTubeVideo

from arcgis.gis import GIS
from arcgis.geocoding import geocode
from arcgis import features
gis = GIS("home")

Chennai Floods Explained


The catastrophic flooding in Chennai is the result of the heaviest rain in several decades, which forced authorities to release a massive 30,000 cusecs (cubic feet per second) from the Chembarambakkam reservoir into the Adyar river over two days. This caused the river to flood its banks and submerge neighborhoods on both sides. It did not help that the Adyar’s stream is not very deep or wide, and its banks have been heavily encroached upon over the years. Similar flooding triggers were in action at Poondi and Puzhal reservoirs, and the Cooum river that winds its way through the city. While Chief Minister J Jayalalithaa said that damage was “inevitable” during the earlier phase of heavy rain, the fact remains that the mindless development of Chennai over the last two decades — the filling up of lowlands and choking of stormwater drains and other exits for water — has played a major part in the escalation of the crisis.

[Source: Indian Express]

How much rain and where?

To get started with our analysis, we bring in a map of the affected region.

map_chennai ="Chennai")

We can search for content in our GIS and add layers to our map that can be used for visualization or analysis:

data_groups ='"Esri Sample Notebooks Data" owner:esri_notebook',
group_query = f"group: {data_groups[0].id}" if data_groups else ""
chennai_waste ="Solid Waste Management {group_query}",
                                   item_type="feature service",
Feature Layer Collection by esri_notebook
Last Modified: June 25, 2019
0 comments, 109 views

To get a sense of how much it rained and where, let's use rainfall data for December 2nd 2015, obtained from the Regional Meteorological Center in Chennai. Tabular data is hard to visualize, so let's bring in a map from our GIS to visualize the data:

rainfall ="Chennai_precipitation {group_query}",
                              item_type="feature service",
Feature Layer Collection by esri_notebook
Last Modified: June 25, 2019
0 comments, 192 views
map_rainfall ="Tamil Nadu, India")

We then add this layer to our map to see the locations of the weather stations from which the rainfall data was collected:

map_rainfall.add_layer(rainfall, {"renderer": "ClassedSizeRenderer",
                                  "field_name": "RAINFALL"})

Here we used the smart mapping capability of the GIS to automatically render the data with proportional symbols.

Spatial Analysis

Rainfall is a continuous phenonmenon that affects the whole region, not just the locations of the weather stations. Based on the observed rainfall at the monitoring stations and their locations, we can interpolate and deduce the approximate rainfall across the whole region. We use the Interpolate Points tool from the GIS's spatial analysis service for this.

The Interpolate Points tool uses empirical Bayesian kriging to perform the interpolation.

interpolated_rf = features.analyze_patterns.interpolate_points(
    rainfall, field='RAINFALL')
{"cost": 0.119}

Let us create another map of Tamil Nadu state and render the output from Interpolate Points tool

map_int ="Tamil Nadu")

We see that rainfall was most severe in and around Chennai as well some parts of central Tamil Nadu.

What caused the flooding in Chennai?

A wrong call that sank Chennai

Much of the flooding and subsequent waterlogging was a consequence of the outflows from major reservoirs into swollen rivers and into the city following heavy rains. The release of waters from the Chembarambakkam reservoir in particular has received much attention. [Source: The Hindu,]

map_water ="Chennai")

Let's have a look at the major lakes and water reservoirs that were filled to the brim in Chennai due to the rains. We'll plot the locations of some of the reservoirs that had a large outflow during the rains.

To plot the locations, we use geocoding tools from the tools module. Your GIS can have more than one geocoding service, but for simplicity, the sample below chooses the first available geocoder to perform an address search.

map_water.draw(geocode("Chembarambakkam, Tamil Nadu")[0],
               {"title": "Chembarambakkam", "content": "Water reservoir"})
map_water.draw(geocode("Puzhal Lake, Tamil Nadu")[0],
               {"title": "Puzhal", "content": "Water reservoir"})
map_water.draw(geocode("Kannampettai, Tamil Nadu")[0],
               {"title": "Poondi Lake ", "content": "Water reservoir"})

To identify the flood prone areas, let's trace the path that the water would take when released from the lakes. To do this, we first bring in a layer of lakes in Chennai:

chennai_lakes ="chennai lakes {group_query}",
                                   item_type="feature service",
Feature Layer Collection by esri_notebook
Last Modified: June 25, 2019
0 comments, 166 views

Now, let's call the Trace Downstream analysis tool from the GIS:

downstream = features.find_locations.trace_downstream(chennai_lakes)
{"cost": 0}
<FeatureSet> 11 features

The areas surrounding the trace paths are most prone to flooding and waterlogging. To identify the areas that were at risk, we buffer the traced flow paths by one mile in each direction and visualize it on the map. We see that large areas of the city of Chennai were susceptible to flooding and waterlogging.

floodprone_buffer = features.use_proximity.create_buffers(
    downstream, [1], units='Miles')
{"cost": 0.011}

Flood Relief Camps

To provide emergency assistance, the Tamil Nadu government has set up several flood relief camps in the flood affected areas. They provide food, shelter and the basic necessities to thousands of people displaced by the floods. The locations of the flood relief camps was obtained from and published to the GIS as a layer, that is visualized below:

relief_centers =
    f"Chennai Relief Centers {group_query}",
    item_type="Feature Service",
map_relief ="Chennai")

Let us read the relief center layer as a pandas dataframe to analyze the data further

relief_data = relief_centers.layers[0].query().sdf
011I1010Poonthotam School, Chennai20065Balamurali, 9445190311{"x": 8919695.334199999, "y": 1464332.82629999...
12220St.Joseph church community Hall, Chennai600200Jayakumar, 9445190302{"x": 8936283.704100002, "y": 1469202.8202, "s...
23320Nehru Nagar chennai Middle school, Chennai25075Jayakumar, 9445190302{"x": 8916764.954599999, "y": 1450941.69069999...
34470Kalaimagal School, Chennai5015Shanmugam, 9445190301{"x": 8924034.069200002, "y": 1462457.79919999...
45540Ramanathapuram School, Chennai300100Rameshkumar, 9445190304{"x": 8919695.334199999, "y": 1464332.82629999...
relief_data.columns = relief_data.columns.str.lower()
count         136.0
mean     231.455882
std      250.334202
min            10.0
25%            60.0
50%           150.0
75%           300.0
max          1500.0
Name: no_of_pers, dtype: Float64
<Axes: >
<Figure size 640x480 with 1 Axes>

In our dataset, each row represents a relief camp location. To quickly get the dimensions (rows & columns) of our data frame, we use the shape property.

(136, 11)

As of 8th December, 2015, there were 31,478 people in the 136 relief camps. Let's aggregate them by the district the camp is located in. To accomplish this, we use the aggregate_points tool.

chennai_waste_featurelayer = chennai_waste.layers[0]
res = features.summarize_data.aggregate_points(
    ["no_of_pers Sum"])
{"cost": 0.168}
aggr_lyr = res['aggregated_layer']
map_relief.add_layer(aggr_lyr, {"renderer": "ClassedSizeRenderer",
                                "field_name": "sum_no_of_pers"})
df = aggr_lyr.query().sdf
09Thiruvallur60218.1842.79000160.970001920030...17032014568880.3626363587749935.8847384063.0271304.702697{"rings": [[[8927226.489100002, 1470373.014199...
112Chennai60322.4825.030.023360177...402201472099.555032185956515.16037319045.06467.72023{"rings": [[[8927223.1496, 1470310.1543999985]...
215Kancheepuram60461.9135.90000255.90000226181150100...10272014425113.6781014716386935.1483348370.0451722.709824{"rings": [[[8914096.3552, 1464672.7712000012]...

3 rows × 33 columns

Let's represent the aggregate result as a table:

df = aggr_lyr.query().sdf

df2 = df[['district_n', 'sum_no_of_pers']]
df2.set_index('district_n', inplace=True)
<Axes: xlabel='district_n'>
<Figure size 640x480 with 1 Axes>

Routing Emergency Supplies to Relief Camps

A centralized location was established at Nehru Stadium to organize the relief materials collected from various organizations and volunteers. From there, the relief material was distributed to people affected by the flood.

ArcGIS routing tools can help plan routes for relief trucks from the center stadium to relief camps:

map_route ="Chennai")
nehru_stadium = geocode('Jawaharlal Nehru Stadium, Chennai',

start_time = dt(2015, 12, 13, 9, 0)
routes = features.use_proximity.plan_routes(
    travel_mode='Driving Time',

Network elements with avoid-restrictions are traversed in the output (restriction attribute names: "Avoid Unpaved Roads" "Avoid Private Roads" "Through Traffic Prohibited" "Avoid Gates").
{"cost": 10.0}

Once the routes have been generated, they can be given to drivers, and used to ensure that relief material is promptly delivered to those in need and help alleviate the suffering they are going through.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.