Abstract
Describes the implementation of an automated system for producing reports displaying Christmas Bird Count data.
This publication is available in Web form and also as a PDF document.
Please forward any comments to john@nmt.edu.
Table of Contents
pickaregion.cgi: Select a regionpickaregion.cgi: Prologuepickaregion.cgi: Importspickaregion.cgi: main()buildEmptyPage(): Set up an empty
pagebuildRegionsForm(): Build the table of
region radiobuttonsaddRadios(): Add regional selection
radiobuttonsbuildRow(): Build one row of region
radiobuttonsbuildRegionCell(): Build one cell of the
region radiobuttons tablepickaregion.cgi: Epiloguetopform.py: Form constants for the top-level
pageregx.cgi: Generate a region index pageregx.cgi: Prologueregx.cgi: Importsregx.cgi: main()buildEmptyPage(): Set up an empty
pagebuildRegionsForm: Build the regional index
formbuildRegionTitles(): Set up the titles for
the selected regionstartForm(): Set up the form and static
controlsbuildIndexSection(): Add the primary and
secondary index entriesbuildEntries(): Build all the BaseIndex instancesbuildCircle(): Build entries for one
circle centeraddSecondaries(): Generate secondary index
entries for one circleclass Args: The CGI argumentsArgs.__init__()regx.cgi: Epilogueregform.py: Form constants for the regional index
pagehist.cgi: Generate a history detail pagehist.cgi: Prologuehist.cgi: Importshist.cgi: Manifest constantshist.cgi: main()hist.cgi: buildEmptyPage()hist.cgi: buildContent()hist.cgi: buildReport(): Main report
logichist.cgi: buildHeadings()hist.cgi: findEfforts(): Locate selected
effort recordshist.cgi: buildFilter—Set up
census record filtrationhist.cgi: updateAbbrs()hist.cgi: updateSimpleAbbrs()hist.cgi: updateCompoundAbbrsfixOldAbbr(): Update an outdated bird
codehist.cgi: subspLumper()—Lump
subspecieshist.cgi: lumpCompoundFormhist.cgi: lumpSimpleFormhist.cgi: outputAllRows(): Build the
body of the tableclass Args(): CGI argument
processingArgs.__init__()Args._checkLatLonList(): Check all lat-lon
argumentsArgs._checkLatLon(): Check one lat-lon
argumenthist.cgi: Epiloguecbchistlib.py: Prologuecbchistlib.py: Importscbchistlib.py: Manifest constantsclass ScriptError: Our exceptionopenDatabase(): Open the CBC
databasebuildErrorPage()addDocLink(): Add a link to the
documentationclass BaseIndex: Base class for regional
page index entriesclass PriIndex: Primary regional index
entryPriIndex.__init__()PriIndex.effByYear(): Sorting function for
effort recordsPriIndex.html()PriIndex.htmlMain: First line of the
primary index entryPriIndex.htmlAs(): Generate primary
“As” entriesPriIndex._buildAs(): Build an
“As” linePriIndex._htmlOverlaps(): Generate
primary “Overlaps” index entriesPriIndex._overlapEntry(): Generate one
overlap lineclass SecIndex: Secondary regional index
entryyearBrackets(): Display a bracketed list of
years workedcountValues(): Summarize a list of
yearspeelGroup(): Find the first date group in a
listlatLonFormat(): Present the center
coordinates in standard formatclass CbcHist: The history classCbcHist.nCensusRows(): How many census
rows are there?CbcHist.genCensusRows(): Generate the
census rows in selfCbcHist.colLabel(): Retrieve a column
labelCbcHist.findColumn()CbcHist.genColLabels(): Generate the
logical column labelsCbcHist.__init__()CbcHist._buildCensusRows(): Build the
census rowsCbcHist._addOneEffort()CbcHist._addOneCensus()CbcHist._rowKey(): What is the ._rowMap key for this census record?class Row: Abstract class for logical
rowsRow.__init__()Row.physRowCount(): How many physical rows
will this logical row occupy?Row.html(): Render a logical row into
XHTMLRow._physRender(): Render the physical
rowsRow._setLogicalCells(): Copy the logical
cells to physical rowsRow._setSuffixCells(): Copy the suffix
cells to physical rowsclass KeyRow: The first heading lineclass StatRow: Parent class for rows with
statisticsclass PartyHoursRow: Heading row showing
total effortclass RowLabel: Base class for row
labelsclass CensusRow: Numbers of
individualsclass HeadRowLabel: Row label for a
headingclass CensusRowLabel: Row label for kinds of
birdsclass Cell: Base class for table
cellsclass LabelCell: Column label cellclass SpacerCell: Empty cellclass NumberCell: Base class for numeric
table cellsclass PartyHoursCell: Heading row showing
effortclass CensusCell: Accumulator for counts of
individual birdsclass CensusTotal: Number of individuals in
one categoryclass StatCell: Display a statisticclass PhysRow: One physical rowclass ColumnLayout: Column layout
controllerclass LumpedLayout: Column layout for
lumped yearsclass SplitLayout: Column layout for
split yearsclass EffortKey: A unique key for the effort
tableFOR(): Build a “for=” attributedivCeil(): Discrete rounding
functionanchorName(): Format a page anchorlatLonKey(): Generate the lat-lon key for
a given circleyearCheck(): Validate a year number form
entryaliasFactorynmAlias(): The New Mexico alias setmeanSigma(): Compute statisticsstatNumber(): Display a float without
too much precisioncombineCss(): Combine CSS classes from
different sourcesdiv.pri-divspan.pri-namespan.lat-lonspan.year-listdiv.as-divdiv.sec-divspan.sec-nametable.tbtd.coldiv.hrltd.crlcss-th-ph-cellcss-td-stat-cellcss-td-spacer-celltd.cctd.c1th.c1td.cltd.ctth.clth.ctThe Christmas Bird Count of the National Audubon Society is a unique resource for ornithological researchers: a continent-wide survey of early winter bird numbers going back to 1900. Each published census is a count of all the birds in a 15-mile-diameter circle on one day between mid-December and early January.
This document describes the implementation of a Web-based application to display a report showing the history of a given circle or combination of circles.
This system is built on top of a number of existing layers that are documented elsewhere.
All scripts are written in the Python programming language. For more information, see the main Python web site or the author's Python tutorial or Python reference guide.
pycbc: A Python interface to the Christmas Bird Count
database describes the database
that holds the raw data.
A general system for describing the kinds of birds is
presented in xnomo3: A system for
representing bird taxonomy. In
particular, the database uses the system of six-letter
codes described here. For example, American Robin is
encoded as AMEROB, and Zone-tailed Hawk
as ZOTHAW. The linked document
discusses how each such code represents a specific
taxonomic grouping.
Click here to generate reports using this system.