Customizing map report and sharing it (part 2)

“In this lesson we will dive deeper into creating customised reports with InaSAFE”

In this module, we will focus on developing a simple infographic-style report for an InaSAFE flood on population report. When designing your own report, a good starting point is to take one of the existing map reports generated by InaSAFE and extend it. This lesson requires that you use a lot of your own initiative and also explore the various expressions provided by InaSAFE. Take careful note of the help that is provided. We recommend that you build on the work from InaSAFE Customising map reports (part 1), though it is not required.

You try:

Goal: To develop your own infographic report as an additional page of the standard flood on population report

To start, take a look at the example infographic we provide below. There are a number of label elements included on the layout, some of which contain plain text and some contain expressions which produce the infographic element content dynamically.

The people affected expression is not included in the specification table below - you need to work that out for yourself. Once your infographic has been saved in the InaSAFE folder, generate a flood report (using the InaSAFE print dialog override template option) and save it as a PDF. We have included a sample PDF output in the resource zip file attached to this lesson, as well as our example template.

Once you have produced the infographic as shown below, add your own enhancements to the template by changing fonts, colours, adding new infographic elements and images.

Name Expectation

Input layers

tandale_floods, wards, worldpop_25

Analysis question

In the event of Floods, how many People will be affected? Summarise the results by Wards.

Print options (report development)

Uncheck all InaSAFE reports, select the standard portrait and template map reports

Print destination

Open in composer

Print composer number of pages


Page 2

A Single HTML Element [% analysis_summary_report() %]

Page 3 logo


Page 3 title

[% @map_title %] - [% format_date( @start_datetime , 'dd MMMM yyyy')%]

Page 3 displaced count

[% inasafe_analysis_summary_field_value( 'displaced')%]

Save template filename


Print options (report preview)

Uncheck all InaSAFE reports, select the override template

Print destination (report preview)

Open as PDF

More about

Certain of the expressions provided by InaSAFE are only available in certain contexts. Some only work with a multi-exposure analysis (which we cover in a separate lesson). Some are valid only when a specific type of hazard or exposure has been used.

Also, the expressions may be specific to a certain type of composer element. For example, HTML expressions are best used with the HTML composer element type, image elements with a composer image element and so on.

Some of the expressions provided by InaSAFE perform field lookups on the data layers produced by InaSAFE. In our exercise able we see an example of this: inasafe_analysis_summary_field_value( 'displaced'). In this example, if retrieves a field from the analysis summary table (which only ever has one row). The lookup will return the value of the specified field.

For the most part you should learn by experimentation and by looking at other templates. For really advanced usage, look at the InaSAFE realtime templates.

Check your knowledge:

  1. What is the maximum number of pages you can include in your report?:
    1. The limit depends on the amount of available memory in your computer - there is no theoretical limit
    2. One page per hazard / exposure combination
    3. Three pages
  2. In this expression what will be returned? [% inasafe_analysis_summary_field_value( 'displaced')%]:
    1. The number of displaced people per aggregation area
    2. The unrounded total amount of displaced people for the analysis
    3. The rounded total amount of displaced people for the analysis

Further reading:

Click here to download the sample data for the lesson.