kartoza / django-bims

https://testing.healthyrivers.kartoza.com
GNU Affero General Public License v3.0
12 stars 19 forks source link

Tsk 19. Develop functionality to allow a user to generate checklists #3608

Closed amyburness closed 1 month ago

amyburness commented 10 months ago

Develop functionality to allow a user to generate checklists (csv and Pdf report) for selected parks and/or taxonomic groups with relevant information such as conservation status,endemism, etc. Possibly including a standard branded pdf report.

dimasciput commented 7 months ago

We need a template for this

helendallas commented 4 months ago

A user would select a National Park of Management Unit using the spatial filter. They would then select the biodiversity module and open the detailed dashboard.

The checklist should be available as a csv/xls file as detailed below and a pdf report.

I think the Checklist should be available as a download option via the detailed dashboards. SO add in an extra option here:

Screenshot 2024-06-13 at 09 52 20

Download checklist

(Given the option as csv, xls or pdf)

As per Sanparks email comms - they would need this per Biodiversity Group.

Details of checklist below

helendallas commented 3 months ago

@dimasciput Here is the template for the checklist.

Normally the checklist would be created per National Park per Biodiversity Group. So a separate checklist for Birds, a separate checkist for Mammals etc.

Checklist template 2024_05_22.xlsx

Here is an example checklist xls file Example Checklist as xls file 2024_05_22.xlsx

helendallas commented 3 months ago

Please also see #3609

dimasciput commented 3 months ago

@helendallas can you give me example of the pdf report?

dimasciput commented 3 months ago

I have estimated this ticket to be 8, but this does not include the PDF due to its different layout and complexity.

@helendallas

helendallas commented 3 months ago

@dimasciput ok, I have prepared one but just getting input from Dian before I attach here.

helendallas commented 3 months ago

For the pdf version - it depends a bit on what you are able to do.

Here is the general layout (Table ) but with look of the attached pdf if possible. The text in red below provides an explanation of the details.

Some checklists may have more attribute information such as NEMBA which are derived from the attribute of taxa. Problem is if we have a lot of attributes then it will not fit on a page.

Screenshot 2024-06-13 at 13 43 20

Camdeboo NP Bird checklist - example pdf.pdf

dimasciput commented 3 months ago

@helendallas So currently, all the sources will be from GBIF, right? Because they are harvested from GBIF.

helendallas commented 3 months ago

Correct although they would like differentiation between iNaturalist records on GBIF and others if possible. When they start adding their data there will be more data sources

helendallas commented 3 months ago

@dimasciput Getting there thanks. Some points after discussion with Dian.

Please include two additional columns

For GBIF data, it is very NB to include the specific Dataset that the GFIF data originates from. The dataset can be extracted using the Dataset Key, which is a unique key linked to a specific dataset. I am not sure if this is already pulled down from GBFI, but if not it needs to be added please.

See here for examples of datasets. Screenshot 2024-06-18 at 11 57 30

dimasciput commented 3 months ago

Hi @helendallas

I have added : 'Park or MPA Name', 'Creation date', and 'Dataset' to checklist.

I will add more items from the remaining list.

helendallas commented 3 months ago

Looking good. Can you name the xls/csv file with better name, at the moment it is blank.

Possibly Park Name/MPU and Module Checklist.xls

dimasciput commented 2 months ago

@helendallas I have added the functionality to generate the pdf. I will update the naming later, should be quick one.

helendallas commented 2 months ago

@dimasciput Something is not working here. I tested the download checklist which was working before for csv and xls, but now it's not.

Here is what I go sent.

Checklist.csv

I also get a similar file for the PDF checklist

helendallas commented 2 months ago

Issues from when I could down the checklist: First column header should be: Accepted Scientific name and authority (including synonyms) Only English common name should be pulled from GBIF - here there are multiple names so something is wrong

Image

dimasciput commented 2 months ago

@helendallas, there are actually multiple English common names returned from GBIF for some species, e.g., Arctocephalus pusillus (Schreber, 1775) :

image

There is no indication in the data which common name is the 'official' one.

dimasciput commented 2 months ago

@helendallas I have updated the title. Currently, the common names are still showing all of them. We can show just the first common name, as it is done on the taxon management page.

helendallas commented 2 months ago

Issues:

CSV file for checklist not being email from staging. Request falls into a black hole :(

Image

Cannot download from production - spins

helendallas commented 2 months ago

Managed a pdf download of checklist on staging

helendallas commented 2 months ago

Managed download of csv, xls and pdf on staging. Waiting for feedback from SANParks

helendallas commented 2 months ago

Some comments thus far:

Please include Taxon Rank in the csv and xls as an additional Column.

Only include Species and Subspecies in the pdf. (Exclude all higher taxonomic levels including Genus, Family etc.)

helendallas commented 1 month ago

@dimasciput Have you done anything further on the checklist ticket yet?

dimasciput commented 1 month ago

@helendallas updated on staging, please give it a try

helendallas commented 1 month ago

Thanks @dimasciput I will review with the client today

helendallas commented 1 month ago

Some feedback:

Please include Family in csv and xls as well. We still need to check if all sources are making it into the PDF

helendallas commented 1 month ago

Also @dimasciput For the pdf, please make the display order alphabetical based on Accepted Scientific Name and Authority

dimasciput commented 1 month ago

@helendallas updated on the staging

helendallas commented 1 month ago

Sorry @dimasciput the issues with the pdf are sorted yet:

PDF

Image

XLS and CSV I cant check if family has been included as most checklists that have species and genera - I added a new family but the staging is very slow so think you may be doing updates? I will try again tomorrow

Update - this is including family, so happy with xls/csv

helendallas commented 1 month ago

Okay, thanks @dimasciput I did another check - and it is working now.

Image

Please deploy to production when ready

helendallas commented 1 month ago

Closing this now, Checklist issues will be created as new tickets