concrete_geovisualizer

class pyrecodes.geovisualizer.concrete_geovisualizer.ConcreteGeoVisualizer(components: list[Component])

Bases: object

Class that visualizes recovery using geospatial data plots.

component_is_functional(component: Component, time_step: int) bool
component_is_in_state(component: Component, state: str, time_step: int) bool
component_is_waiting(component_state: list[int])
create_component_state_legend(axis: axis, legend_items: dict)
create_components_recovery_time_figure(recovery_time_resilience_calculator: ResilienceCalculator, show=True, save=True, dpi=1000, savename='./components_recovery_time.png') None
create_current_recovery_state_figure(time_step: int, ax=None, save=False, dpi=300) None
create_current_state_buildings_and_supply_demand_figure(time_step: int, system: System, save=True, dpi=300, resources_to_plot=['Shelter', 'RepairCrew'], units=['[beds/day]', '[crews/day]'], show=False, supply_demand_resilience_calculator_id=0, folder_name='./', savename='2D_buildings_with_supply_demand_TIME_STEP.png') None
create_current_state_figure(title: str, state_colors: list, legend_items: dict, ax=None, save=False, dpi=300) None
create_current_state_shapefile(time_step: int, folder_name='./Example 3/shapefiles', file_name='NorthEast_SF')
create_empty_dataframe() None
create_geodataframe() None

Creates a geodataframe with the buildings of the system. Implemented in subclasses.

create_initial_damage_state_figure(save=False, dpi=300) None
create_localities_figure(components_to_plot: list, number_of_localities: int, save=False, dpi=300, save_filename='2D_buildings_Localities.png')
create_met_demand_state_figure(resource_name: str, time_step: int, save=False, dpi=300) None
create_recovery_gif(time_steps: list[int], load_folder_name='./', save_folder_name='./', load_file_name='2D_buildings_with_supply_demand_TIME_STEP.png', save_file_name='./system_recovery.gif', fps=1) None
get_building_state_color_map() tuple
get_component_current_state(component: Component, time_step: int) list
get_component_localities_color(components_to_plot: list, number_of_localities: int) tuple
get_component_recovery_time_colors(recovery_time_resilience_calculator) list[str]
get_initial_damage_state_colors() list
get_met_demand_state_colors(resource_name: str, time_step: int) list
plot_locality_polygons(ax, system_file: dict)
set_component_state_dict() None
set_components(components: list[Component]) None
show_recovery_animation(max_time_step: int, pause=1)
update_buildings_dataframe_with_component_current_state(time_step: int) list