plazi / treatmentBank

Repository devoted to house keeping of treatmentBank
0 stars 0 forks source link

count figures for a taxon #76

Open myrmoteras opened 1 year ago

myrmoteras commented 1 year ago

@gsautter @CNaseband how can I count the number of figures that include class=Reptilia? this must be about 10,000, but when I do this I get far too many:

https://tb.plazi.org/GgServer/dioStats/stats?outputFields=cont.figCount+treat.classEpithet&FP-treat.classEpithet=Reptilia&format=HTML

gsautter commented 1 year ago

Well, this gives you the total number of figures in articles that have at least one treatment on a reptile ... and that, per publication, sums up times the number of reptile treatments due to the SQL cross product ... pretty insidious, but actually expectable SQL behavior, unfortunately.

gsautter commented 1 year ago

The actual number of figures in articles that have at least one treatment on a reptile is 16062, courtesy Excel, in which I inserted https://tb.plazi.org/GgServer/dioStats/stats?outputFields=doc.articleUuid+cont.treatCount+cont.figCount+treat.id+treat.classEpithet&groupingFields=doc.articleUuid&FP-treat.classEpithet=Reptilia&format=TSV , divided the indicated numbers of treatments and figures by the number of treatment UUIDs to compensate for the effect of the cross product, and summed up the result.