Next / Previous / Contents / NM Tech homepage

5.6. The Effort class

There is one instance for each circle-year.

.lat, .lon

These two fields are the composite key used to relate a circle-year to a circle.

.year_no

The year number as a string of three digits with left zero fill, e.g., “008”. See Section 3.3, “Year number”.

.year_key

The year key for this circle-year, left-justified and blank-filled to length 5. S see the discussion of the year_key attribute in Section 4.1.7, “Attributes of the efforts table”. Example values (where _ represents a space):

0001_
0027_
0027b
NMZU_
.yyyymmdd

Date as a datetime.date object.

.n_obs

Number of observers as an int.

.ph_tot, .ph_foot, .ph_car, .ph_other, .h_fd, .h_owl, .pm_tot, .pm_foot, .pm_car, .pm_other, and .m_owl

All these hour- and mile-based quantities use Python's decimal.Decimal type, with a precision of one digit after the decimal point.

Note that quantities in this type can be formatted using a “%f” format, as in this conversational example.

>>> d1=decimal.Decimal('1.4')
>>> d2=decimal.Decimal('3.47')
>>> d3=d1+d2
>>> d3
Decimal('4.87')
>>> "%6.1f" % d3
'   4.9'
>>> "%6.3f" % d3
' 4.870'
.circle

The Circle instance for to this circle-year.

.censuses

An iterator that produces all the Census instances for this circle-year.