LandSciTech / ccviR

Implement NatureServe climate change vulnerability index in R
https://landscitech.github.io/ccviR/
Other
2 stars 2 forks source link

Creation of CCEI from scratch #25

Open see24 opened 3 years ago

see24 commented 3 years ago

Add ability to create CCEI from scratch to prep_data_mod. This would allow different CC scenarios and also different non-breeding ranges, currently restricted to South American nonbreeding ranges.

see24 commented 2 years ago

Look at these two papers for ideas: Williams 2007 Uses Euclidean distance and seasonal temp and moisture vars. Belote 2018 Uses euclidean distance of PCA and 11 bioclimatic variables.

adricaswell commented 4 months ago

Update CCEI exposure table (tbl_ccei) to get breaks from the climate read me. Once the climate readme file contains the ccei breaks the code can be updated as follows:

    output$tbl_ccei <- gt::render_gt({
      req(spat_res2())
      get_exposure_table(spat_res2(), "CCEI", clim_readme(), clim_readme()$brks_ccei)
    })


Once the value of the CCEI exposure is figured out, this will also need to be added to the table via get_exposure_table(). Ideally, the exposure value will be in spat_res2() so that the value will be added in the exp_df which is created by filtering spat_res2() by exp_cave. Then, the exp_val associated with varname == "CCEI" can be updated to "ccei_exp_cave" (or whatever the name of the column containing the CCEI exposure is). Then, the exp_res_df should automatically pull the CCEI exposure (like it does for MAT and CMD). If the exposure value will not be in spat_res2(), get_exposure_table() will require some updating to add the exposure value to the table (it would probably be best to add the exposure value into the exp_df as whatever exp_value is called).

While doing this, make sure that the breaks are ordered properly. When this table was created we weren't certain if > 7 was class 4 (high) or class 1 (low). Based on comparing the map to the table I think we got it right but worth double checking.

see24 commented 3 days ago

Lets use https://www.worldclim.org/data/cmip6/cmip6_clim30s.html MAT is in the bioclimatic variables. Will need to figure out how to calculate moisture but I believe it can be done from data available there. I would try to find where https://github.com/bcgov/climr does their creation of climate variables since I know they include CMD.

Ideally use an ensemble, maybe just use the 8 recommended here https://bcgov.github.io/climr/articles/guidance_ensembleSelection.html. Could start with just one if creation of ensemble is challenging