Closed riyaeliza123 closed 4 months ago
Relevant tables:
- Delete tags that are found in hatch_recovery (after tagging at a hatchery, some fish die or reject their tag. These are classified as 'recoveries'. Essentially, tags in this table can be excluded from further analysis, because we know they died and cannot be re-detected later on.)
I have already created a view called viable_hatch_tag
which contains the list of tags from hatcheries excluding the recoveries. You can try to write the query yourself and see if it matches the view, or you can query using the view just like any other table.
Note: in the interface, under where you specify the database (pg_dwh) and schema (ods) there is a third box for 'see table schema'. There you can see a list of all the tables in the ods schema. Notice those listed with a little table icon are tables, whereas those listed with a little eye icon are views.
Note also that you are able to create tables and views in SQL Lab. The little 'down arrow' on the RUN button allows you to create a table or view based on a query you run.
Update- SQL query created, however, it's too large so I will be converting it to view
Excellent work @rafecchang ! What did you call this view? Is the code you produced for this documented somewhere (like in the queries.md or elsewhere?)
Update- put every data in the outM.ipynb file. The model is REALLY rough. Also only have two years of outmigration data- will have to find a way to have a test data set.
Update- wrote a new query for salmon detection data, now has more data. Build a linear model that did not consider lags- rough output. For future- consider more preprocessing or activation function.
Update- there is a logistic regression and a linear regression model using lagged data of 5 days. Need to split data and get confirmation on the accessibility of real time data.
Details : https://github.com/brahmwg/Bottlenecks_MDS_Capstone/blob/main/deliverables/outmigration_timing_model.md Goal : When to expect the spring outmigration to occur at each system for each species on given year
Example: Typically, Coho outmigrate first, and their outmigration timing is typically not as variable as Chinook. Chinook outmigration timing typically changes by days and weeks between years. In extreme years these changes can be over a month difference