Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indices metadata - numeric bounds #894

Merged
merged 13 commits into from
Dec 13, 2023
Merged

Conversation

shawnlaffan
Copy link
Owner

Provides metadata for the numeric bounds of any non-categorical indices.

Also provides these data as JSON.

There are currently no categorical indices in Biodiverse. These can be supported if and when implemented. (CANAPE is a compound index not generated by calls to a Biodiverse::Indices object).

Updates #889

@shawnlaffan shawnlaffan added this to the Release_5.0 milestone Dec 13, 2023
@shawnlaffan shawnlaffan merged commit f469185 into master Dec 13, 2023
8 checks passed
@shawnlaffan shawnlaffan deleted the issue_889_index_bounds branch December 13, 2023 02:32
@vmikk
Copy link

vmikk commented Dec 13, 2023

Am I right in assuming that a JSON file containing index properties will be created during the Biodiverse run?
Given that index metadata is dispersed across various Perl modules (Endemism.pm, Rarity.pm, Indices.pm, etc.), can we obtain a consolidated ("static") version of this file which encompasses all the supported metrics (without performing analysis)?

@shawnlaffan
Copy link
Owner Author

shawnlaffan commented Dec 13, 2023

The JSON file is not created each run but the data components are. It just needs a call to stitch them all together.

Possibly it should be built each release, but the final list depends on the basedata components (mainly the hierarchical label ratios which might soon be archived).

A one liner for a unix shell is below. The result can be redirected to a file, although the first line will be unrelated logging and can be removed.

The call assumes you are at the top level of the Biodiverse repo but can be adjusted by changing the include path in -I./lib.

perl -I./lib -MBiodiverse::BaseData -E'say Biodiverse::Indices->get_calculation_metadata_as_json'

If it's easier I can add a script to the bin dir.

Edit: Windows version for Cmd shell is:

perl -I.\lib -MBiodiverse::BaseData -E"say Biodiverse::Indices->get_calculation_metadata_as_json"

@vmikk vmikk mentioned this pull request Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants