https://github.com/gnames/gnstats
GNstats is a module to calculate statistics for a group of names using Catalogue of Life classification
https://github.com/gnames/gnstats
Last synced: 5 months ago
JSON representation
GNstats is a module to calculate statistics for a group of names using Catalogue of Life classification
- Host: GitHub
- URL: https://github.com/gnames/gnstats
- Owner: gnames
- Created: 2022-04-09T11:06:08.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-09-16T11:49:16.000Z (almost 4 years ago)
- Last Synced: 2023-11-30T11:04:39.517Z (over 2 years ago)
- Language: Go
- Size: 23.4 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GNstats
GNstats provides statistical taxonomic data for a collection of taxons.
It determines which Kingdom is the most prevalent for the collection,
provides Kingdom distribution, and finds the main taxon, which contains
at least 50% of all taxons.
## Usage
GNstats require objects that correspond to its `Hierarchy` interface. Such
interface has one method `Taxon()` which returns a slice of `Taxon` objects.
The `Taxon` object contains the following fields:
* ID string
* Name string
* RankStr string
* Rank Rank
The main constructor method calculates statistics on creation.
```go
hs := testData(t)
res := stats.New(hs, 0.7)
```