BiologicalRecordsCentre / ABLE

Assessing ButterfLies in Europe project repository
2 stars 3 forks source link

Extend user report to include 15-minute surveys #685

Open DavidRoy opened 3 weeks ago

DavidRoy commented 3 weeks ago

https://butterfly-monitoring.net/scheme-users-information

Currently only includes users who have entered data for transect survey: 562

The report needs to be extended to include additional surveys with Id: 565 645

CrisSevilleja commented 3 weeks ago

Current columns on the scheme user information page are related to the transect (562). The new surveys need a column with the survey type and name. Currently, there are columns related to training surveys, it would be good to keep them to control who is monitoring under training or not, but not sure how to organize it when including more surveys.

andrewvanbreda commented 3 weeks ago

Hi @DavidRoy @CrisSevilleja ,

I have double-checked the structure of these surveys. All 3 are similar with sub-samples, but the main difference is that the two 15 minute count surveys do not have a location attached, they just use a spatial reference. I assume an equivalent to the "Sites (number of transects)" column won't be needed on the other two surveys, as mentioned, they just seem to use spatial references.

I am also getting the impression from Cristina's comment you actually want this data separately for each survey rather than as one big total.

Given the above, can I suggest one of 3 options

  1. The first option is to use 3 grids? It might make it more elegant than a grid with something like 14 columns. They could all be downloaded separately. A wide grid could be very confusing to develop and use.

The disadvantage of 3 grids would be if you wanted a list of users, and on each row you did want to see the data from all 3 surveys at once.

2. As mentioned above, use one very wide grid

3. Or an alternatively, but perhaps unusual solution, might be instead of having lots of columns and multiple grids, to instead include multiple rows for each user up to the maximum of 3. The disadvantage here is that all you data for the different surveys would be jumbled up, but I guess you could do a sort by survey name if we include a column for that

Let me know your thoughts.

CrisSevilleja commented 3 weeks ago

Hi @andrewvanbreda I have been thinking about the three options you gave and what is best for the coordinators. I think the best option is number 1, to have three separate grids for the three current surveys (transect, 15min counts and moth traps). I understand the disadvantage, but we can try to have the same structure on the three grids so that the coordinator can combine them after downloading the reports if they want to.

Grid structure

If possible, and if it doesn't complicate things, I would include the year the user started registering data. Not urgent, just in case, is not difficult for the three grids.

This way the coordinators can keep better track of the users per year and in total for their schemes. Also, as we will have different coordinators for different surveys (not all coordinators for all surveys in all countries), it is good to have it separated. @DavidRoy do you like this idea?

DavidRoy commented 3 weeks ago

Thanks for thinking this through @CrisSevilleja. Good suggestions @andrewvanbreda - if these requests are complex we could potentially simplify

andrewvanbreda commented 3 weeks ago

Hi @CrisSevilleja @DavidRoy Yes we should be able to add the start year, I have done similar for another project at some point in the past I vaguely remember.

I think the 3 grids is a nice solution.

In terms of the Sites column, I will likely have questions about this when I implement the code, I will let you know.

@DavidRoy I guess my main question about this is its priority level. (In particular I would like to get back to the French data import sometime soon, which has been delayed longer than I would have liked).

andrewvanbreda commented 1 week ago

@DavidRoy @CrisSevilleja How about this? (which is currently on my test site only) https://avb-loc-rep-brc-ebms-d10.pantheonsite.io/scheme-users-information

Just to clarify, the count of samples this report currently shows are the main parent samples, not sub-samples. Also note that the "Year of first sample" is the earliest year of data entry on the website, it is not the field recording date (although I guess most of the time these are likely the same).

CrisSevilleja commented 6 days ago

@andrewvanbreda thanks for going further with this. I am not able to see the page on the test site.

Anyway, what is the difference between main parent samples and sub-samples?

Also, regarding the 'year of first sample', this should be the date of the field record, not when these data were added to the website. Several schemes have included earlier data when they joined, so transects with data from 2012, for example, will appear as data from 2018, when this is incorrect. Is there a way to make the "year of first sample" the year of the field record?

andrewvanbreda commented 3 days ago

Hi @CrisSevilleja ,

I have changed the date column to use the sampling date field instead. I have changed the name of the column to make this clearer.

You should be able to access the page, I can actually access it masquerading as you. If you see an Access Denied message, make sure you login before you use the link. Alternatively just go to the login page here, then access the page from the menu system as usual.

https://avb-loc-rep-brc-ebms-d10.pantheonsite.io/user/login

I notice you will not see any users on this report as you have no scheme on your account. I guess we could change the report so you are set as manager who could see data across all schemes if you want? For now if you want to see the report working, you could go to the People section of the site, click on a user and click on the link to masquerade as them.

In terms of your question about samples, this relates to the way the data is stored in the database.

So in the example of the EBMS Transects survey, the main sample is what the transect location is attached to, and the subsamples are what the sections and occurrences are attached to.

I see the other surveys also have this parent/child sample structure also.

Hope that helps

Andy