The pyp_reports Module

pyp_reports contains a set of procedures for ...

Module Contents

_pdfCreateTitlePage(canv, _pdfSettings, reporttitle='', reportauthor='') ⇒ None [#]

_pdfCreateTitlePage() adds a title page to a ReportLab canvas object.

canv
An instance of a ReportLab Canvas object.
_pdfSettings
An options dictionary created by _pdfInitialize().
Returns:
None

_pdfDrawPageFrame(canv, _pdfSettings) ⇒ None [#]

_pdfDrawPageFrame() nicely frames page contents and includes the document title in a header and the page number in a footer.

canv
An instance of a ReportLab Canvas object.
_pdfSettings
An options dictionary created by _pdfInitialize().
Returns:
None

_pdfInitialize(pedobj) ⇒ dictionary [#]

_pdfInitialize() returns a dictionary of metadata that is used for report generation.

pedobj
A PyPedal pedigree object.
Returns:
A dictionary of metadata that is used for report generation.

meanMetricBy(pedobj, metric='fa', byvar='by', createpdf=0) ⇒ dictionary [#]

meanMetricBy() returns a dictionary of means keyed by levels of the 'byvar' that can be used to draw graphs or prepare reports of summary statistics.

pedobj
A PyPedal pedigree object.
metric
The variable to summarize on a BY variable.
byvar
The variable on which to group the metric.
createpdf
Flag indicating whether or not a PDF version of the report should be created.
Returns:
A dictionary containing means for the metric variable keyed to levels of the byvar.

pdfMeanMetricBy(pedobj, results, titlepage=0, reporttitle='', reportauthor='', reportfile='') ⇒ integer [#]

pdfMeanMetricBy() returns a dictionary of means keyed by levels of the 'byvar' that can be used to draw graphs or prepare reports of summary statistics.

pedobj
A PyPedal pedigree object.
results
A dictionary containing means for the metric variable keyed to levels of the byvar.
titlepage
Show (1) or hide (0) the title page.
reporttitle
Title of report; if '', _pdfTitle is used.
reportauthor
Author/preparer of report.
reportfile
Optional name of file to which the report should be written.
Returns:
1 on success, 0 on failure

pdfPedigreeMetadata(pedobj, titlepage=0, reporttitle='', reportauthor='', reportfile='') ⇒ integer [#]

pdfPedigreeMetadata() produces a report, in PDF format, of the metadata from the input pedigree. It is intended for use as a template for custom printed reports.

pedobj
A PyPedal pedigree object.
titlepage
Show (1) or hide (0) the title page.
reporttitle
Title of report; if '', _pdfTitle is used.
reportauthor
Author/preparer of report.
reportfile
Optional name of file to which the report should be written.
Returns:
A 1 on success, 0 otherwise.