SarinaAtkinson-NOAA / SEFSC-ODM-Management-History

A method for generating an analysis-ready version of the Management History Dataset
Other
0 stars 0 forks source link

Review end_time_use #14

Closed SarinaAtkinson-NOAA closed 1 year ago

SarinaAtkinson-NOAA commented 1 year ago

https://github.com/SarinaAtkinson-NOAA/SEFSC-ODM-Management-History/blob/a0d14bdbf0af8225ba4ddb1c1e2116fee7bdb38c/code/MH01_new_variables.R#L184-L185

I know I have asked this before, but why do we have end_time only getting changed if the status type is recurring? If you review CLUSTER 1030 for South Atlantic Gray Triggerfish closures, these are one time closures with end times of "12:01" and I would think we want those removed as well. I am not changing anything yet, but @AdyanRios-NOAA what do you think about changing end_time_use so it is not dependent on the status_type?

AdyanRios-NOAA commented 1 year ago

I think we do want to change it.

There is also a part in dates that does not make sense anymore. It looks like all three lines do the same thing (?)

https://github.com/SarinaAtkinson-NOAA/SEFSC-ODM-Management-History/blob/a0d14bdbf0af8225ba4ddb1c1e2116fee7bdb38c/code/MH04_dates.R#L128-L140

AdyanRios-NOAA commented 1 year ago

The tricky bit is that some regulations do actually start and end on the same day

SarinaAtkinson-NOAA commented 1 year ago

Cluster 108 has one time trip limits with the end date 3/1/YYYY 12:01 AM - these we can adjust the end time because we know the end year. The end date was adjusted, but now we need this carried through for end day use and end time use.

Cluster 252 is for a seasonal quota with the end date 3/1 12:01 AM - these we will want to retain the end time as 12:01. And when mh_newvar is created, the end date is still null so we will not be able to adjust the end day and end time using the end date.

There are only 2 clusters (279 & 280) where the end time is 12:01 AM and we have an end day of the week. However, both do not have end day = 1. So we will not need to adjust the end day of the week as well.

SarinaAtkinson-NOAA commented 1 year ago

Checked against example clusters above and should be working now