Content changes (mainly year-related) to be made to steps after trend (and occupancy) model runs.
[ ] Code for fixing to certain version of results (fix_to_printed_results.R) to be checked/updated before resolving and classifying.
[ ] Future-year projected value columns (including extra.years object), and High Priority breakup comparisons, in to be updated as appropriate (TBD).
[ ] Sensitivity checks for current trend (each year dropped manually)
[ ] 00_plot_functions.R needs significant update to incorporate one new year in graphs (2022, 2023 coded manually). This will stabilise once CAT reaches 10 years.
[ ] 20_website_database.R may or may not need updates in file/folder naming (L 97, 98, 102). TBD.
SoIB_mapping_2023.csv still has some columns yet to be mapped. Also, this CSV will be regularly updated to reflect changes, e.g., updates to IUCN status 57ed26b.
[x] Map the following columns: BLI.Common.Name, BLI.Scientific.Name, IUCN.Category, WPA.Schedule, CITES.Appendix, CMS.Appendix
20_website_SoIB_main.R:
[ ] proprange2022/Range Coverage columns and BLI name columns to be updated.
[ ] 2015\u20132023 in may or may not need update (TBD).
[ ] "2023" in column names and file names --> "2024"
Update: 10 Oct 2024
Occupancy
@rikudoukarthik :
[x] In run_species_occupancy-presence.R, add code to delete all .csv output files before writing new ones, because file names are of species names, some of which have changed with taxonomy update
[x] In resolve occupancy, add code to delete old output files before writing new ones (species names changed). Old occupancy result values are needed only for website output, which will be taken directly from SoIB_main.csv anyway.
Resolve trends
@rikudoukarthik :
[ ] Remove all steps related to IUCN future projection and its sensitivity checks (only done last year, not being done in future; point # 2 above)
[ ] Update classification step of subnational level Priority Status: just take Priority from national level, but keep classifying long-term and current trend statuses. Subnational levels do not have range size being calculated, so it doesn't make sense to assess separate priority.
[ ] Website already only shows national level Priority for subnational levels. When this change made to main pipeline, update website database code appropriately
[ ] Remove fix_to_printed_results.R and associated files/calls in code elsewhere. This was done because main SoIB 2023 run was done before some additional sensitivity checks were put in place for classification, and we wanted to maintain consistency with the report. Now, we are updating these anyway.
[ ] Before writing the output trends.csv file in L878 :
[ ] Combine latest dataframe with previous "major update" data (which is currently just the old trends.csv file so load that first)
[ ] Add a new additional column denoting whether each row is part of the data from the latest interannual update (or, is not part of the latest "major update" data)
Classify and summarise
@ashwinv2005 :
[ ] In the beginning when reading in trends.csv, add a condition (if (interannual_update == TRUE)) to filter the data for only those rows which are from the latest interannual update (but retain the column in the data object) because we want new classifications to compare
[ ] Before writing the output SoIB_main.csv file in L501:
[ ] Rename latest data AH:AM and BI:BU columns by adding the suffix _LATEST.ANNUAL or _lat_ann
[ ] Combine information from previous and latest runs
[ ] Columns AH:AM and BI:BU from previous "major update" data (which is currently just the old SoIB_main.csv file so load that first) are needed separately, rest all overwritten with latest
[ ] The new main object will have updated taxonomy (basis latest mapping file), so map to old using this
[x] (SoIB_main_wocats.csv will be overwritten entirely, in resolve above, without the two kinds of columns)
[ ] Add conditional in summarising step to skip the step if interannual update
[ ] Add another conditional step only for interannual updates to compare latest interannual results with previous "major update" results (matrix of status comparisons + actual list of species with major changes)
Plotting
@rikudoukarthik :
[ ] Delete all old plot files (both trends and maps) before writing new ones (species name changes)
[ ] Remove code for generating systematic monitoring plots from all scripts (done last year and won't be done the same way in future)
[ ] Add conditional for multispecies and composite plots steps: only when interannual_update == FALSE
[ ] Make all plotting scripts/functions (e.g., plot_import_data(), geom_axisbracket(), etc.) year-agnostic, using soib_year_info()
[ ] Single filter on two columns (but year-agnostic): filter((year %in% 1992:2022 & latest_interannual == FALSE) | (year == 2023 & latest_interannual == TRUE))
[ ] To make this filter condition year-agnostic, soib_year_info() needs to be updated with a new option to output the year of the latest "major SoIB update"
[ ] This filter is only needed when interannual_update == TRUE
[ ] Update plot features:
[ ] x-axis plot settings will all need to be tweaked with trial-and-error to accommodate the new year. Best to automate it as much as possible (as done for y-axis breaks).
[ ] Add visual elements for distinguishing the latest interannual data on plots from old data
Content changes (mainly year-related) to be made to steps after trend (and occupancy) model runs.
fix_to_printed_results.R
) to be checked/updated before resolving and classifying.extra.years
object), and High Priority breakup comparisons, in to be updated as appropriate (TBD).00_plot_functions.R
needs significant update to incorporate one new year in graphs (2022, 2023 coded manually). This will stabilise once CAT reaches 10 years.20_website_database.R
may or may not need updates in file/folder naming (L 97, 98, 102). TBD.SoIB_mapping_2023.csv
still has some columns yet to be mapped. Also, this CSV will be regularly updated to reflect changes, e.g., updates to IUCN status 57ed26b.BLI.Common.Name
,BLI.Scientific.Name
,IUCN.Category
,WPA.Schedule
,CITES.Appendix
,CMS.Appendix
20_website_SoIB_main.R
:proprange2022
/Range Coverage columns and BLI name columns to be updated.2015\u20132023
in may or may not need update (TBD).Update: 10 Oct 2024
Occupancy
@rikudoukarthik :
run_species_occupancy-presence.R
, add code to delete all.csv
output files before writing new ones, because file names are of species names, some of which have changed with taxonomy updateSoIB_main.csv
anyway.Resolve trends
@rikudoukarthik :
fix_to_printed_results.R
and associated files/calls in code elsewhere. This was done because main SoIB 2023 run was done before some additional sensitivity checks were put in place for classification, and we wanted to maintain consistency with the report. Now, we are updating these anyway.trends.csv
file in L878 :trends.csv
file so load that first)Classify and summarise
@ashwinv2005 :
trends.csv
, add a condition (if (interannual_update == TRUE)
) to filter the data for only those rows which are from the latest interannual update (but retain the column in the data object) because we want new classifications to compareSoIB_main.csv
file in L501:_LATEST.ANNUAL
or_lat_ann
SoIB_main.csv
file so load that first) are needed separately, rest all overwritten with latestmain
object will have updated taxonomy (basis latest mapping file), so map to old using thisSoIB_main_wocats.csv
will be overwritten entirely, in resolve above, without the two kinds of columns)Plotting
@rikudoukarthik :
interannual_update == FALSE
plot_import_data()
,geom_axisbracket()
, etc.) year-agnostic, usingsoib_year_info()
plot_load_filter_data()
):filter((year %in% 1992:2022 & latest_interannual == FALSE) | (year == 2023 & latest_interannual == TRUE))
soib_year_info()
needs to be updated with a new option to output the year of the latest "major SoIB update"interannual_update == TRUE