OBS (OBservationS)¶
Each row represents an event that occurred. Events may be recorded as part of a follow, at the feeding station, or on some other, more ad-hoc, basis.
OBS rows are EVENTS rows, but extended with the date, AnimID, and other information found on WATCHES.
The OBS view is convienent when writing queries, instead of having to
JOIN EVENTS with WATCHES every time behavior is queryed.
For example, below is a query that returns all the arrivals and departures from the feeding station attendance records, showing bananas eaten.
SELECT obs.wid, obs.eid, obs.date
, obs.focal AS animid
, obs.start AS arrived, obs.stop AS departed
, arrivals_a.bananas
FROM obs
JOIN arrivals_a ON (arrivals_a.eid = obs.eid)
ORDER BY obs.focal, obs.date, obs.start;
It is important to remember that the AnimID value presented, the OBS.Focal column, is the value found in WATCHES.Focal. This is not always the individual observed to have exhibited some behavior or otherwise participated in the event. That individual is found in a related ROLES row, in the ROLES.Participant column.
For example, grooming information is recorded in B-Record follows. So the OBS.Focal is the focal of the follow, not necessarily the individual doing the grooming. To find every (unique) grooming event, from the groomings recording during B-Record interval scanning, and the individual doing the grooming, whether or not the grooming is reciprocal, the ROLES.Participant column must be used[1], as in the following query:
SELECT obs.wid, obs.eid, obs.date
, obs.start AS time
, roles.participant AS animid
FROM obs
JOIN roles ON (roles.eid = obs.eid)
JOIN groom_scans_b ON (groom_scans_b.eid = obs.eid)
WHERE (roles.role = 'Actor'
OR roles.role = 'Mutual')
AND NOT groom_scans_b.duplicate
ORDER BY roles.participant, obs.date, obs.start;
The following query returns every day every individual was observed exhibiting a behavior[2]:
SELECT obs.date, roles.participant AS animid
FROM obs
JOIN roles ON (roles.eid = obs.eid)
GROUP BY roles.participant, obs.date
ORDER BY roles.participant, obs.date;
The OBS.Focal column contains the chimpanzee who, in some sense, is the reason why the observers were present. Often this is the focal of the follow that was ongoing when the event occurred.[3] (Hence the name OBS.Focal.) Feeding station attendance observations have for their OBS.Focal value, the individual who arrived at the feeding station.[4] Other kinds of events, distinguished by their OBS.Behavior values, have other rules regarding the identity of the individual recorded in the OBS.Focal column. See the documentation of the EVENTS table for more information.
Many events are expected to have the unknown individual, UNK,
as their OBS.Focal value – indicating that the field team
had no particular intention to conduct an observation but, instead,
happened to observe the event.
An example of this could be a pantgrunt event observed while the field
researchers were on some errand.
Definition¶
CREATE OR REPLACE VIEW obs (
wid
,date
,focal
,type
,commid
,eid
,behavior
,start
,stop
,certainty
,notes
,event_notes
)
AS
SELECT
watches.wid
,watches.date
,watches.focal
,watches.type
,watches.commid
,events.eid
,events.behavior
,events.start
,events.stop
,events.certainty
,watches.notes
,events.notes
FROM watches
JOIN events
ON (events.wid = watches.wid);
ER Diagram¶
OBS¶
Columns of the OBS View¶
Column |
From |
Description |
|---|---|---|
WID |
Identifier of the related WATCHES row |
|
Date |
Date of the event |
|
Focal |
Focal of follow, or focal of a non-existant follow, or an un-interesting AnimID |
|
Type |
Category of observation, often determining the data collection protocol: follow, feeding station attendance, groom scans, etc. |
|
CommID |
The community identifier associated with the Date/Focal/Type |
|
EID |
Identifier of the EVENTS row |
|
Behavior |
Code designating the type of event observed |
|
Start |
Time the event started (inclusive) |
|
Stop |
Time the event finished (inclusive) |
|
Certainty |
Certainty of the event observation, when meaningful |
|
Notes |
Textual notes on the observation for the Date/Focal/Type |
|
Event_Notes |
Textual notes on the event |
Operations Allowed¶
- INSERT
INSERTing a row into OBS inserts a row into EVENTS, and will also INSERT a row into WATCHES if no row already exists that matches the data supplied.
If a WID is supplied, the identified WATCHES table row must already exist.
If a WID is not supplied, the Date, Focal, and Type columns must be supplied. Their values are matched to existing database content. If an existing WATCHES row matches, the new EVENTS row is related to the WATCHES row so discovered.
In either case, whether or not a WID is supplied, when a matching WATCHES row exists the (non-
NULL) data values supplied must match the values that already exist.The WID and EID columns do not have their values inserted into new rows. If non-
NULLvalues are supplied for these columns they must match the values already existing in, or inserted into, the database.- UPDATE
UPDATEing an OBS row updates the underlying tables.
- DELETE
Deleting an OBS row deletes the underlying EVENTS row. If the underlying WATCHES row then has no related EVENTS rows, it too is deleted.
Footnotes
Page last generated: 2026-07-01 00:11:55 UTC