ices-eg / wg_WGEEL

Joint EIFAAC/ICES/GFCM Working Group on Eels
http://ices.dk/community/groups/Pages/WGEEL.aspx
5 stars 16 forks source link

Adding pooled data in the DB #293

Closed cedricbriandgithub closed 8 months ago

cedricbriandgithub commented 1 year ago

Contaminant data collected in the Netherlands within a sampling scheme for human health are from a mixed sample (pooled). Samples of tissues coming from different individuals are mixed together before analysis. These group data are not representative of the population (as only the larger females are collected), but they have grouped characteristics like mean length. At several locations such mixed samples are taken and analysed.

Those data can not be allocated to a single sampling scheme in t_sampling_sai, because only one value is allowed per year and the values per location can not be grouped. Currently when trying to enter those data, we get an error as there are several lines of data for the same year and there is a unicity constraint on year, sai_id (sampling), so we only create on group per year.

To enter those there are two solutions

(1) import them as individual data, the individual metric table will have to be changed to indicate if the data come from pooled individuals. (2) Enter several data for the same year in group metrics, add columns X and Y and then add an unicity constraint on location.

There are several issues with both, in both cases we need to change the db structure

(1) The individual metrics might not allow values different than 0 or 1 (but not sure it's working now it's in the metricind not metricindsamp ... TO BE CHECKED ... mei_mty_is_individual() ). (2) The group metrics are meant to be representative of the EMU. When discussing together that's not always the case so we could add a column saying whether the goup metric is representative of the EMU (would it be true for all metric ??). On top of that we might be reluctant to have more than one value per year. In large EMU's consisting of many waterbodies (like the Netherlands, which is one EMU), most grouped data will not be representative for the whole EMU.

cedricbriandgithub commented 8 months ago

If we are not going to work with contaminant data, this is too complicated