Abstract
Describes a database to represent data from the Audubon Christmas Bird Counts, and a Python-language interface to that database.
This publication is available in Web form and also as a PDF document. Please
forward any comments to john@nmt.edu.
Table of Contents
pycbc interfacepycbc.py: Prologueclass CBCData: The database
interfacenations tableregions tablephysios tablecircles tablecir_reg tablecir_physio tableefforts tablecensuses tableCBCData.__init__(): ConstructorCBCData.genNations()CBCData.getNation()CBCData.genRegions()CBCData.getRegion()CBCData.genPhysios()CBCData.getPhysio()CBCData.getRegionCircle()CBCData.genCircles()CBCData.genCirclesByName()CBCData.genRegionCircles()CBCData.genPrimaryRegionCircles()CBCData.genCirclesByPhysio()CBCData.getCircle(): Retrieve a specific
circleCBCData.genEfforts()CBCData.getEffort(): Retrieve a
specific effort recordCBCData.overlappers(): Find
overlapping circlesCBCData.degMinAdd(): Lat/long
arithmeticCBCData.overlapCheck(): Do these circles
overlap?CBCData.__circleSep(): Compute the
separation of two circlesCBCData.__terraCircle(): Convert a circle
center to a terrestrial positionstaticloader script: Populate
the static tablesmycbc.py: Interface to the 1998
databaseclass MyCBC: Interface to the old
databaseMyCBC.__init__()MyCBC.__mapTable: Locate and bind a
tableMyCBC.genCirs(): Generate all
circlesMyCBC.genStnds(): Generate all the
circle-years for a given circleMyCBC.getEff(): Retrieve the eff row for a given circle-yearMyCBC.getAsPub(): Retrieve the aspub row for a circle-yearMyCBC.genCens(): Generate census records
for one circle-yeartransloader: Copy over the MySQL
databaseThe National Audubon Society has been conducting the Christmas Bird Count (CBC) since 1900. The author has been working with digital representations of this database since 1975. This document represents a complete redesign of a previous version of the database.
This database is an older version of the current database maintained by the National Audubon Society. The author's current work is not an attempt to provide a parallel database. It is mainly of interest as an example of contemporary database design, and it also supports the author's work as the New Mexico regional editor of the CBC.
The starting point for the current work was the database design documented in the 1998 database specification. The current effort is a reimplementation of the data in this older database, with an improved design based on third normal form database normalization.
The current work is also a case study in database implementation using the Python programming language and the SQLAlchemy object-relational database mapping system.
It will be implemented using the Postgresql database engine, and the data will be loaded from a representation of the old database that uses the MySQL database engine. Details of this translation process are discussed in Section 8, “Conversion from the old MySQL database”.