# Automated weekly report — sample project

Three exports from three different systems, merged into one weekly report with a single command.
**All data is synthetic.** No real company or person is involved.

## The problem
Every Monday someone copies numbers from the order system, the quality system and the maintenance log into a report by hand.
The three exports even use different date formats, column names and number formats.

## What the script does
1. Reads the three files and fixes their differences (dates `dd.mm.yyyy` vs ISO, `PRODUCT` vs `product`, decimal commas, semicolons).
2. Groups everything by week and calculates fill rate, defect rate and unplanned maintenance hours.
3. Compares the chosen week with the week before and writes a short key finding.
4. Writes `output/weekly_summary.csv` and a ready-to-send `output/weekly_report.html`.

## Run it
```bash
pip install pandas
python src/generate_data.py
python src/build_report.py            # last week in the data
python src/build_report.py 2026-09-14 # or any date inside the week you want
```

## Make it automatic
Schedule `python src/build_report.py` every Monday morning: a cron job on Linux/macOS or Task Scheduler on Windows.
