BiologicalRecordsCentre / UKBMS

Repository to store and track enhancements, issues and task regarding the UK Butterfly Monitoring Scheme
0 stars 0 forks source link

Interactive trends/phenology charts page #27

Open burkmarr opened 1 year ago

burkmarr commented 1 year ago

Trends and phenology charts are available for each species on the species accounts pages: https://ukbms.org/species. These are being updated to replace the image with a chart generated by the BRC Charts library - see this related issue: https://github.com/BiologicalRecordsCentre/UKBMS/issues/28. But comparing taxa is difficult becaues each species has a completely separate page. This issue covers the creation of a new page to easily switch between and compare taxa.

burkmarr commented 1 year ago

The initial development can be viewed on this Pantheon multidev site: https://burkmar-brc-ukbms.pantheonsite.io/charts1

burkmarr commented 1 year ago

@colinharrower is looking into adding country-level trend data.

burkmarr commented 1 year ago

From @DavidRoy: One thing I’d like to see is the ability to have multiple lines on the same chart, e.g. to compare between countries. Perhaps a set of radio buttons would work better than the country selector?

burkmarr commented 1 year ago

Some questions/comments from James Heywood and responses (italics) from @DavidRoy:

  1. Does the orange block for the last 10 years mean anything other than that and regardless does it need explaining (or have some mouse-over pop-up)?

It is a visual aid to assess the short term (10-year) trends.

  1. Is there any value in individual year index values being available either as mouse-over pop-ups, or as a separate table to download, or both?

I don’t think there’s much value in this as the index values are not meaningful. We should like to the dataset for these results though, you are right.

  1. Forgive my ignorance, but do these trends come with confidence intervals and if yes, would the plots gain value from their inclusion (I tend to say 'yes', but that is probably in part having that beaten into me from a young age).

We will give a separate trend summary. We do have confidence intervals around the index values but we don’t think they are realistic for all species. We plan some more work on this.

  1. As well as multiple lines on the same plot for different countries, would that potentially include different species for the same country?

Possibly although we don’t want to overcomplicate the interface too much.

  1. Can you download data that underlies the plot somewhere else so that others can re-draw it to their specifications?

Good idea, we’ll link to the data source. We will also provide an option to download a high quality version of the plot image.

  1. Similarly, can the redline phenology (historical) have some measure of variance, perhaps to give the difference between blue and red some context?

These are standardised between 0 and 1 so not so meaningful. This is useful for comparing between years. We will look at providing absolute values of the flight periods.

  1. As well as measuring the significance of a long-term trend, do you also do the same for short-term (1 year)? If so, can you similarly colour code the between-year lines to give a picture of whether individual fluctuations were themselves significant?

We have short and long-term trends and will develop some visual summaries of these.

burkmarr commented 1 year ago

Tasks for this page from the comments above:

burkmarr commented 1 year ago

I've updated the multidev site (https://burkmar-brc-ukbms.pantheonsite.io/charts1) with changes to address the four points above. Instead of replacing the 'switching' behaviour of the country drop-down list with the overlay behaviour (check buttons), I've provided the means to switch between these two behaviours. The drop-down list is replaced with country radio buttons and you can switch between switching behaviour (radio buttons) and overlay behaviour (check-boxes) with a button group.

It proved quite difficult to enable the overlay behaviour for various reasons which required changes to the temporal chart, but it is done. In general the overlay behaviour results in a congested chart, but you can highlight/lowlight the elements from different countries by clicking on their corresponding legend elements. Currently all countries are being shown in black - which we may want to change - but this will be complicated by the fact that we already use red and blue for decreasing and increasing trends.

The download buttons for chart images and data are towards the bottom of the display underneath the charts.

DavidRoy commented 1 year ago

Thanks Rich - that's excellent for demonstrating the potential. One quick comment is whether the colours for the different series could be easier to tell apart.

I also think we need to simplify the charts for comparing time series between countries as it's currently quite cluttered. The plots in https://butterfly-conservation.org/butterflies/the-state-of-britains-butterflies work well.

I suggest we 'park' the multi-species/multi-country charts for now as we are discussing the way we analyse the data

burkmarr commented 1 year ago

Thanks @DavidRoy - I really like those charts in the butterflies report. We could use similar colours and styles for the interactive page. I agree that it looks rather busy at the moment. Probably we should remove the dots when charts are being superimposed. Anyway, I'm happy to park it for now as you suggest.