Skip to content

improve flags and exclude documentation #112

@sformel

Description

@sformel

The occurrence and checklist functions include the parameters flags and exclude. Implicit logic for using these parameters isn't well-documented. Here is what I've found for beefing up the docs:

  1. Works as expected: A single flag returns all occurrences that have that flag. These occurrences may have more flags.
    occurrence(datasetid = 'f5a4799e-dc24-4807-89d9-01da47d52e3b', flags = c('NO_ACCEPTED_NAME'))

  2. flag has implicit AND: multiple flags passed in the query contain an implicit AND. I was expecting it to be an implicit OR. For example, this query returns 0 results when there are 193 occurrences flagged as ON_LAND and 1312 with NO_ACCEPTED_NAME:
    occurrence(datasetid = 'f5a4799e-dc24-4807-89d9-01da47d52e3b', flags = c('NO_ACCEPTED_NAME', 'ON_LAND'))

  3. exclude has implicit OR: multiple exclude values passed in the query contain an implicit OR. This is what I would expect but I was uncertain because of flags testing. Not a big deal, but I think it would be useful to users to document it more explicitly. Example:
    occurrence(datasetid = 'f5a4799e-dc24-4807-89d9-01da47d52e3b', exclude = c('NO_ACCEPTED_NAME', 'ON_LAND'))

I also think it would be useful to include a helper function to list all the possible flags, like I've suggested for the field selection in #108

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions