Engineering Report Generator
Quick Start
import plotly.express as px
import pandas as pd
from pathlib import Path
from datetime import datetime
# Load data
df = pd.read_csv("../data/processed/results.csv")
# Create visualization
fig = px.line(df, x="date", y="value", title="Analysis Results")
# Generate HTML report
html = f"""<!DOCTYPE html>
<html>
<head><title>Engineering Report</title></head>
<body>
<h1>Analysis Report - {datetime.now().strftime('%Y-%m-%d')}</h1>
{fig.to_html(full_html=False, include_plotlyjs="cdn")}
</body>
</html>"""
Path("../reports/analysis.html").write_text(html)
print("Report generated: reports/analysis.html")
When to Use
- Creating analysis reports with charts and visualizations
- Building interactive dashboards from CSV/data sources
- Generating technical documentation with plots
- Producing client-deliverable HTML reports
- Summarizing engineering calculations with graphics
Report Structure
Standard Sections
- Header - Title, date, project info, version
- Executive Summary - Key findings and metrics at a glance
- Methodology - Analysis approach and assumptions
- Results - Data tables and interactive visualizations
- Discussion - Interpretation of results
- Conclusions - Summary and recommendations
- Appendix - Supporting data, references
Implementation Pattern
Basic Report Generation
import plotly.express as px
import plotly.graph_objects as go
from plotly.subplots import make_subplots
import pandas as pd
from pathlib import Path
from datetime import datetime
def generate_report(
data_path: str,
*See sub-skills for full details.*
### Visualization Patterns
```python
def create_visualizations(df: pd.DataFrame, chart_configs: list) -> list:
"""Create Plotly figures from configuration."""
figures = []
for config in chart_configs:
chart_type = config.get('type', 'line')
if chart_type == 'line':
fig = px.line(
*See sub-skills for full details.*
### HTML Template
```python
def build_html_report(title: str, sections: dict, figures: list) -> str:
"""Build complete HTML report."""
# Convert figures to HTML
chart_html = '\n'.join([
f'<div class="chart-container">{fig.to_html(full_html=False, include_plotlyjs="cdn")}</div>'
for fig in figures
])
*See sub-skills for full details.*
## Integration
### With YAML Workflow
```yaml
task: generate_report
input:
data_path: data/processed/results.csv
output:
report_path: reports/analysis.html
config:
title: "Analysis Report"
charts:
- type: line
x: time
y: value
With Data Pipeline
# Pipeline output -> Report input
pipeline_results = process_data(raw_data)
pipeline_results.to_csv('data/processed/results.csv')
generate_report(
data_path='data/processed/results.csv',
output_path='reports/analysis.html',
title='Pipeline Results'
)
Related Skills
Version History
- 1.1.0 (2026-01-02): Upgraded to SKILL_TEMPLATE_v2 format with Quick Start, Error Handling, Metrics, Execution Checklist, additional examples
- 1.0.0 (2024-10-15): Initial release with Plotly visualizations, HTML templates, responsive design
Sub-Skills
- Example 1: Production Analysis Report (+2)
- Do (+4)
Sub-Skills
- Error Handling
- Execution Checklist
- Metrics
1---2name: engineering-report-generator3description: Generate engineering analysis reports with interactive Plotly visualizations, standard report sections, and HTML export. Use for creating dashboards, analysis summaries, and technical documentation with charts.4---56# Engineering Report Generator78## Quick Start910```python11import plotly.express as px12import pandas as pd13from pathlib import Path14from datetime import datetime1516# Load data17df = pd.read_csv("../data/processed/results.csv")1819# Create visualization20fig = px.line(df, x="date", y="value", title="Analysis Results")2122# Generate HTML report23html = f"""<!DOCTYPE html>24<html>25<head><title>Engineering Report</title></head>26<body>27<h1>Analysis Report - {datetime.now().strftime('%Y-%m-%d')}</h1>28{fig.to_html(full_html=False, include_plotlyjs="cdn")}29</body>30</html>"""3132Path("../reports/analysis.html").write_text(html)33print("Report generated: reports/analysis.html")34```3536## When to Use3738- Creating analysis reports with charts and visualizations39- Building interactive dashboards from CSV/data sources40- Generating technical documentation with plots41- Producing client-deliverable HTML reports42- Summarizing engineering calculations with graphics4344## Report Structure4546### Standard Sections47481. **Header** - Title, date, project info, version492. **Executive Summary** - Key findings and metrics at a glance503. **Methodology** - Analysis approach and assumptions514. **Results** - Data tables and interactive visualizations525. **Discussion** - Interpretation of results536. **Conclusions** - Summary and recommendations547. **Appendix** - Supporting data, references5556## Implementation Pattern5758### Basic Report Generation5960```python61import plotly.express as px62import plotly.graph_objects as go63from plotly.subplots import make_subplots64import pandas as pd65from pathlib import Path66from datetime import datetime6768def generate_report(69 data_path: str,7071*See sub-skills for full details.*72### Visualization Patterns7374```python75def create_visualizations(df: pd.DataFrame, chart_configs: list) -> list:76 """Create Plotly figures from configuration."""77 figures = []7879 for config in chart_configs:80 chart_type = config.get('type', 'line')8182 if chart_type == 'line':83 fig = px.line(8485*See sub-skills for full details.*86### HTML Template8788```python89def build_html_report(title: str, sections: dict, figures: list) -> str:90 """Build complete HTML report."""9192 # Convert figures to HTML93 chart_html = '\n'.join([94 f'<div class="chart-container">{fig.to_html(full_html=False, include_plotlyjs="cdn")}</div>'95 for fig in figures96 ])979899*See sub-skills for full details.*100101## Integration102103### With YAML Workflow104105```yaml106task: generate_report107input:108 data_path: data/processed/results.csv109output:110 report_path: reports/analysis.html111config:112 title: "Analysis Report"113 charts:114 - type: line115 x: time116 y: value117```118### With Data Pipeline119120```python121# Pipeline output -> Report input122pipeline_results = process_data(raw_data)123pipeline_results.to_csv('data/processed/results.csv')124125generate_report(126 data_path='data/processed/results.csv',127 output_path='reports/analysis.html',128 title='Pipeline Results'129)130```131132## Related Skills133134- [xlsx](../../document-handling/xlsx/SKILL.md) - Excel data handling135- [pdf](../../document-handling/pdf/SKILL.md) - PDF report generation136- [data-pipeline-processor](../data-pipeline-processor/SKILL.md) - Data preparation137- [yaml-workflow-executor](../yaml-workflow-executor/SKILL.md) - Workflow automation138139---140141## Version History142143- **1.1.0** (2026-01-02): Upgraded to SKILL_TEMPLATE_v2 format with Quick Start, Error Handling, Metrics, Execution Checklist, additional examples144- **1.0.0** (2024-10-15): Initial release with Plotly visualizations, HTML templates, responsive design145146## Sub-Skills147148- [Example 1: Production Analysis Report (+2)](example-1-production-analysis-report/SKILL.md)149- [Do (+4)](do/SKILL.md)150151## Sub-Skills152153- [Error Handling](error-handling/SKILL.md)154- [Execution Checklist](execution-checklist/SKILL.md)155- [Metrics](metrics/SKILL.md)