dermestid / bold-phylodiv-scripts

Scripts to calculate phylodiversity and its distribution from BOLD DNA barcode data.
1 stars 0 forks source link

Output GBIF observation count from get_gbif_stats_g #116

Closed dermestid closed 3 years ago

dermestid commented 3 years ago

In hill_diversity_number.php, within each output function, add the line $total = $gen->current()['total']; and change all return statements return x to return [x, $total] or return [null, 0] In get_gbif_stats_g.php, change the diversity function call to: [$loc_diversity, $total] = $diversity($gbif_data_gen); and the yield statement to yield [ 'location' => $loc, 'diversity' => $loc_diversity, 'observations' => $total ]; In get_gbif_diversity.php, change the result building function call to $geojson_ar = make_geojson($res, ['iteration', 'diversity', 'observations']);