DataAdvanced 3 to 5 hours

Automate a Weekly Report with Python

Build a script that ingests data, generates statistics, and outputs a formatted HTML report.

The Scenario

Every Monday, a data analyst manually opens 3 CSVs, calculates KPIs, pastes them into an email template, and sends it to 12 stakeholders. It takes 90 minutes. You need to automate this.

The Brief

Write a Python script that reads the data, calculates the KPIs, generates an HTML report with inline CSS (suitable for email), and saves it to a file. The script should be idempotent and handle missing files gracefully.

Deliverables

  • The complete Python script with clear function separation (load, calculate, render, save)
  • The HTML template showing at least 3 KPIs with conditional formatting (green/red based on targets)
  • Error handling for missing files, empty datasets, and data quality issues

Submission Guidance

This is a software engineering task disguised as a data task. Clean function boundaries, error handling, and logging matter as much as the calculations.

Submit Your Work

Your submission is graded against the rubric on the right. If you pass, you get a public Badge URL you can share on LinkedIn. There is no draft save, so work offline first and paste your finished response here.

This appears on your public Badge.

0/20000 charactersMarkdown supported

One per line or comma separated. Up to 5 links.

By submitting, you agree your submission text, name, and evaluation will appear on a public Badge URL.