inbo / camtrapdp

R package to read and manipulate Camera Trap Data Packages (Camtrap DP)
https://inbo.github.io/camtrapdp/
Other
5 stars 0 forks source link

Bug in processing occurrenceRemarks #92

Closed peterdesmet closed 2 months ago

peterdesmet commented 2 months ago

See https://api.gbif.org/v1/occurrence/4902997329/fragment for a processed occcurrence:

OccurrenceRemarks is split over multiple fields:

"occurrenceRemarks": "\"Last photo",
"occurrenceStatus": "present",
"organismID": " on the right in the dark super vague\"",

Causing all fields to be misaligned: https://www.gbif.org/occurrence/4902997329

To be investigated in write_dwc()

peterdesmet commented 2 months ago

Source dataset: https://ipt.nlbif.nl/resource?r=awd_pilot1

peterdesmet commented 2 months ago

The output is correctly escaped in the csv:

Image,CC-BY-4.0,,,Agouti,Camera trap data recorded during pilot studies in the Amsterdamse Waterleidingduinen - pilot 1,MachineObservation,,5a162ce0-fc52-41bf-96a1-5239b1a00fb6,1,,,,present,"Last photo, on the right in the dark super vague",,27d1c58f-b6d5-4993-9700-3a344636838a,AWD_2_13082021_pilot bc34dfce-8ee3-4e97-870e-d53079b80ce1,2022-09-03T03:23:04Z/2022-09-03T03:23:12Z,,camera trap,2021-08-14T10:00:19Z/2022-12-31T21:57:03Z,camera trap without bait,17d28e00-08d0-4e98-bf8e-dbad332f419e,AWD Zilkerpad,,,0.3,0.3,52.32333,4.503056,EPSG:4326,,,Lindy Schneider,2023-03-07T12:37:54Z,classified by a human,https://www.checklistbank.org/dataset/COL2023/taxon/5BSG3,Vulpes vulpes,Animalia

@MattBlissett I think this should be handled as part of GBIF processing.

MattBlissett commented 2 months ago

https://github.com/inbo/camtrapdp/blob/ce9d3cf7a7afc9e7d0213e92336be687f25ac405/inst/extdata/meta.xml#L2

This should be fieldsEnclosedBy=""" (and for the multimedia table).

sannegovaert commented 2 months ago

Fixed in https://github.com/inbo/camtrapdp/pull/95