brahmwg / Bottlenecks_MDS_Capstone

Master of Data Science Capstone Project for Bottlenecks to Survival
0 stars 0 forks source link

SQL/Dashboard doubt #17

Closed riyaeliza123 closed 3 months ago

riyaeliza123 commented 3 months ago

Query: For each species in each system/watershed, list the fork lengths of the fish tagged and identify which of those fish were detected as returning adults (compare size structure of initial and returning cohorts).

So for this was initially working on microtroll and hatch_tag data (assuming microtroll is adult and hatch is child) but after yesterday's meeting they advised to use field.

I was wondering how we define "returning" adults, are these fishes that are "redetected" (from detections) after 100 days (example no. of days?)

brahmwg commented 3 months ago

The query could be rephrased as: "Which fish, based on fork length at tagging from the ods.field table, returned after 100 days post tagging. i.e. is there a bias in the size distribution (from juvenile outmigration) in the fish who were detected returning?"

The idea is to be able to see, for each system/watershed, species & year the distribution of fork lengths of fish tagged. Then to be able to relate that to the returns (individuals detected >100 days from tagging date).

Quoting Jamieson: "The way I have done this before is to create a histogram of fork lengths at tagging for each site, species and year. Might be best to start with Englishman system and coho. And then determine who from that tagging year and site returned the following years using the detections table and 100 days post tagging. Then create the same histogram for these returned fish and overlay that on the previous plot"

An example chart can be seen here: https://marinescience.info/superset/explore/p/DRM8Rj189rn/

riyaeliza123 commented 3 months ago

Thank youu! Yeah the rephrase helphed. I'll attempt it again after our meeting.

brahmwg commented 3 months ago

Your query should look at tag_id_longs which also appear in the detections table, and compare the tagging date with the detection date.