Authorised by A. Gill, PO Box 1116, Narre Warren, VIC, 3805.
Home

Casey Transparency

Python code for Group A Results

If you have PDF files for Group A first preferences (one file per ward), these scripts will convert them into other formats.

Use at your own risk. No performance or quality guarantees. :)

One script converts all the PDFs in a given directory to TSV. These files can be opened in Excel or LibreOffice Calc. This script also removes the first six lines (council name, etc). NOTE: After conversion, check that all the numbers were recognised correctly.

The other script converts all the TSVs in a given directory to HTML. Each HTML file starts with <table> and ends with </table>, so you can paste it directly into an HTML page.

Usage:

python results-pdf-to-tsv.py directory-name
python results-tsv-to-html.py directory-name

Requirements
PDF to TSV
TSV to HTML