Hello
Within the rgbif-package i am trying to collect datatsets that match some contraints like having media (StillImage) and being preserved specimen.I also want to filter them by their TaxonKeys. So as for occurrence records, it could look like this:
occ_with_images ← occ_search(
mediaType = “StillImage”,
basisOfRecord = “PRESERVED_SPECIMEN”,
taxonKey = 7289045,
limit = limit,
start = start
)
Where i will get a nested list with occ-records and along some other information the datasets name (or better the datasetKey) the occurrence belongs to.
So i am wondering, is there a way, to request the datasets directly that match the constraints?
Currently i have to fetch the occurrence records and extract the unique DatasetKeys behind them and only then i can start to access the datasets of interest.
It might be important to note, that we do not know the datasetkeys or datasets names beforehand. We are rather trying to identify datasets of interest matching specified parameters. I did find the datasets() function, but no work around to apply constraints in a similar manner as it is possible for the occ_search() or occ_download().
dataset_search() seems to only allow for a query to filter for stillimages and preserved specimen, which is not precise enough.
I hope i was able to make clear what i am looking for, and big thanks in advance!
@mgrosjean , @jwaller
thanks to both of you. I now get a table of datasetKeys very quick and effective. There is just one open question for me - not sure if this should go in a new thread: Where do i find the dataset names to the corresponding datasetKeys?
If i use the TaxonKeys above, i find 5 distinct datasetKeys, but only 3 dataset names in “datasetName”. Yet of course, if i manually search for the 5 datasets with the datasetKeys (e.g., OAC-BIO Herbarium) I find 5 different datasets with different names. Can you maybe let me know where exactly i can find the same information when using the rgbif package? Without having to make it a 2-step search ideally.