Closed lukasjelonek closed 9 months ago
The statistics page should server the following purpose:
To handle 1. it would be sufficient to have a component that displays the category and number:
To handle 2. there are multiple options:
We already have precomputed krona plots in html format. They can easily be included as a separate page. See #34
Having the componenents we should find a good-enough layout for the landing page.
Example histogram data:
[
{
"key": "Salmonella enterica",
"count": 178581
},
{
"key": "Escherichia coli",
"count": 89135
},
{
"key": "Streptococcus pneumoniae",
"count": 51433
},
{
"key": "Mycobacterium tuberculosis",
"count": 49007
},
{
"key": "Staphylococcus aureus",
"count": 47997
},
{
"key": "Campylobacter_D jejuni",
"count": 28335
},
{
"key": "Neisseria meningitidis",
"count": 17153
},
{
"key": "Streptococcus pyogenes",
"count": 16821
},
{
"key": "Klebsiella pneumoniae",
"count": 13637
},
{
"key": "Clostridioides difficile",
"count": 13579
},
{
"key": "Listeria monocytogenes",
"count": 12245
},
{
"key": "Listeria monocytogenes_B",
"count": 12244
},
{
"key": "Streptococcus agalactiae",
"count": 10359
},
{
"key": "Neisseria gonorrhoeae",
"count": 8904
},
{
"key": "Campylobacter_D coli",
"count": 8849
},
{
"key": "Enterococcus_B faecium",
"count": 8284
},
{
"key": "Pseudomonas aeruginosa",
"count": 6286
},
{
"key": "Vibrio cholerae",
"count": 5562
},
{
"key": "Acinetobacter baumannii",
"count": 5124
},
{
"key": "Mycobacterium abscessus",
"count": 2689
},
{
"key": "Legionella pneumophila",
"count": 2110
},
{
"key": "Enterobacter hormaechei_A",
"count": 1917
},
{
"key": "Enterococcus faecalis",
"count": 1906
},
{
"key": "Burkholderia mallei",
"count": 1826
},
{
"key": "",
"count": 1786
},
[...]
]
Example stats data:
{
"datasets": 661383,
"genera": 2467,
"species": 8208
}
Some minor adjustments are still needed to finish this issue, namely the orientation of the plot and the positioning on the website.
The visualization is one part of this issue. The server has to provide the data.
Proposed server updates:
Add /stats/
Endpoints:
/stats/summary
/stats/genera
/stats/species
These endpoints provide the data in the format shown above.
The server stats endpoints are implemented and deployed.
Changes to the proposal: The /stats/genera
endpoint is named /stats/genus
.
The landing page should list some statistics about bakrep, e.g. dataset count, count of unique taxa, dataset size. This can be extended once it is clear which stats are relevant or not. For the beginning it should display some hard coded numbers.