Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

We need more keywords in the report template #744

Closed
timlinux opened this issue Jan 7, 2014 · 23 comments
Closed

We need more keywords in the report template #744

timlinux opened this issue Jan 7, 2014 · 23 comments
Milestone

Comments

@timlinux
Copy link
Contributor

timlinux commented Jan 7, 2014

Problem

We would like to parameterise more elements than just those defined in the documentation here:

http://test.inasafe.org/en/user-docs/application-help/reports.html

There are also other tweaks we would like to make.

Proposed solution

Add the following capabilities to the reporting template:

  • disclaimer - The disclaimer should be tokenised so that it can be interpolated in between other text.
  • impact-report - The user should be able to add a named element to the report that will be rendered with the impact report table.
  • organisation logo - The currently configured safe-logo' should be renamed 'organisation-logo' (and in InaSAFE options dialog). The organisation logo should default to a combined supporters logo (as described below), but the user should be able to set it to the logo of their own organisation (using the options dialog). safe_qgis/resources/img/logos/supporters.png

supporters

  • safe-logo- this should be immutable (not user changable) and should available as a render element as per the organisation-logo. The logo should include the URL of InaSAFE as per the image below. This will be available in safe_qgis/resources/img/logos/inasafe-logo-url.png. This logo should be included in the logo area for every report template we ship with InaSAFE.

inasafe-logo-url

Expected outcome

Users should be able to add disclaimer and other elements to the report not currently catered for.

CC

@vanpuk

@ghost ghost assigned alexbruy Jan 7, 2014
timlinux added a commit that referenced this issue Jan 8, 2014
@timlinux
Copy link
Contributor Author

Note I made some small changes to the logos - paths are the same but they may look a little different.

@timlinux
Copy link
Contributor Author

Hi @vanpuk

What do you think of this?

test

Regards

Tim

@alexbruy
Copy link
Contributor

What is the source of the disclaimer? Disclaimer is a general thing and, as I understand, it should not go to keywords database/file. Maybe another option in general config dialog or impact report dialog should be added?

Am I right that impact report table accessible via 'impact-summary' keyword?

@timlinux
Copy link
Contributor Author

@alexbruy Hi

What is the source of the disclaimer? Disclaimer is a general thing and, as I understand, it should not go to keywords database/file. Maybe another option in general config dialog or impact report dialog should be added?

Yes having a configurable disclaimer text (defaulting to current text as per your current template) would be good. We should also support the [disclaimer] token so a user can incorporate it in their templates that way if needed.

Am I right that impact report table accessible via 'impact-summary' keyword?

impact_summary yes you are correct.

@vanpuk
Copy link
Contributor

vanpuk commented Jan 14, 2014

Apologies for the delay, I found some time to have a play with the logo strip.
@vdeparday - is it okay to enlarge the world bank name and put it to the side so we can stack GFDRR/WB or is there another way?
logo_strip

@vanpuk
Copy link
Contributor

vanpuk commented Jan 14, 2014

I am wondering if we should have the title up the top and the supports quite small in the bottom right corner with the disclaimer on the left?
I have been talking with GA people about how to template and they are going to supply me with what they make for Australian Emergency Service, this will also help with the templating.

@vanpuk
Copy link
Contributor

vanpuk commented Jan 14, 2014

Also I just press print and got this follow, I think InaSAFE needs to be much bigger :)
screen shot 2014-01-14 at 1 33 02 pm

@akbargumbira
Copy link
Member

we are too modest :)

@alexbruy
Copy link
Contributor

@timlinux, os it is ok to add another option to the InaSAFE config dialog for disclaimer?

@alexbruy
Copy link
Contributor

Docs for new elements here inasafe/inasafe-doc#113

@timlinux
Copy link
Contributor Author

Thanks @alexbruy

@Charlotte-Morgan
Copy link
Member

I like a title at the top and logos at the bottom (equal size if possible)

@timlinux
Copy link
Contributor Author

@vanpuk I did one more take on the sponsors logos:

selection_001

Notes:

  • tried to maintain some whitespace so it doesnt look too 'full'
  • Harmonised WB/GFDRR logos so they take up about the same about of pixel real estate as the Australian AID logo.

@Charlotte-Morgan Ok I will switch the title and logo around

@timlinux
Copy link
Contributor Author

@alexbruy

Hmm trying to print I get

An error has occured while executing Python code:

Traceback (most recent call last):
  File "/home/timlinux/.qgis2/python/plugins/inasafe-dev/safe_qgis/widgets/dock.py", line 1873, in print_map
    keywords, filename=table_file_name)
  File "/home/timlinux/.qgis2/python/plugins/inasafe-dev/safe_qgis/report/html_renderer.py", line 249, in print_impact_table
    html += full_table
TypeError: coercing to Unicode: need string or buffer, NoneType found

@timlinux
Copy link
Contributor Author

@alexbruy ok I fixed here will commit in a sec

@timlinux
Copy link
Contributor Author

561e66d Fixes the above exception

@timlinux
Copy link
Contributor Author

@vanpuk @Charlotte-Morgan that is what the current version looks like (using the 'inasafe') template.
selection_002

@timlinux
Copy link
Contributor Author

The remaining issue is to figure out how to set the legend columns to 1 if there aren't too many entries - @alexbruy do you have any suggestions for doing that?

@alexbruy
Copy link
Contributor

Seems there is no way to get number of legend entries for composer legend. I tried to do this but currently without big success. Will look more.

@vanpuk
Copy link
Contributor

vanpuk commented Jan 23, 2014

Hi Tim,
This is looking good, and I like the words on the right hand side. Also I understand why there is such a large blank section, but now that we can add to the template users are able to put more information in that section if needed.
I do have a couple of request

  1. Can the legend note, how many buildings are red and green I.e.
    Inundated (30), not inundated (150)
  2. Could there please be a scale bar and coordinate system-
  3. Identification of hazard layer - I.e can you please put the inasafe question in and put the flood layer in the legend using the inasafe keyword name.
    I think that is all from me!

Cheers Kristy
Sent from my iPhone

On 23 Jan 2014, at 22:14, Tim Sutton notifications@github.com wrote:

@vanpuk @Charlotte-Morgan that is what the current version looks like (using the 'inasafe') template.


Reply to this email directly or view it on GitHub.

@Charlotte-Morgan
Copy link
Member

Hi Tim et al,
I think this is looking great too. Page balance is good, title at the top, important logo at the top and the others nicely balanced at the bottom.
Comments / suggestions:

  1. Agree with Kristy re scale bar, spatial reference info, feature count.
  2. Would like to see name and source (metadata) for hazard and exposure data. This may belong in the text panel on the right. Maybe the panel could be wider?.
  3. The whole page seems to be off centre? in the pdf its a bit off the left side
  4. Consistent terminology: this may be an artifact of the test data being used and could change with training data but we need to tighten up on buildings vs structures; flooded vs inundated etc. The analysis question still asks "might be flooded" but the output is "inundated"
  5. Error with print ... using the InaSAFE template to pdf is fine. But InaSAFE template to composer crashes.

See separate ticket :) #758

@alexbruy
Copy link
Contributor

@timlinux, I tried to implement very simple method to set the legend columns depending on number of classes in impact layer in e9aabb3.

@timlinux
Copy link
Contributor Author

Thanks @alexbruy I will test it. Can you also test with the a3 landscape template I committed - it seems to come out in portrait and not respect the fact that the composer options are set to landscape.

Regards

Tim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants