Vulnerability#

import os
import os.path as op
import sys
import glob

import numpy as np
import pandas as pd

# plot
import matplotlib.pyplot as plt
sys.path.insert(0, op.join(os.getcwd(), '..',  'lib'))


from damage_functions import damage_curves, plotDamageCurve
from config import *
dam_buildings_flood, dam_roads_flood, dam_crops_flood, dam_specials_flood, dam_buildings_wind, dam_crops_wind, dam_specials_wind = damage_curves()

Coastal and Ranfaill Flooding depth-damage curves#

plt.style.use('seaborn')

Roads#

colors = plt.cm.rainbow(np.linspace(0, 1, len(dam_roads_flood)))
plotDamageCurve(dam_roads_flood, colors, 'Percentage of Damage', 'Water Depth (m)', [0,7])
../_images/2_Damage_Functions_6_0.png

Land Crops#

colors = plt.cm.brg(np.linspace(0, 1, len(dam_crops_flood)))
plotDamageCurve(dam_crops_flood, colors, 'Percentage of Damage', 'Water Depth (m)', [0,7])
../_images/2_Damage_Functions_8_0.png

Special Infrastructures#

colors = plt.cm.rainbow(np.linspace(0, 1, len(dam_specials_flood)))
plotDamageCurve(dam_specials_flood, colors, 'Percentage of Damage', 'Water Depth (m)', [0,7])
../_images/2_Damage_Functions_10_0.png

Buildings#

colors = plt.cm.rainbow(np.linspace(0, 1, len(dam_buildings_flood)))
plotDamageCurve(dam_buildings_flood, colors, 'Percentage of Damage', 'Water Depth (m)', [0,11])
../_images/2_Damage_Functions_12_0.png

Wind damage curves#

plt.style.use('ggplot')

Land Crops#

colors = plt.cm.rainbow(np.linspace(0, 1, len(dam_crops_wind)))
plotDamageCurve(dam_crops_wind, colors, 'Percentage of Damage', 'Wind Speed (m/s)', [None, None])
../_images/2_Damage_Functions_16_0.png

Special Infrastructures#

colors = plt.cm.rainbow(np.linspace(0, 1, len(dam_specials_wind)))
plotDamageCurve(dam_specials_wind, colors, 'Percentage of Damage', 'Wind Speed (m/s)',  [None, None], 'upper left')
../_images/2_Damage_Functions_18_0.png

Buildings#

colors = plt.cm.rainbow(np.linspace(0, 1, len(dam_buildings_wind)))
plotDamageCurve(dam_buildings_wind, colors, 'Percentage of Damage', 'Wind Speed (m/s)', [None, None], 'upper left')
../_images/2_Damage_Functions_20_0.png