ropensci / neotoma

Programmatic R interface to the Neotoma Paleoecological Database.
https://docs.ropensci.org/neotoma
Other
30 stars 16 forks source link

`get_dataset` with "datasettype" specified returns other dataset types #217

Open bocinsky opened 7 years ago

bocinsky commented 7 years ago

Occurs when object of type site is passed to the function:

> "Beef*" %>%
+   neotoma::get_site() %>%
+   neotoma::get_dataset(datasettype = "pollen")
The API call was successful, you have returned  1 records.
A dataset_list containing 3 objects:
Accessed from 2017-03-05 20:29h to 2017-03-05 20:29h. 
Datasets:
 dataset.id    site.name    long      lat           type
        250 Beef Pasture -108.15 37.41667 pollen        
       7913 Beef Pasture -108.15 37.41667 geochronologic
      10472 Beef Pasture -108.15 37.41667 charcoal

My understanding is that the returned datasets should be filtered to only include "pollen" datasets.

NOTE: Correct behavior when passing a numeric site identifier to get_dataset:

> 246 %>%
+   neotoma::get_dataset(datasettype = "pollen")
The API call was successful, you have returned 1 record.

A dataset_list containing 1 objects:
Accessed from 2017-03-05 20:42h to 2017-03-05 20:42h. 
Datasets:
 dataset.id    site.name    long      lat   type
        250 Beef Pasture -108.15 37.41667 pollen
SimonGoring commented 7 years ago

Thanks! I'll look into this this week.