BNHM / AmphibiaWebDiseasePortalAPI

API code for the AmphibiaWebDiseasePortal

Home Page:https://amphibiandisease.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Query: stats per scientific name

birbjam opened this issue · comments

Can we do something like this?

{ 'scientificName': 'Alytes obstetricans', 'commonName': 'Midwife Toad', 'order': 'Anura', 'family': 'Alytidae', 'associatedProjects': [ {'projectId': 284, 'projectTitle': 'Midwife Toads taking over the swamps', 'projectURL': 'https://amphibiandisease.org/projects/?id=284'}, {'projectId': 260, 'projectTitle': 'Midwife Toads doing their thing', 'projectURL': 'https://amphibiandisease.org/projects/?id=260'} ], 'diseaseTested': [ {'samplesCollected': 400, 'bdTested': 300, 'bsalTested': 100, 'bdPositive': 250, 'bdNegative': 50, 'bsalPositive': 1, 'bsalNegative': 99, 'bothPositive': 1, 'bothNegative': 149 } ] }}

This would help with 2 open issues in the ADP:
#45 and #47.

This is mostly implemented in latest commit. It is only a list of scientificNames and the projects they appear in along with project counts.

  1. information such as commonName, order, family, etc... is not filled out consistently in the db so not appropriate to get there. Perhaps this can be retrieved from AmphibiaWeb?

  2. information on projects can be retrieved from projectStats file which you should have access to.

  3. possible to get Bsal/Bd counts from scientificName_Both_stacked.json

Ah, so i guess this solution is not perfect but at least you don't need to filter through all the projects to get data. just queries against the scientificname_list.json, scientificName_Both_stacked.json and the project stats.

Not sure what you mean by project stats?

Thats the call to the JSON File which contains all the project information in GEOME.... the one that populates the project list..