Home About

AtYourService.py

Software designed to read and reformat service charge statements sent to homeowners on Cressingham Gardens Estate (CGE), a residential housing estate in the London Borough of Lambeth, South London. CGE currently faces demolition by Lambeth’s regeneration department who argue it is too costly for repair. The code employs computer vision technologies to convert a .pdf document to a series of images, identify and extract repairs data, then convert jobs to a .csv formated file. The generated .csv file allows residents to more easily coordinate efforts to contest repairs data. This script exposes underlying data structures and socio-technical process involved in the management of Lambeth’s housing. It also provides space to speculate how all residents of Lambeth’s housing estates might be engaged in contesting repairs data and regenerative processes.

Extract from .pdf service charge bill
Extract from .pdf service charge bill
Pagebreak
shapes = self.covertPdfToImage(file)
for shape in shapes:
    description = self.readandstrip(left).replace('Job Details: ', '')
    detail = self.readandstrip(right)
    job = {
        'job_definition':jobdef,
        'job_number': self.findbetween(detail, 'Job Number:', 'Issue'),
        'issue_date': self.findbetween(detail, 'Issue Date: ',  'Total Cost:'),
        'completed': self.findbetween(detail, 'Completed: ', 'Rechargeable Cost:'),
        'paid': self.findbetween(detail, 'Date Paid: ', ''),
        'total_cost': self.findbetween(detail, 'Total Cost: ', 'Completed:'),
        'rechargable_cost': self.findbetween(detail, 'Rechargeable Cost:', 'Date Paid:'),
        'job_details': description,
        'accounting_period':'NULL'
        job['pdf_source_file'] = self.source_file
        job['pdf_page'] = page
    }
    print('Found job ('+jobdef+')', job['job_number'])

Simplified extract from “AtYourService.py” python script