2.1.1. Back End Development
The PEARL KB has been built on top of the well-established Object-Relational Database (ORDB) management system PostgreSQL. It is capable to handle workloads of large applications with many concurrent users, while it comes with a free and open source license (FOSS), as all other software components of the PEARL KB. PostgreSQL is a cross-platform database and at the same time easily expandable and supported by a variety of software tools and frameworks, one of which is Django. Django is used as the web framework of the PEARL KB. It is capable of supporting complex database-driven websites and includes an object-relational mapper (ORM) that mediates between data models, defined as classes of the programing language Python, and PostgreSQL. In essence, Django allows designing databases at the conceptual data model level, hiding the underlying physical data model and making the Database Management System exchangeable. Django expands the possibilities of processing data retrieved from the ORDB in response to HTTP requests and separates the logic from the presentation layer by supporting a flexible and efficient template system that controls the presentation of web applications.
This basic architectural design of the PEARL KB, shown in Figure 1
, has been developed using the technologies suggested above. It follows the Model–View–Controller architectural pattern consisting of three interconnected layers: (a) the presentation layer, responsible for the presentation of the information to the user and the interaction with him; (b) the Knowledge Base Engine (KBE), which encapsulates all logic responsible for processing a user’s request and for returning the response; and (c) the database layer responsible for the data management.
Several software modules constitute the KBE accessing the other two layers. Some of them have been adopted from existing third-party libraries or software packages, such as Django Admin, the powerful data management framework of Django and xlrd/xlwt for accessing and creating spreadsheet files which are compatible with Microsoft Excel files.
Other modules have been developed from scratch in a generic way so that they can be applied to any other database structure as well with very few or even without any modifications to the source code. These modules cover the typical functionality of a knowledge base such as the following:
Creation of lists of records from an arbitrary class, such as case studies or publication sources/
Collection of detailed information for an arbitrary object, including its relations to other objects and, in the case of georeferenced objects, their location on the map.
Textual search by applying approximate string matching.
Pivot table summarizing information from several tables of the database.
Finally, some modules needed to be developed or adjusted especially for the PEARL project, including the PEARL FRI Tool (see Section 2.2.1
) and a specialized filter for sorting-out resilience measures based on user defined criteria.
2.1.2. Front End Development
The main objective of the PEARL KB front end is to support the users in their aim to identify resilience strategies and specific measures that are suitable for their region against extreme events. Appropriate functionality of the website has been developed to guide the users in the following activities:
Assess the resilience
of their city to floods by calculating the Flood Resilience Index (FRI) and identifying dimensions and specific fields where the coastal region is particularly vulnerable (see Section 2.2
Once the main vulnerabilities have been recognized, the user may proceed in identifying measures and strategies
which may help improving the city’s resilience. The PEARL KB supports this transition by linking all indicators comprising the FRI with relevant measures and thus the user is able to navigate from the FRI page directly to the specific measures (see Section 2.2.2
Known case studies of the selected resilience measures can be explored next. The user can spot them on a map and review detailed information related to the case study, such as its description, implementation costs, lessons learned, etc.
Finally, publications and other sources that document the resilience measures of choice or their applications in various coastal regions can be retrieved for further research.
The functionality described above can be accessed in sequence from the homepage of the site. Although this approach may be convenient for many users, other users may prefer a more targeted approach. Using graphical elements such as buttons or menus, the user may navigate directly to specific pages, e.g., resilience measure explorer, case study map, pivot table and publications list. The schema in Figure 2
shows web pages and common navigation paths that may be accessed by the user. They will be described in more detail in this and the following sections.
More specifically, the PEAL KB supports the users in narrowing down their search to those resilience measures that match certain criteria. Filters are available in four categories: (a) flood problem type; (b) measure type; (c) spatial scale; and (d) land use. For each of these categories, interactive illustrations support the selection of the filters (see Figure 3
Measures that match the criteria are presented next in a page in which the user may refine the search and navigate to the detail page of selected measures (see Figure 4
). The pool of measures selected for the PEARL project originate from various sources, such as related projects (e.g., NWRM, and PREPARED) and contributions from PEARL project partners. For this purpose, a questionnaire has been distributed to selected experts asking them to review the suitability of the identified measures for this project and request their contribution with new measures. Their responses have been processed, resulting in a list of (at present) 168 measures. However, this list of measures can be expanded in the future, as the system provides the possibility to adapt to newer knowledge by including new and modifying existing measures.
The same filtering criteria may apply also to case studies, resulting into a list of known applications of measures that match the selected criteria (Figure 5
). In addition to the list, the case studies are also marked on a map. The user may navigate to the detail page of the case study by selecting it either from the list or the map.
A number of pages in PEARL KB are generated and rendered in a generic way, i.e., the same page generation routines apply for any class stored in the KB. PEARL KB recognizes the type of class properties through introspection and renders the page accordingly. Most notable examples of this approach are class list pages, object detail pages and pivot tables.
As in the aforementioned cases study list, list pages include a list of all class objects and their properties in the form of a table. In the case of a large number of objects, the table is divided into pages and textual search may be applied upon the list entries. The title of the columns corresponds to the names of the class properties. As this page provides only a list of the object properties, long textual information is truncated. In the case that the class objects are georeferenced, an interactive map appears at the top of the page on which the locations of the objects are marked.
When a detail page of an object is requested, the PEARL KB retrieves all available data related to this object organizing them by data type in the following categories: Numbers (Integer, Real), Boolean variables, Textual information, URLs, Geographic data, Illustrations and Relationships (one-to-many, and many-to-many). The page is then rendered according to the identified information (see Figure 6
). In the case of georeferenced objects, a map appears on top of the page showing its location. Illustrations appear in another tab on top of the page. Relationships are listed in categories with the name of the related object as hyperlink. A tooltip explaining the relationship in a human readable sentence appears by hovering the mouse over the hypertext. By clicking on the name, the user is navigated to the detail page of the related object.
An alternative way to retrieve the desired information stored in the PEARL KB is offered through the pivot table. A pivot table is a generic tool that summarizes information from several other tables and can be applied on any class of the KB. By selecting a class from the pivot menu, a pivot table of this class appears. Each of the two dimensions of the class table is associated with a property of the class selected from the pull-down menus. Columns and rows represent the values of lookup tables associated with the selected properties. In each cell of the pivot table, a number is displayed representing the stored items that match both property values specified by the line and the column of the cell. By clicking on a cell the user is navigated to further pages (list page, and object page) providing detailed information on these items. The example in Figure 7
gives the number of case studies having implementation costs at a certain range (rows) and at the same time applying measures that are of specific type (columns). This example also demonstrates the ability of the pivot table to collect information that span across several tables. Measure types
is actually a property of the class Measures
, which is related to the class Case studies
. By specifying the scope of the pivot table, the user can determine how far from the pivot class in the Knowledge Base the query should reach. Scope 0 means that only the properties directly associated with the pivot class should be available for selection from the pull-down menus, while scope n means that the selection list will be expanded to include properties of related classes that span across n relations from the pivot class.
Next to the various other search capabilities (filtering measures, locating case studies on the map, and searching in lists), the Knowledge Base provides full search functionality to all kinds of stored textual information. This includes names of entities, classes, descriptions, etc. The search algorithm is based on Levenshtein Distance [13
] for approximate string matching, i.e., finding strings within a longer text that match a given keyword approximately. The results are presented as an excerpt of the text in which the given keyword has been encountered, along with the names of the relevant object and property including a link to the object’s detail page.
2.1.3. Repository of Measures and Resilience Strategies and Their Applications
While trying to collect best practices and make them available for the decision makers to consider, over one hundred measures and over sixty case studies have already been collected and entered into the KB. Multiple sources, i.e., several websites, research projects, etc. have been identified from which the already available knowledge has been harvested and referenced within the KB. The most important ones, which aimed not only to enhance flood protection/preparedness of an urban system but also to increase flood resilience, are listed below:
Collection of measures has also been accomplished using a macro-enabled excel sheet and support by the PEARL partners, i.e., experts with years of experience in flood management solutions in Europe and Worldwide, but efforts are still ongoing and currently targeting a worldwide audience of experts through the development of online forms. It is important to highlight that KB content is being constantly updated, enriched and modified since the system provides the possibility to adapt its content to newer knowledge by including new and modifying existing measures and strategies, even beyond the end of the project.
Apart from indicating the collected measures within the KB, a short definition and their primary function have also been provided along with the (co) benefits of measures implementation. The measures have been categorized and basic attributes have been appointed to them. The type of measure (engineering, environmental, and operational), the application target (adaptation, and mitigation), the problem type for which they are being implemented (coastal, fluvial, pluvial, groundwater, and drain and sewer flooding), as well as the spatial scale (river basin, city, neighborhood, street, and building) and the land use (urban, suburban, rural, coastal, industrial, and park) where they can be implemented are the main attributes of measures. However, auxiliary classes and subcategories of measures primary related to measures’ functioning (e.g., temporary or permanent approach, infiltration techniques, financial preparedness, raising awareness, etc.) have also been defined assisting in a more advanced search. Illustrations of measures are available for the end users along with textual information. Permeable paving, flood control dams, land use conversion, evacuation routes and flood shelters, international loans and insurances, public awareness and use of media, etc. are some of the collected measures that has been documented so far and aim at flood risk management prior, during and after a flood event.
Gaining knowledge and experiences from implemented measures all over the world is of primary importance within this work. Lessons learned from the analysis of different combinations of strategic and operational measures are extracted and be available assisting in planning procedures. Towards that goal, applications of resilience measures, i.e., real case studies, modeled/simulated case studies or even prototypes/lab physical models, have been included, incorporating knowledge from alternative and/or combined interventions as well as knowledge of the “suitability” of each measure (or combination of measures) per type problem, also taking into consideration restrictions that might be imposed, e.g., by spatial scale or land uses of measures' implementation. Apart from including basic information of applications e.g., location, illustrations and the implemented measures, reference is being made to the level of responsible authorities who proceed to measures implementation as well as the possible engagement of other parties such as Non-Governmental Organizations (NGOs), residents, volunteer teams, etc., the implementation cost, the impact of floods prior and after measures’ implementation, qualitative assessment indicating if measure(s) served their purpose, the transferability of the methodology and the lessons learned. Description of case studies is also accompanied with a map indicating their geographical distribution providing yet another way for search. Examples of real applications already included in the KB, include but are not restricted to the major aquifer recharge project at Paso del Norte in the United States, the award winning, stormwater management of the Bluebelt Project in New York, dike constructions and relocations in several areas near Hamburg, Germany, flood control dams constructed in Greece (Rethymno, Crete and Rapentosa, Attiki), stormwater harvesting in Australia, early warning system developed in Marbella, Spain etc.