From dd20f0f253e5cb4c22c0b207d21f5e16b0ce28d2 Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc kop@karlpinc.com" Date: Mon, 15 Jun 2026 13:22:53 +0000 Subject: [PATCH] Alphabetize --- doc/src/tables/locations_b.m4 | 305 ---------------------------------- doc/src/tables/watches.m4 | 69 ++++---- 2 files changed, 34 insertions(+), 340 deletions(-) delete mode 100644 doc/src/tables/locations_b.m4 diff --git a/doc/src/tables/locations_b.m4 b/doc/src/tables/locations_b.m4 deleted file mode 100644 index 899bc87..0000000 --- a/doc/src/tables/locations_b.m4 +++ /dev/null @@ -1,305 +0,0 @@ -.. Copyright (C) 2026 The Meme Factory, Inc. www.karlpinc.com - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . - -.. M4 setup -include(constants.m4)dnl -include(macros.m4)dnl -sdb_rst_quotes(`on')dnl -sdb_generated_rst()dnl - -.. _LOCATIONS_B: - -LOCATIONS_B (spatial LOCATIONS from B records) ----------------------------------------------- - -.. |LOCATIONS_B_summary| replace:: - Contains one row for each moment in time the spatial location of a - follow's focal was recorded; even when there is no other - information on the follow -- when there is no |WATCHES| record typed - as a follow for the focal on the given day. - -|LOCATIONS_B_summary| -To support recording spatial information when there is no follow -information there are columns in this table for the -|LOCATIONS_B.Focal| and the follow |LOCATIONS_B.Date|. - -There must either be a related follow row or there must be information -in the |LOCATIONS_B.Focal| and |LOCATIONS_B.Date| columns, but there -cannot be both. -This means the the following rules are enforced: -sdb_null_xor_null(*m4[|LOCATIONS_B.Focal|]m4*, *m4[|LOCATIONS_B.WID|]m4*) -sdb_null_xor_null(*m4[|LOCATIONS_B.Date|]m4*, *m4[|LOCATIONS_B.WID|]m4*) -sdb_null_iff_null(*m4[|LOCATIONS_B.Date|]m4*, *m4[|LOCATIONS_B.Focal|]m4*) - -Further, follow information can be recorded in only one of SokweDB's -tables, in one row. -This means that there cannot be a row on |WATCHES| with focal and date -values that match a LOCATIONS_B row's focal and date values. -(|transaction commit|) - -Any given follow can locate the focal in only one place at any given -time.\ [#f1]_ -This means two things. -The combination of |LOCATIONS_B.Focal|, |LOCATIONS_B.Date|, and -|LOCATIONS_B.Time| must be unique. -And, the combination of |LOCATIONS_B.WID| and |LOCATIONS_B.Time| must -be unique. - -The system will generate a warning when there is no related follow, -when the |LOCATIONS_B.WID| column is |null|. - -The |LOCATIONS_B.Date| must be during a period when the focal individual -was under study, on or after the focal's |BIOGRAPHY_DATA|.\ -|BIOGRAPHY_DATA.EntryDate| and on or before the focal's -|BIOGRAPHY_DATA|.\ |BIOGRAPHY_DATA.DepartDate|. - -The time of the spatial recording should occur when the focal was -under observation. -The system will generate a warning when a LOCATIONS_B row does not -have a |ARRIVALS| related row that records the presence of the focal -at the time the spatial observation occurred. -This means that a warning will be generated when there is a non-|null| -|LOCATIONS_B.WID| value, but there is no related |EVENTS| row where -the |EVENTS.Behavior| code is ``sdb_arrival`` and the |EVENTS|.\ -|EVENTS.Start| value is less than or equal to the |LOCATIONS_B.Time| -value and the |EVENTS|.\ |EVENTS.Stop| value is greater than or equal -to the |LOCATIONS_B.Time| value, and the event has a related |ROLES| -row where the |ROLES|.\ |ROLES.Participant| has the same value as the -|LOCATIONS_B.Focal| column. - -Any given spatial location is recorded in more than one column. -The data contained in these columns must be consistent. -This means the following 2 conditions must be met. -sdb_null_iff_null(*m4[|LOCATIONS_B.Y|]m4*, *m4[|LOCATIONS_B.X|]m4*) -If |LOCATIONS_B.MapSeq| is |null| then -|LOCATIONS_B.MetersToNextMapSeq| must also be |null|. - -.. contents:: - :depth: 2 - - -.. _LOCATIONS_B.LBID: - -LBID (spatial Location B-record ID) -``````````````````````````````````` - -.. |LOCATIONS_B.LBID_summary| replace:: |idcol| - -|LOCATIONS_B.LBID_summary| |notnull| - - -.. _LOCATIONS_B.WID: - -WID (Watch period ID) -````````````````````` - -.. |LOCATIONS_B.WID_summary| replace:: - The |WATCHES|.\ |WATCHES.WID| that identifies the follow during - which the spatial position of the focal was recorded. - -|LOCATIONS_B.WID_summary| -This column must be |null| when there is no information on the follow -other than the recorded spatial placement of the focal. - - -.. _LOCATIONS_B.Focal: - -Focal (Focal animal id) -``````````````````````` - -.. |LOCATIONS_B.Focal_summary| replace:: - The |BIOGRAPHY_DATA|.\ |BIOGRAPHY_DATA.AnimID| identifying the - focal individual. - -|LOCATIONS_B.Focal_summary| -This column must be |null| when there is a related |WATCHES| row. - - -.. _LOCATIONS_B.Date: - -Date -```` - -.. |LOCATIONS_B.Date_summary| replace:: - The date the follow was conducted. - -|LOCATIONS_B.Date_summary| -This date may not be before ``sdb_min_follow_date``. -This column must be |null| when there is a related |WATCHES| row. - - -.. _LOCATIONS_B.Time: - -Time -```` - -.. |LOCATIONS_B.Time_summary| replace:: - The time the follow was conducted. - -|LOCATIONS_B.Time_summary| -The value of this column cannot be before ``sdb_min_event_start`` or -after ``sdb_max_event_stop``. - - - -.. _LOCATIONS_B.X: - -X (X utm coordinate) -```````````````````` - -.. |LOCATIONS_B.X_summary| replace:: - The X coodinate of the (UTM WGS84 encoded) location. - An integer beween ``sdb_min_x_utm`` and ``sdb_max_x_utm``, inclusive. - -|LOCATIONS_B.X_summary| -This value may be |null| when the location was recorded in map -traversal sequences. - - -.. _LOCATIONS_B.Y: - -Y (Y utm coordinate) -```````````````````` - -.. |LOCATIONS_B.Y_summary| replace:: - The Y coodinate of the (UTM WGS84 encoded) location. - An integer beween ``sdb_min_y_utm`` and ``sdb_max_y_utm`` inclusive. - -|LOCATIONS_B.Y_summary| -This value may be |null| when the location was recorded in map -traversal sequences. - - -.. _LOCATIONS_B.Elevation: - -Elevation -````````` - -.. |LOCATIONS_B.Elevation_summary| replace:: - The elevation of the location, in meters. - An integer beween ``sdb_min_elevation_utm`` and - ``sdb_max_elevation_utm`` inclusive. - -|LOCATIONS_B.Elevation_summary| -This value may be |null| when the location was recorded in map -traversal sequences. - - -.. _LOCATIONS_B.MapSeq: - -MapSeq -`````` - -.. |LOCATIONS_B.MapSeq_summary| replace:: - The number of the map where the focal was located, where maps are - numbered sequentially within the series of maps traversed during - the follow. - -|LOCATIONS_B.MapSeq_summary| -This value may be |null| when the location was not recorded in map -traversal sequences. - - - -.. _LOCATIONS_B.MetersToNextMapSeq: - -MetersToNextMapSeq -`````````````````` - -.. |LOCATIONS_B.MetersToNextMapSeq_summary| replace:: - The number of meters to the next map sequence number within the follow. - -|LOCATIONS_B.MetersToNextMapSeq_summary| -This number was calculated in various ways over time. - -|nonnegative| -This value may be |null| when the location was not recorded in map -traversal sequences. - - -.. _LOCATIONS_B.CommID: - -CommID -`````` - -.. |LOCATIONS_B.CommID_summary| replace:: - - A code for the community the observers are associated with and - intended to follow; the |COMM_IDS|.\ |COMM_IDS.CommID| of the - community. - This is not necessarily the community the focal is a member of, - although it usually is. - -|LOCATIONS_B.CommID_summary| |notnull| - - -.. _LOCATIONS_B.FollowNum: - -FollowNum -````````` - -.. |LOCATIONS_B.FollowNum_summary| replace:: - A text string used for checking. - -|LOCATIONS_B.FollowNum_summary| -|notonlyspaces| |notnull| - - - -.. _LOCATIONS_B.Origin: - -Origin -`````` - -.. |LOCATIONS_B.Origin_summary| replace:: - A code indicating the source of the location information. - A |LOCATION_ORIGINS|.\ |LOCATION_ORIGINS.Code| value. - -|LOCATIONS_B.Origin_summary| -|notnull| - - - -.. _LOCATIONS_B.Notes: - -Notes -````` - -.. |LOCATIONS_B.Notes_summary| replace:: - Free form textual notes on the focal's spatial placement. - -|LOCATIONS_B.Notes_summary| |notonlyspaces| |notnull| - - -.. _LOCATIONS_B.Entered: - -Entered -``````` - -.. |LOCATIONS_B.Entered_summary| replace:: - The person who recorded the location. - A |PEOPLE|.\ |PEOPLE.Person| value. - -|LOCATIONS_B.Entered_summary| -|notnull| - - -.. rubric:: Footnotes - -.. [#f1] - With the caveat that any one row in LOCATIONS_B has two ways to - record a focal's location, by map sequence number and by UTM - coordinates. - These two values are not required to be in-sync. diff --git a/doc/src/tables/watches.m4 b/doc/src/tables/watches.m4 index 5a935e6..9681e95 100644 --- a/doc/src/tables/watches.m4 +++ b/doc/src/tables/watches.m4 @@ -52,41 +52,6 @@ etc. The available |WATCHES.Type| values are: -``sdb_follow`` (Follow) - Each row represents a date during which observers were assigned - to follow a focal individual. - - A follow may or may not have any related observations, related - |EVENTS| rows. - - The |WATCHES.Focal| column contains the |BIOGRAPHY_DATA|.\ - |BIOGRAPHY_DATA.AnimID| of the focal of the follow. - - The |WATCHES.CommID| column contains the code for the community - the observers are associated with and intended to follow; the - |COMM_IDS|.\ |COMM_IDS.CommID| of the community. - This is not necessarily the community the focal is a member of, - although it usually is. - - The system will generate a warning when a WATCHES row that - represents a follow does not have a |ARRIVALS| related row that - records the presence of the focal. - This means that warning is generated when a WATCHES row with a - |WATCHES.Type| value of ``sdb_follow`` does not have a related - |EVENTS| row where the |EVENTS.Behavior| code is ``sdb_arrival``, - and a |ROLES| row, related to the event, where the |ROLES|.\ - |ROLES.Participant| has the same value as the follow's - |WATCHES.Focal| column. - - A follow must have at least one related |FOLLOW_OBSERVERS| rows, to - record the observers scheduled to conduct the follow. - |transaction commit| - - There may only be one record of an individual being followed on any - given day. - This means, the combination of |WATCHES.Type|, |WATCHES.Focal| and - |WATCHES.Date| must be unique. - ``sdb_attendance`` (Attendance) Each row represents a day during which a chimpanzee was observed at the feeding station. @@ -149,6 +114,40 @@ The available |WATCHES.Type| values are: This means, the combination of |WATCHES.Type|, |WATCHES.Focal| and |WATCHES.Date| must be unique. +``sdb_follow`` (Follow) + Each row represents a date during which observers were assigned + to follow a focal individual. + + A follow may or may not have any related observations, related + |EVENTS| rows. + + The |WATCHES.Focal| column contains the |BIOGRAPHY_DATA|.\ + |BIOGRAPHY_DATA.AnimID| of the focal of the follow. + + The |WATCHES.CommID| column contains the code for the community + the observers are associated with and intended to follow; the + |COMM_IDS|.\ |COMM_IDS.CommID| of the community. + This is not necessarily the community the focal is a member of, + although it usually is. + + The system will generate a warning when a WATCHES row that + represents a follow does not have a |ARRIVALS| related row that + records the presence of the focal. + This means that warning is generated when a WATCHES row with a + |WATCHES.Type| value of ``sdb_follow`` does not have a related + |EVENTS| row where the |EVENTS.Behavior| code is ``sdb_arrival``, + and a |ROLES| row, related to the event, where the |ROLES|.\ + |ROLES.Participant| has the same value as the follow's + |WATCHES.Focal| column. + + A follow must have at least one related |FOLLOW_OBSERVERS| rows, to + record the observers scheduled to conduct the follow. + |transaction commit| + + There may only be one record of an individual being followed on any + given day. + This means, the combination of |WATCHES.Type|, |WATCHES.Focal| and + |WATCHES.Date| must be unique. The |WATCHES.Date| must be during a period when the watched individual was under study. -- 2.34.1