Plotting functions

Plot vector land-use map

damagescanner.plot.landuse_vector(landuse, color_dict={}, save=False, **kwargs)
Arguments:
landuse_map : Shapefile, Pandas DataFrame or Geopandas GeoDataFrame with land-use information of the area.
Optional Arguments:

color_dict : Supply a dictionary with the land-use classes as keys and color hex codes as values. If empty, it will use a default list (based on OSM attributes)

save : Set to True if you would like to save the output. Requires several kwargs

kwargs:

output_path : Specify where files should be saved.

scenario_name: Give a unique name for the files that are going to be saved.

Plot raster land-use map

damagescanner.plot.landuse_raster(landuse_ras, color_dict={}, save=False, **kwargs)
Arguments:
landuse_map : path to GeoTiff with land-use information per grid cell.
Optional Arguments:

color_dict : Supply a dictionary with the land-use classes as keys and color hex codes as values. If empty, it will use a default list (which will probably fail)

save : Set to True if you would like to save the output. Requires several kwargs

kwargs:

output_path : Specify where files should be saved.

scenario_name: Give a unique name for the files that are going to be saved.

Plot inundation map

damagescanner.plot.inundation_map(inun_map, lu_raster=False, lu_vector=False, save=False, **kwargs)
Arguments:
inun_map : GeoTiff with inundation depth per grid cell.
Optional Arguments:

lu_raster : Set to True if you would like to use the landuse raster as background.

lu_vector : Set to True if you would like to use the landuse raster as background.

save : Set to True if you would like to save the output. Requires several kwargs

kwargs:

landuse_map : Path to land-use map.

output_path : Specify where files should be saved.

scenario_name: Give a unique name for the files that are going to be saved.

Plot vector damage map

damagescanner.plot.damagemap_vector(losses, bins=[], save=False, **kwargs)
Arguments:
losses : Shapefile, Pandas DataFrame or Geopandas GeoDataFrame with land-use information of the area.
Optional Arguments:

bins : Supply list of bin values for the colorscheme. If empty, it will use a default list.

save : Set to True if you would like to save the output. Requires several kwargs.

kwargs:

output_path : Specify where files should be saved.

scenario_name: Give a unique name for the files that are going to be saved.

Plot raster damage map

damagescanner.plot.damagemap_raster(damagemap, landuse, lu_raster=False, bins=[], save=False, **kwargs)
Arguments:

damagemap : Numpy array of loss output.

landuse_map : path to GeoTiff with land-use information per grid cell.

Optional Arguments:

lu_raster : Set to True if you would like to use the landuse raster as background.

bins : Supply list of bin values for the colorscheme. If empty, it will use a default list.

save : Set to True if you would like to save the output. Requires several kwargs.

kwargs:

output_path : Specify where files should be saved.

scenario_name: Give a unique name for the files that are going to be saved.