turn a PDF report into a different report format with additions. Probably using Pyhton but require a desk top app

Job ID: 39624972

Budget: £250 – £750 GBP

Specification for Enviroscope Report Generator
Objective
Develop an automated tool (Python or similar) that:
1. Reads Instascope reports (PDF or CSV exports).
2. Extracts key environmental data (mould, bacteria, VOCs, CO₂, RH, temperature, particulates) and analyse/ calculate specific humidity form rh and temp.
3. Generates a branded Enviroscope Word report with RAG-coloured tables, charts, and a client-friendly summary.
________________________________________
Report Structure
1. Title & Branding
• Title: Enviroscope® Indoor Air Quality Assessment.
• Building Forensics logo and branding.
2. Executive Summary
• Top 5 key findings:
o Room with highest mould levels.
o Room with highest VOC/
Highest CO₂ levels.
o Room with highest RH (specific humidity).
Bacteria levels
Virus and pollen levels
o Any critical variations.
o Summary risk statement.
3. Detailed Analysis Tables
• Columns:
o Room Name
o Mould (p/m³)
o Bacteria (p/m³)
o VOC (ppb)
o CO₂ (ppm)
o RH (%)
o Temperature (°C)
o Dew Point (°C) (calculated)
o Specific Humidity (g/kg) (calculated)
• RAG colour coding:
o Red: Highest value for each metric.
o Amber: Mid-range.
o Green: Lowest value.
4. Charts
• Bar Charts:
o Mould levels by room.
o VOC & CO₂ by room.
o RH & Temperature by room.
• Auto-generated and inserted into Word.
5. Explanation Sections
• Short paragraphs explaining:
o What mould readings indicate.
o What VOC/CO₂ means for air quality.
o What RH and temperature mean for moisture risk.
o RAG colour interpretation.
6. Appendix
• Placeholder for lab analysis and notes.
________________________________________
Technical Requirements
• Input: Instascope PDF or CSV.
• Output: Word document (.docx).
• Language: Python (recommended) with libraries:
o python-docx (for Word creation).
o matplotlib (for charts).
o pdfplumber or PyMuPDF (for PDF parsing).
• Ease of Use:
o A single command to process:
nginx
CopyEdit
python enviroscope_auto_report.py instascope_report.pdf
o Optionally, create an EXE for drag-and-drop.
________________________________________
Starter Python Script
python
CopyEdit
import matplotlib.pyplot as plt
from docx import Document
from docx.shared import Inches

# Sample data (replace with parsed Instascope data)
rooms = [
{"Room": "Ambient", "Mould": 4851, "VOC": 992, "CO2": 629, "RH": 66, "Temp": 21},
{"Room": "Front Lounge", "Mould": 8812, "VOC": 972, "CO2": 586, "RH": 65, "Temp": 21},
{"Room": "Kitchen", "Mould": 6407, "VOC": 1078, "CO2": 790, "RH": 68, "Temp": 21},
]

def create_report(rooms, filename="Enviroscope_Report.docx"):
# Generate charts
room_names = [r["Room"] for r in rooms]
mould_values = [r["Mould"] for r in rooms]

plt.bar(room_names, mould_values)
plt.title("Mould Levels by Room")
plt.savefig("mould_chart.png")
plt.close()

# Create Word report
doc = Document()
doc.add_heading("Enviroscope® Indoor Air Quality Assessment", 0)
doc.add_paragraph("This report provides a comparative overview of indoor air quality.")

doc.add_heading("Executive Summary", 1)
doc.add_paragraph(f"Highest mould level: {max(rooms, key=lambda x: x['Mould'])['Room']} ({max(mould_values)} p/m³).")

doc.add_heading("Charts", 1)
doc.add_picture("mould_chart.png", width=Inches(5))

doc.save(filename)
print(f"Report saved as {filename}")

if __name__ == "__main__":
create_report(rooms)
________________________________________
________________________________________
1. Specific Humidity & Dew Point
o Specific humidity (g/kg) = (0.622 × Vapour Pressure) / (Pressure – Vapour Pressure) × 1000.
o Dew point calculated from RH and temperature.
2. Client-friendly wording
o Explanation for mould levels (what’s considered high or low).
o What VOCs and CO₂ imply.
o Why RH and specific humidity matter.
o Guidance for risk reduction (ventilation, moisture control, etc.).
3. A full structured template
o Executive summary.
o RAG tables (with colour coding).
o Charts.
o Explanations for each parameter.
o Appendix for lab samples.

Approximately 15 pages