University of Toronto



Latest versions of the Python modules are within the major directory 04DATA_CODING. Extensive use is made of csv format spreadsheets. The modules contain extensive comments, including how to load and run. The comments within triple quotes """ """ address purpose. Those preceded by a # and indented 4 spaces are generally organizational, the highly indented are comments on the code.

The module tidy2genfield.py was used to split the 2generation field records (not supplied) into separate generations, and to convert the working names ('nest names') to species names or labels based on the dict sheet of LABELS_TAXA workbook. Its only value now is possibly in the undodict() and dodict() functions should anyone wish to redo the species and species groups (spreadsheet 'find&replace' is easier). Grouping some of current fine grain splits is reasonable, though when I have done this for ESO talks it has not mattered much.

The module sheetexpand1gen.py was used to create the SOURCE spreadsheets from 23 column precursors. Columns A-V specify physical data, like nest cavity position and management. W is the record column. Safely copy and save the SOURCE file to be re-edited. Cut of the top 19 or more header rows and all columns beyond W from the copy to be sacrificed, and save the result as a '.csv' file. An important part of the nest record is the survival count and likely causes of loss at different stages of nest development. Sometimes counts are missed and recorded in column W records as the value Q. One possibility is to drop records with missed counts from the analysis, the other is to keep them and estimate the missed values either automatically or by hand. The module function tidyup() uses column W and the initially empty X column to interpolate and extrapolate missing counts in two different ways according to the setting of the global variable _Qswitch. _Qswitch = 0 (complete estimation: interpolation between counts and extrapolation of beginning or ending missed counts) is satisfactory for years 2004 onwards because there were few missing counts. For years 2001-3 there are no counts at all for the early survival stages and so it is much better to set _Qswitch = 1 (partial estimation: no extrapolation of missing early counts which are left as Q in column X). The interpolation algorithm is approximate because it only looks at counts not at losses ---it does not allow for coded losses due to parasitoids and other causes. If a better, and generally small, correction is necessary it can be done by hand (or perhaps by reprogramming the tidyup() and advanced() functions to use additional values of the _Qswitch). The function advanced() expands the tidied record in column X into many columns identified by headings. Some error messages are posted on the console or in the output text (search for the fragment 'ERR'). Repeat the expansion, after correcting columns W and X and deleting higher columns, until satisfied. Next create the revised spreadsheet by restoring the deleted header rows, and adding colourings and heading text by copy and paste/special paste from the COLOURS49repeatY spreadsheet and from the saved SOURCE spreadsheet. Now thoroughly scan by eye for any residual errors manifest as unusual patterns that pop out perceptually. These are due to misformatting the record in column W. Misformatting is mostly trivial and the correction obvious because of the redundancy in the records. If any residual errors are found it may be appropriate to recode part of that row by hand. How to do this should be obvious from the multiplicity of good record expansions but, in any case, full documentation of column W coding, and worked examples, are at hand within 04data_coding.

For ease of reading and visual scanning the expanded spreadsheet contains 'visual padding' (ss for special record segment, and mpl for missing parasitoid list) that may need to be searched and deleted in some applications.

The module anasheet1gen.py contains the single function do() that generated the NESTCOUNTS_BY_FATE spreadsheets.

The major directory 11RECORD_SOURCES_and_SUMMARY_analyses contains sub-directories by field site.

Software has been written to expand the 'dot segment' which, as explained elsewhere, contains coded and dated events like 'female on nest', 'eggs present', etc. The software has been used to make dotSOURCE files for the Jokers community but, as of 2011.01.01, this work has not gone very far.

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download