Skip to content

Instantly share code, notes, and snippets.

@peterdesmet
Last active August 16, 2018 11:50
Show Gist options
  • Save peterdesmet/dae1e33d99b141f057d042ca9d9f9a10 to your computer and use it in GitHub Desktop.
Save peterdesmet/dae1e33d99b141f057d042ca9d9f9a10 to your computer and use it in GitHub Desktop.
Example of specifications in full text vs whip. See http://github.com/inbo/whip for more info.

Our specifications

occurrenceID

Every record should have an occurrenceID.

basisOfRecord

Accepted values:

HumanObservation
PreservedSpecimen
Occurrence

eventDate

Express dates in the ISO 8601 standard, e.g.:

2016
2016-12
2016-12-06

Date ranges are not accepted

Dates have to be between 1830 and 2014.

coordinates

Values need to be a decimal number.

Values need to have exactly 5 decimals.

decimalLatitude

Between 50.68 and 51.51 (within Flanders, Belgium)

decimalLongitude

Between 2.54 and 5.92 (within Flanders, Belgium)

recordedBy

Observers are anonymized to their ID. Use the format: observerID:1CF3F4.

The ID itself does not contain more than 6 characters.

If there are more than one observer, delimite these with space pipe space: |

occurrenceID:
empty: False # Every record should have an occurrenceID.
basisOfRecord:
allowed: [HumanObservation, PreservedSpecimen, Occurrence]
eventDate:
dateformat: ['%Y-%m-%d', '%Y-%m', '%Y'] # The ISO8601 format, but no ranges
mindate: 1830-01-01
maxdate: 2014-12-31
decimalLatitude:
numberformat: '.5'
# Coordinates are within Flanders, Belgium
min: 50.68
max: 51.51
decimalLongitude:
numberformat: '.5'
# Coordinates are within Flanders, Belgium
min: 2.54
max: 5.92
recordedBy:
delimitedvalues:
delimiter: " | " # Observers are delimited with space pipe space
regex: 'observerID:.+'
maxlength: 17 # ID contains 6 characters (11 for observerID: + 6 for ID itself)
## Additional tests, not expressed in the Markdown documentation.
individualCount:
numberformat: x
min: 1
max: 200
type:
if:
- basisOfRecord:
allowed: HumanObservation
allowed: Event
- basisOfRecord:
allowed: PreservedSpecimen
allowed: PhysicalObject
- basisOfRecord:
allowed: Occurrence
allowed: Text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment