BiologicalRecordsCentre / BRCindicators

An R package for creating indicators from trends data
4 stars 11 forks source link

Errors with new version of sparta #22

Closed AugustT closed 4 months ago

AugustT commented 5 years ago

The new version of sparta generates regional outputs, so there is no longer 1 set of psi.fs values but a number of different sets for regions (eg Wales) and aggregates (eg UK). We need to update the indicator package to deal with this.

@GPowney The line that needs to be change is here.

https://github.com/BiologicalRecordsCentre/BRCindicators/blob/9ffbf77c8f16a09b5a4d2cc793a21751873174af/R/misc_functions.r#L12

As we discussed the user should have the option to name any region or aggregate in the data. There should be an error message if the user gives a location that is not valid, the error message should state what are vaild locations e.g. "'Wlaes' is not a valid region or aggregate, valid values for this dataset are 'Wales', 'England', 'Scotland', 'Northern_Ireland', 'Britain' and 'UK'". Also the parameter that specifies this will been to cascade through the functions from lambda_indicator to getData to read_posterior

JHHatfield commented 4 years ago

This has already been done. Only summarise_occDet.R outstanding which should be covered by my pull request.

DylanCarbone commented 4 months ago

Fixed in pull request #43