NewGraphEnvironment / fish_passage_skeena_2023_reporting

https://newgraphenvironment.github.io/fish_passage_skeena_2023_reporting
Creative Commons Zero v1.0 Universal
0 stars 2 forks source link

Updated hab conf #103

Closed lucy-schick closed 2 months ago

lucy-schick commented 2 months ago
NewGraphEnvironment commented 2 months ago

fixed the full_join which wasn't working because not all the keys were being matched so it was just adding rows to the end >instead of actually joining the data.

I think Some other input must have been missing or incorrect for the full join not to function in 2023 if it is the same in all the past repos. ... We should try again with all the columns next time and watch out for this. Can you check a couple past running reports and make an issue in fish_passage_template_reporting and reference that PR change? Off to a meeting

lucy-schick commented 2 months ago

Figured out the issue. The reason it didn't work for me is because step_2_fish_coll_data was partly filled out but the join by columns were not filled out, therefore not all the keys matched, so it wouldn't join (instead added rows to the bottom)

In the typical workflow, step_2_fish_coll_data is empty when this code is run, because it is being run to build hab_con_fish_summary.csv which is used to populate step_2_fish_coll_data, so this isn't an issue. step_2_fish_coll_data should get populated by the csv and then then the rest of the data is hand bombed. But this wasn't the case for me because I had already populated step_2_fish_coll_data with the ef data (but was missing sampling_method, method_number, and haul_number_pass_number so didn't join), but needed to re run with the updated site names and temp/cond/turb data.

I ran this code in the skeena 2022 report and all works well. I think we can disregard my edits and revert back to og script