Privacy Metrics Dashboard
Overview
A privacy metrics dashboard provides quantitative visibility into the effectiveness and maturity of an organization's privacy program. This skill defines the key privacy performance indicators (KPIs), data collection methods, visualization patterns, and reporting cadences needed to measure, monitor, and continuously improve privacy operations.
Core Privacy KPI Categories
1. Data Subject Access Requests (DSARs)
| Metric |
Definition |
Target |
Frequency |
| DSAR Volume |
Total DSARs received per period |
Trend monitoring |
Monthly |
| DSAR by Type |
Breakdown by right exercised (access, deletion, portability, rectification) |
N/A (distribution) |
Monthly |
| Average Response Time |
Mean calendar days from receipt to completion |
< 25 days (GDPR: 30 day limit) |
Monthly |
| Median Response Time |
Median calendar days from receipt to completion |
< 20 days |
Monthly |
| P95 Response Time |
95th percentile response time |
< 28 days |
Monthly |
| On-Time Completion Rate |
% completed within regulatory deadline |
> 98% |
Monthly |
| DSAR Backlog |
Open DSARs at period end |
< 10% of monthly volume |
Weekly |
| Automated Fulfillment Rate |
% of DSARs fulfilled without manual intervention |
> 60% |
Quarterly |
| Identity Verification Failure Rate |
% of DSARs where identity could not be verified |
< 5% |
Monthly |
| Cost per DSAR |
Average cost to process one DSAR |
Trend reduction |
Quarterly |
2. Data Breaches
| Metric |
Definition |
Target |
Frequency |
| Breach Count |
Total confirmed breaches per period |
0 (minimize) |
Monthly |
| Breach Severity Distribution |
Count by severity level (low/medium/high/critical) |
No critical breaches |
Monthly |
| Mean Time to Detect (MTTD) |
Average hours from breach occurrence to detection |
< 24 hours |
Per incident |
| Mean Time to Notify (MTTN) |
Average hours from detection to regulatory notification |
< 48 hours (GDPR: 72 hours) |
Per incident |
| Mean Time to Contain (MTTC) |
Average hours from detection to containment |
< 12 hours |
Per incident |
| Records Affected |
Total data subject records affected |
Minimize |
Per incident |
| Repeat Breach Rate |
% of breaches with same root cause as prior breach |
0% |
Quarterly |
| Regulatory Fines |
Total fines imposed due to breaches |
$0 |
Annual |
| Breach Simulation Score |
Score from most recent tabletop exercise |
> 85% |
Semi-annual |
3. Privacy Impact Assessments (DPIAs)
| Metric |
Definition |
Target |
Frequency |
| DPIA Completion Rate |
% of high-risk processing with completed DPIA |
100% |
Quarterly |
| DPIA Backlog |
DPIAs required but not yet started |
0 |
Monthly |
| Average DPIA Duration |
Mean days from initiation to sign-off |
< 30 days |
Quarterly |
| DPIA Findings Remediated |
% of identified risks with implemented mitigations |
> 90% |
Quarterly |
| DPIA Review Rate |
% of existing DPIAs reviewed within their review cycle |
> 95% |
Quarterly |
| New Processing Without DPIA |
Count of new high-risk processing launched without DPIA |
0 |
Monthly |
4. Training and Awareness
| Metric |
Definition |
Target |
Frequency |
| Training Completion Rate |
% of staff who completed required privacy training |
> 95% |
Quarterly |
| Training Pass Rate |
% passing the assessment on first attempt |
> 85% |
Quarterly |
| New Hire Training Time |
Average days from start date to training completion |
< 14 days |
Monthly |
| Specialist Certification Rate |
% of privacy team with professional certification |
> 80% |
Annual |
| Privacy Champion Coverage |
% of business units with designated privacy champion |
100% |
Quarterly |
| Phishing Simulation Pass Rate |
% of staff correctly identifying privacy-related phishing |
> 90% |
Quarterly |
5. Consent Management
| Metric |
Definition |
Target |
Frequency |
| Consent Rate |
% of users providing consent (by purpose) |
Trend monitoring |
Monthly |
| Opt-in Rate |
% choosing to opt in to optional processing |
Trend monitoring |
Monthly |
| Opt-out/Withdrawal Rate |
% withdrawing previously given consent |
< 5% monthly |
Monthly |
| Consent Freshness |
% of active consents collected within last 12 months |
> 70% |
Quarterly |
| Consent Collection Coverage |
% of data processing with documented consent/legal basis |
100% |
Quarterly |
| Cookie Consent Rate |
% of website visitors accepting cookies (by category) |
Trend monitoring |
Monthly |
| Consent Record Accuracy |
% of consent records matching actual processing |
> 99% |
Quarterly |
6. Operational Metrics
| Metric |
Definition |
Target |
Frequency |
| Privacy Incidents Reported |
Internal privacy incidents reported (not just breaches) |
Trend monitoring |
Monthly |
| Vendor Privacy Assessments Completed |
% of high-risk vendors assessed |
100% |
Quarterly |
| Data Inventory Completeness |
% of processing activities documented in ROPA |
> 95% |
Quarterly |
| Policy Acknowledgment Rate |
% of staff acknowledging updated privacy policies |
> 98% |
Per update |
| Privacy-by-Design Gate Pass Rate |
% of projects passing privacy review at design gate |
> 85% |
Quarterly |
| Regulatory Inquiry Response Time |
Average days to respond to regulatory inquiries |
< 5 days |
Per event |
Data Collection Architecture
Data Sources Collection Layer Dashboard Layer
+------------------+
| DSAR Platform |---+
+------------------+ |
| +-------------------+ +-----------------------+
+------------------+ +--->| | | |
| Breach Tracker |------->| Data Integration |--->| Visualization Engine |
+------------------+ +--->| (ETL Pipeline) | | (Grafana / Tableau / |
| | | | Power BI / Metabase) |
+------------------+ | +-------------------+ +-----------------------+
| DPIA Register |---+ | |
+------------------+ | v v
| +-------------------+ +-----------------------+
+------------------+ | | Metrics Database | | Alerting System |
| LMS (Training) |---+ | (Time-series / | | - Threshold breaches |
+------------------+ | | PostgreSQL) | | - Trend deviations |
| +-------------------+ | - SLA warnings |
+------------------+ | +-----------------------+
| Consent Platform |---+
+------------------+
Metric Collection Implementation
"""
Privacy metrics collection and aggregation engine.
Collects KPI data from multiple privacy operational systems
and computes dashboard-ready metrics.
"""
from dataclasses import dataclass
from datetime import datetime, timedelta
from typing import Optional
import statistics
@dataclass
class DSARMetrics:
period_start: datetime
period_end: datetime
total_received: int
total_completed: int
total_overdue: int
avg_response_days: float
median_response_days: float
p95_response_days: float
on_time_rate: float
by_type: dict[str, int]
backlog: int
automated_rate: float
@dataclass
class BreachMetrics:
period_start: datetime
period_end: datetime
total_breaches: int
by_severity: dict[str, int]
avg_detection_hours: float
avg_notification_hours: float
avg_containment_hours: float
total_records_affected: int
repeat_breach_count: int
@dataclass
class ConsentMetrics:
period_start: datetime
period_end: datetime
total_consent_events: int
opt_in_rate: float
withdrawal_rate: float
consent_rate_by_purpose: dict[str, float]
cookie_acceptance_rate: float
consent_freshness_pct: float
class PrivacyMetricsCollector:
"""
Collect and compute privacy KPIs from operational data sources.
"""
def __init__(self, dsar_repo, breach_repo, dpia_repo, training_repo, consent_repo):
self.dsar_repo = dsar_repo
self.breach_repo = breach_repo
self.dpia_repo = dpia_repo
self.training_repo = training_repo
self.consent_repo = consent_repo
def compute_dsar_metrics(
self,
start_date: datetime,
end_date: datetime,
regulatory_deadline_days: int = 30
) -> DSARMetrics:
"""Compute DSAR KPIs for a given period."""
dsars = self.dsar_repo.get_by_period(start_date, end_date)
completed = [d for d in dsars if d.status == "completed"]
response_times = [
(d.completed_at - d.received_at).days
for d in completed
if d.completed_at and d.received_at
]
d for d in completed
if (d.completed_at - d.received_at).days <= regulatory_deadline_days
]
automated = [d for d in completed if d.automated]
open_dsars = [d for d in dsars if d.status in ("open", "in_progress")]
by_type = {}
for d in dsars:
by_type[d.request_type] = by_type.get(d.request_type, 0) + 1
return DSARMetrics(
period_start=start_date,
period_end=end_date,
total_received=len(dsars),
total_completed=len(completed),
total_overdue=len(dsars) - len(on_time) - len(open_dsars),
avg_response_days=statistics.mean(response_times) if response_times else 0,
median_response_days=statistics.median(response_times) if response_times else 0,
p95_response_days=(
sorted(response_times)[int(len(response_times) * 0.95)]
if len(response_times) >= 20 else
max(response_times) if response_times else 0
),
/ len(completed) if completed else 1.0,
by_type=by_type,
backlog=len(open_dsars),
automated_rate=len(automated) / len(completed) if completed else 0,
)
def compute_breach_metrics(
self,
start_date: datetime,
end_date: datetime
) -> BreachMetrics:
"""Compute breach KPIs for a given period."""
breaches = self.breach_repo.get_by_period(start_date, end_date)
by_severity = {}
detection_hours = []
notification_hours = []
containment_hours = []
total_records = 0
for b in breaches:
by_severity[b.severity] = by_severity.get(b.severity, 0) + 1
total_records += b.records_affected or 0
if b.detected_at and b.occurred_at:
detection_hours.append(
(b.detected_at - b.occurred_at).total_seconds() / 3600
)
if b.notified_at and b.detected_at:
notification_hours.append(
(b.notified_at - b.detected_at).total_seconds() / 3600
)
if b.contained_at and b.detected_at:
containment_hours.append(
(b.contained_at - b.detected_at).total_seconds() / 3600
)
# Count repeat breaches (same root cause as previous)
root_causes = [b.root_cause for b in breaches if b.root_cause]
repeat_count = len(root_causes) - len(set(root_causes))
return BreachMetrics(
period_start=start_date,
period_end=end_date,
total_breaches=len(breaches),
by_severity=by_severity,
avg_detection_hours=statistics.mean(detection_hours) if detection_hours else 0,
avg_notification_hours=statistics.mean(notification_hours) if notification_hours else 0,
avg_containment_hours=statistics.mean(containment_hours) if containment_hours else 0,
total_records_affected=total_records,
repeat_breach_count=repeat_count,
)
def generate_executive_report(
self,
period_start: datetime,
period_end: datetime
) -> dict:
"""
Generate a comprehensive executive privacy report.
Combines all KPI categories into a single report structure.
"""
dsar = self.compute_dsar_metrics(period_start, period_end)
breach = self.compute_breach_metrics(period_start, period_end)
# Calculate overall privacy health score (0-100)
health_components = []
# DSAR component (25% weight)
dsar_score = min(100, dsar.on_time_rate * 100)
health_components.append(("DSAR Compliance", dsar_score, 0.25))
# Breach component (30% weight)
breach_score = 100 if breach.total_breaches == 0 else max(0, 100 - breach.total_breaches * 20)
health_components.append(("Breach Prevention", breach_score, 0.30))
# Response time component (20% weight)
response_score = min(100, max(0, (30 - dsar.avg_response_days) / 30 * 100))
health_components.append(("Response Timeliness", response_score, 0.20))
# Detection speed component (25% weight)
detection_score = min(100, max(0, (72 - breach.avg_detection_hours) / 72 * 100)) if breach.total_breaches > 0 else 100
health_components.append(("Detection Speed", detection_score, 0.25))
overall_score = sum(score * weight for _, score, weight in health_components)
return {
"period": {
"start": period_start.isoformat(),
"end": period_end.isoformat()
},
"overall_privacy_health_score": round(overall_score, 1),
"health_rating": (
"Excellent" if overall_score >= 90 else
"Good" if overall_score >= 75 else
"Needs Improvement" if overall_score >= 60 else
"Critical"
),
"components": {
name: {"score": round(score, 1), "weight": f"{weight*100:.0f}%"}
for name, score, weight in health_components
},
"dsar_summary": {
"volume": dsar.total_received,
"on_time_rate": f"{dsar.on_time_rate*100:.1f}%",
"avg_response_days": round(dsar.avg_response_days, 1),
"backlog": dsar.backlog
},
"breach_summary": {
"count": breach.total_breaches,
"severity_distribution": breach.by_severity,
"avg_detection_hours": round(breach.avg_detection_hours, 1),
"records_affected": breach.total_records_affected
},
}
Dashboard Visualization Patterns
Executive Summary View
| Panel |
Chart Type |
Metrics Displayed |
Refresh Rate |
| Privacy Health Score |
Gauge (0-100) |
Overall weighted score |
Daily |
| DSAR Volume Trend |
Line chart |
Monthly DSAR count (12-month rolling) |
Daily |
| Breach Timeline |
Event timeline |
Breaches by severity over time |
Real-time |
| On-Time Rate |
Single stat with spark line |
DSAR on-time completion % |
Daily |
| Training Coverage |
Horizontal bar |
Completion rate by department |
Weekly |
| Consent Rate Trend |
Multi-line chart |
Opt-in rate by purpose (6-month) |
Daily |
Operational View
| Panel |
Chart Type |
Metrics Displayed |
Refresh Rate |
| Active DSARs |
Table with status |
Open requests with deadlines |
Hourly |
| DSAR Aging |
Histogram |
Distribution of open DSAR ages |
Daily |
| Response Time Box Plot |
Box plot |
Response time distribution by month |
Daily |
| Breach Detection Funnel |
Funnel chart |
Detection > Assessment > Notification > Resolution |
Per event |
| DPIA Pipeline |
Kanban |
DPIAs by status (draft, review, approved) |
Daily |
| Vendor Risk Heat Map |
Heat map |
Vendors by risk score and last assessment date |
Weekly |
Alerting Rules
| Alert |
Condition |
Severity |
Recipient |
| DSAR SLA Warning |
Any DSAR open > 21 days |
Warning |
DSAR team |
| DSAR SLA Breach |
Any DSAR open > 28 days |
Critical |
CPO + Legal |
| Breach Detected |
New breach record created |
Critical |
Incident team + CPO |
| Training Compliance Drop |
Department completion < 90% |
Warning |
HR + Privacy |
| Consent Rate Anomaly |
Opt-in rate drops > 20% in a week |
Warning |
Privacy + Marketing |
| DPIA Overdue |
DPIA review past scheduled date |
Warning |
DPIA owner + CPO |
| Vendor Assessment Due |
High-risk vendor assessment > 11 months old |
Warning |
Procurement + Privacy |
Executive Reporting Template
Monthly Privacy Board Report Structure
- Privacy Health Score: Overall score with trend arrow
- Key Highlights: 3-5 bullet points on notable events
- DSAR Performance: Volume, on-time rate, top request types
- Breach Status: Count, severity, response times, lessons learned
- Compliance Posture: DPIA coverage, training rates, policy updates
- Risk Outlook: Emerging risks, regulatory developments, planned changes
- Resource Needs: Budget requests, headcount, tooling
References
- IAPP Privacy Program Management Guide (CIPM Body of Knowledge)
- NIST Privacy Framework — GV.MT Monitoring and Review
- ISO/IEC 27701:2019 — Clause 9 (Performance Evaluation)
- EDPB Guidelines on Data Breach Notification (WP250 rev.01)
- Gartner Privacy Program Metrics Framework
- ISACA Privacy Audit and Assurance Program
1---2name: privacy-metrics-dashboard3description: Build privacy KPI dashboards tracking DSAR volume and response time, breach count and severity, DPIA completion rate, training coverage, and consent rates. Includes metric definitions, data collection patterns, visualization designs, and executive reporting templates for privacy program measurement.4license: Apache-2.05---67# Privacy Metrics Dashboard89## Overview1011A privacy metrics dashboard provides quantitative visibility into the effectiveness and maturity of an organization's privacy program. This skill defines the key privacy performance indicators (KPIs), data collection methods, visualization patterns, and reporting cadences needed to measure, monitor, and continuously improve privacy operations.1213## Core Privacy KPI Categories1415### 1. Data Subject Access Requests (DSARs)1617| Metric | Definition | Target | Frequency |18|--------|-----------|--------|-----------|19| DSAR Volume | Total DSARs received per period | Trend monitoring | Monthly |20| DSAR by Type | Breakdown by right exercised (access, deletion, portability, rectification) | N/A (distribution) | Monthly |21| Average Response Time | Mean calendar days from receipt to completion | < 25 days (GDPR: 30 day limit) | Monthly |22| Median Response Time | Median calendar days from receipt to completion | < 20 days | Monthly |23| P95 Response Time | 95th percentile response time | < 28 days | Monthly |24| On-Time Completion Rate | % completed within regulatory deadline | > 98% | Monthly |25| DSAR Backlog | Open DSARs at period end | < 10% of monthly volume | Weekly |26| Automated Fulfillment Rate | % of DSARs fulfilled without manual intervention | > 60% | Quarterly |27| Identity Verification Failure Rate | % of DSARs where identity could not be verified | < 5% | Monthly |28| Cost per DSAR | Average cost to process one DSAR | Trend reduction | Quarterly |2930### 2. Data Breaches3132| Metric | Definition | Target | Frequency |33|--------|-----------|--------|-----------|34| Breach Count | Total confirmed breaches per period | 0 (minimize) | Monthly |35| Breach Severity Distribution | Count by severity level (low/medium/high/critical) | No critical breaches | Monthly |36| Mean Time to Detect (MTTD) | Average hours from breach occurrence to detection | < 24 hours | Per incident |37| Mean Time to Notify (MTTN) | Average hours from detection to regulatory notification | < 48 hours (GDPR: 72 hours) | Per incident |38| Mean Time to Contain (MTTC) | Average hours from detection to containment | < 12 hours | Per incident |39| Records Affected | Total data subject records affected | Minimize | Per incident |40| Repeat Breach Rate | % of breaches with same root cause as prior breach | 0% | Quarterly |41| Regulatory Fines | Total fines imposed due to breaches | $0 | Annual |42| Breach Simulation Score | Score from most recent tabletop exercise | > 85% | Semi-annual |4344### 3. Privacy Impact Assessments (DPIAs)4546| Metric | Definition | Target | Frequency |47|--------|-----------|--------|-----------|48| DPIA Completion Rate | % of high-risk processing with completed DPIA | 100% | Quarterly |49| DPIA Backlog | DPIAs required but not yet started | 0 | Monthly |50| Average DPIA Duration | Mean days from initiation to sign-off | < 30 days | Quarterly |51| DPIA Findings Remediated | % of identified risks with implemented mitigations | > 90% | Quarterly |52| DPIA Review Rate | % of existing DPIAs reviewed within their review cycle | > 95% | Quarterly |53| New Processing Without DPIA | Count of new high-risk processing launched without DPIA | 0 | Monthly |5455### 4. Training and Awareness5657| Metric | Definition | Target | Frequency |58|--------|-----------|--------|-----------|59| Training Completion Rate | % of staff who completed required privacy training | > 95% | Quarterly |60| Training Pass Rate | % passing the assessment on first attempt | > 85% | Quarterly |61| New Hire Training Time | Average days from start date to training completion | < 14 days | Monthly |62| Specialist Certification Rate | % of privacy team with professional certification | > 80% | Annual |63| Privacy Champion Coverage | % of business units with designated privacy champion | 100% | Quarterly |64| Phishing Simulation Pass Rate | % of staff correctly identifying privacy-related phishing | > 90% | Quarterly |6566### 5. Consent Management6768| Metric | Definition | Target | Frequency |69|--------|-----------|--------|-----------|70| Consent Rate | % of users providing consent (by purpose) | Trend monitoring | Monthly |71| Opt-in Rate | % choosing to opt in to optional processing | Trend monitoring | Monthly |72| Opt-out/Withdrawal Rate | % withdrawing previously given consent | < 5% monthly | Monthly |73| Consent Freshness | % of active consents collected within last 12 months | > 70% | Quarterly |74| Consent Collection Coverage | % of data processing with documented consent/legal basis | 100% | Quarterly |75| Cookie Consent Rate | % of website visitors accepting cookies (by category) | Trend monitoring | Monthly |76| Consent Record Accuracy | % of consent records matching actual processing | > 99% | Quarterly |7778### 6. Operational Metrics7980| Metric | Definition | Target | Frequency |81|--------|-----------|--------|-----------|82| Privacy Incidents Reported | Internal privacy incidents reported (not just breaches) | Trend monitoring | Monthly |83| Vendor Privacy Assessments Completed | % of high-risk vendors assessed | 100% | Quarterly |84| Data Inventory Completeness | % of processing activities documented in ROPA | > 95% | Quarterly |85| Policy Acknowledgment Rate | % of staff acknowledging updated privacy policies | > 98% | Per update |86| Privacy-by-Design Gate Pass Rate | % of projects passing privacy review at design gate | > 85% | Quarterly |87| Regulatory Inquiry Response Time | Average days to respond to regulatory inquiries | < 5 days | Per event |8889## Data Collection Architecture9091```92Data Sources Collection Layer Dashboard Layer93+------------------+94| DSAR Platform |---+95+------------------+ |96 | +-------------------+ +-----------------------+97+------------------+ +--->| | | |98| Breach Tracker |------->| Data Integration |--->| Visualization Engine |99+------------------+ +--->| (ETL Pipeline) | | (Grafana / Tableau / |100 | | | | Power BI / Metabase) |101+------------------+ | +-------------------+ +-----------------------+102| DPIA Register |---+ | |103+------------------+ | v v104 | +-------------------+ +-----------------------+105+------------------+ | | Metrics Database | | Alerting System |106| LMS (Training) |---+ | (Time-series / | | - Threshold breaches |107+------------------+ | | PostgreSQL) | | - Trend deviations |108 | +-------------------+ | - SLA warnings |109+------------------+ | +-----------------------+110| Consent Platform |---+111+------------------+112```113114## Metric Collection Implementation115116```python117"""118Privacy metrics collection and aggregation engine.119Collects KPI data from multiple privacy operational systems120and computes dashboard-ready metrics.121"""122123from dataclasses import dataclass124from datetime import datetime, timedelta125from typing import Optional126import statistics127128129@dataclass130class DSARMetrics:131 period_start: datetime132 period_end: datetime133 total_received: int134 total_completed: int135 total_overdue: int136 avg_response_days: float137 median_response_days: float138 p95_response_days: float139 on_time_rate: float140 by_type: dict[str, int]141 backlog: int142 automated_rate: float143144145@dataclass146class BreachMetrics:147 period_start: datetime148 period_end: datetime149 total_breaches: int150 by_severity: dict[str, int]151 avg_detection_hours: float152 avg_notification_hours: float153 avg_containment_hours: float154 total_records_affected: int155 repeat_breach_count: int156157158@dataclass159class ConsentMetrics:160 period_start: datetime161 period_end: datetime162 total_consent_events: int163 opt_in_rate: float164 withdrawal_rate: float165 consent_rate_by_purpose: dict[str, float]166 cookie_acceptance_rate: float167 consent_freshness_pct: float168169170class PrivacyMetricsCollector:171 """172 Collect and compute privacy KPIs from operational data sources.173 """174175 def __init__(self, dsar_repo, breach_repo, dpia_repo, training_repo, consent_repo):176 self.dsar_repo = dsar_repo177 self.breach_repo = breach_repo178 self.dpia_repo = dpia_repo179 self.training_repo = training_repo180 self.consent_repo = consent_repo181182 def compute_dsar_metrics(183 self,184 start_date: datetime,185 end_date: datetime,186 regulatory_deadline_days: int = 30187 ) -> DSARMetrics:188 """Compute DSAR KPIs for a given period."""189 dsars = self.dsar_repo.get_by_period(start_date, end_date)190191 completed = [d for d in dsars if d.status == "completed"]192 response_times = [193 (d.completed_at - d.received_at).days194 for d in completed195 if d.completed_at and d.received_at196 ]197198 on_time = [199 d for d in completed200 if (d.completed_at - d.received_at).days <= regulatory_deadline_days201 ]202203 automated = [d for d in completed if d.automated]204 open_dsars = [d for d in dsars if d.status in ("open", "in_progress")]205206 by_type = {}207 for d in dsars:208 by_type[d.request_type] = by_type.get(d.request_type, 0) + 1209210 return DSARMetrics(211 period_start=start_date,212 period_end=end_date,213 total_received=len(dsars),214 total_completed=len(completed),215 total_overdue=len(dsars) - len(on_time) - len(open_dsars),216 avg_response_days=statistics.mean(response_times) if response_times else 0,217 median_response_days=statistics.median(response_times) if response_times else 0,218 p95_response_days=(219 sorted(response_times)[int(len(response_times) * 0.95)]220 if len(response_times) >= 20 else221 max(response_times) if response_times else 0222 ),223 on_time_rate=len(on_time) / len(completed) if completed else 1.0,224 by_type=by_type,225 backlog=len(open_dsars),226 automated_rate=len(automated) / len(completed) if completed else 0,227 )228229 def compute_breach_metrics(230 self,231 start_date: datetime,232 end_date: datetime233 ) -> BreachMetrics:234 """Compute breach KPIs for a given period."""235 breaches = self.breach_repo.get_by_period(start_date, end_date)236237 by_severity = {}238 detection_hours = []239 notification_hours = []240 containment_hours = []241 total_records = 0242243 for b in breaches:244 by_severity[b.severity] = by_severity.get(b.severity, 0) + 1245 total_records += b.records_affected or 0246247 if b.detected_at and b.occurred_at:248 detection_hours.append(249 (b.detected_at - b.occurred_at).total_seconds() / 3600250 )251 if b.notified_at and b.detected_at:252 notification_hours.append(253 (b.notified_at - b.detected_at).total_seconds() / 3600254 )255 if b.contained_at and b.detected_at:256 containment_hours.append(257 (b.contained_at - b.detected_at).total_seconds() / 3600258 )259260 # Count repeat breaches (same root cause as previous)261 root_causes = [b.root_cause for b in breaches if b.root_cause]262 repeat_count = len(root_causes) - len(set(root_causes))263264 return BreachMetrics(265 period_start=start_date,266 period_end=end_date,267 total_breaches=len(breaches),268 by_severity=by_severity,269 avg_detection_hours=statistics.mean(detection_hours) if detection_hours else 0,270 avg_notification_hours=statistics.mean(notification_hours) if notification_hours else 0,271 avg_containment_hours=statistics.mean(containment_hours) if containment_hours else 0,272 total_records_affected=total_records,273 repeat_breach_count=repeat_count,274 )275276 def generate_executive_report(277 self,278 period_start: datetime,279 period_end: datetime280 ) -> dict:281 """282 Generate a comprehensive executive privacy report.283 Combines all KPI categories into a single report structure.284 """285 dsar = self.compute_dsar_metrics(period_start, period_end)286 breach = self.compute_breach_metrics(period_start, period_end)287288 # Calculate overall privacy health score (0-100)289 health_components = []290291 # DSAR component (25% weight)292 dsar_score = min(100, dsar.on_time_rate * 100)293 health_components.append(("DSAR Compliance", dsar_score, 0.25))294295 # Breach component (30% weight)296 breach_score = 100 if breach.total_breaches == 0 else max(0, 100 - breach.total_breaches * 20)297 health_components.append(("Breach Prevention", breach_score, 0.30))298299 # Response time component (20% weight)300 response_score = min(100, max(0, (30 - dsar.avg_response_days) / 30 * 100))301 health_components.append(("Response Timeliness", response_score, 0.20))302303 # Detection speed component (25% weight)304 detection_score = min(100, max(0, (72 - breach.avg_detection_hours) / 72 * 100)) if breach.total_breaches > 0 else 100305 health_components.append(("Detection Speed", detection_score, 0.25))306307 overall_score = sum(score * weight for _, score, weight in health_components)308309 return {310 "period": {311 "start": period_start.isoformat(),312 "end": period_end.isoformat()313 },314 "overall_privacy_health_score": round(overall_score, 1),315 "health_rating": (316 "Excellent" if overall_score >= 90 else317 "Good" if overall_score >= 75 else318 "Needs Improvement" if overall_score >= 60 else319 "Critical"320 ),321 "components": {322 name: {"score": round(score, 1), "weight": f"{weight*100:.0f}%"}323 for name, score, weight in health_components324 },325 "dsar_summary": {326 "volume": dsar.total_received,327 "on_time_rate": f"{dsar.on_time_rate*100:.1f}%",328 "avg_response_days": round(dsar.avg_response_days, 1),329 "backlog": dsar.backlog330 },331 "breach_summary": {332 "count": breach.total_breaches,333 "severity_distribution": breach.by_severity,334 "avg_detection_hours": round(breach.avg_detection_hours, 1),335 "records_affected": breach.total_records_affected336 },337 }338```339340## Dashboard Visualization Patterns341342### Executive Summary View343344| Panel | Chart Type | Metrics Displayed | Refresh Rate |345|-------|-----------|-------------------|-------------|346| Privacy Health Score | Gauge (0-100) | Overall weighted score | Daily |347| DSAR Volume Trend | Line chart | Monthly DSAR count (12-month rolling) | Daily |348| Breach Timeline | Event timeline | Breaches by severity over time | Real-time |349| On-Time Rate | Single stat with spark line | DSAR on-time completion % | Daily |350| Training Coverage | Horizontal bar | Completion rate by department | Weekly |351| Consent Rate Trend | Multi-line chart | Opt-in rate by purpose (6-month) | Daily |352353### Operational View354355| Panel | Chart Type | Metrics Displayed | Refresh Rate |356|-------|-----------|-------------------|-------------|357| Active DSARs | Table with status | Open requests with deadlines | Hourly |358| DSAR Aging | Histogram | Distribution of open DSAR ages | Daily |359| Response Time Box Plot | Box plot | Response time distribution by month | Daily |360| Breach Detection Funnel | Funnel chart | Detection > Assessment > Notification > Resolution | Per event |361| DPIA Pipeline | Kanban | DPIAs by status (draft, review, approved) | Daily |362| Vendor Risk Heat Map | Heat map | Vendors by risk score and last assessment date | Weekly |363364## Alerting Rules365366| Alert | Condition | Severity | Recipient |367|-------|-----------|----------|-----------|368| DSAR SLA Warning | Any DSAR open > 21 days | Warning | DSAR team |369| DSAR SLA Breach | Any DSAR open > 28 days | Critical | CPO + Legal |370| Breach Detected | New breach record created | Critical | Incident team + CPO |371| Training Compliance Drop | Department completion < 90% | Warning | HR + Privacy |372| Consent Rate Anomaly | Opt-in rate drops > 20% in a week | Warning | Privacy + Marketing |373| DPIA Overdue | DPIA review past scheduled date | Warning | DPIA owner + CPO |374| Vendor Assessment Due | High-risk vendor assessment > 11 months old | Warning | Procurement + Privacy |375376## Executive Reporting Template377378### Monthly Privacy Board Report Structure3793801. **Privacy Health Score**: Overall score with trend arrow3812. **Key Highlights**: 3-5 bullet points on notable events3823. **DSAR Performance**: Volume, on-time rate, top request types3834. **Breach Status**: Count, severity, response times, lessons learned3845. **Compliance Posture**: DPIA coverage, training rates, policy updates3856. **Risk Outlook**: Emerging risks, regulatory developments, planned changes3867. **Resource Needs**: Budget requests, headcount, tooling387388## References389390- IAPP Privacy Program Management Guide (CIPM Body of Knowledge)391- NIST Privacy Framework — GV.MT Monitoring and Review392- ISO/IEC 27701:2019 — Clause 9 (Performance Evaluation)393- EDPB Guidelines on Data Breach Notification (WP250 rev.01)394- Gartner Privacy Program Metrics Framework395- ISACA Privacy Audit and Assurance Program