Install
openclaw skills install @austin0208/bidding-analysis-report招标数据分析报告生成技能 - 支持AI项目占比分析、年度趋势分析、TOP机构排名,自动生成Word/PDF报告,嵌入高质量图表。适用于高校招标、政府采购、企业采购等场景。
openclaw skills install @austin0208/bidding-analysis-report本技能用于分析招标数据并生成专业报告,支持:
Excel文件(.xlsx),需包含以下字段:
项目名称 - 招标项目名称项目主体 - 项目分类/类型成交金额(元) - 中标金额信息采集日期 - 招标日期(时间戳或日期格式)甲方名称 - 招标机构名称默认关键词:人工智能、AI、智能、大数据、机器学习、深度学习、智慧
#FF8C42#00F5D4#7ED4FF#00D4FFfrom bidding_analysis_report import BiddingReport
# 创建报告实例
report = BiddingReport(
data_path='招标数据.xlsx',
ai_keywords=['人工智能', 'AI', '智能', '大数据'],
output_format='word' # 或 'pdf'
)
# 生成报告
report.generate(
title='昆明高校近三年AI项目分析报告',
top_n=10, # TOP机构数量
detail_n=5 # 详细分析的机构数量
)
python bidding_report.py \
--data 招标数据.xlsx \
--title "昆明高校AI招标分析报告" \
--output report.docx \
--top 10 \
--detail 5
每个机构包含:
pandas>=1.3.0
matplotlib>=3.5.0
python-docx>=0.8.11
openpyxl>=3.0.0
import matplotlib.pyplot as plt
# 优先使用微软雅黑,回退到系统支持字体
plt.rcParams['font.sans-serif'] = ['Microsoft YaHei', 'Droid Sans Fallback', 'SimHei']
plt.rcParams['axes.unicode_minus'] = False
# 嵌套环形图
fig, ax = plt.subplots(figsize=(12, 8))
wedges1 = ax.pie(outer_vals, radius=1.3, colors=colors_outer,
wedgeprops=dict(width=0.35, edgecolor='white'))
wedges2 = ax.pie(inner_vals, radius=0.95, colors=colors_inner,
wedgeprops=dict(width=0.35, edgecolor='white'))
# 保存为PNG
plt.savefig('chart.png', dpi=150, bbox_inches='tight', facecolor='white')
from docx import Document
from docx.shared import Inches, Pt
doc = Document()
# 设置字体和行距
style = doc.styles['Normal']
style.font.name = 'Microsoft YaHei'
style.font.size = Pt(12)
# 插入图表
doc.add_picture('chart.png', width=Inches(5.5))
# 数据加粗显示
p = doc.add_paragraph()
p.add_run('总项目数:')
run = p.add_run('6,786')
run.bold = True
| 参数 | 说明 | 默认值 |
|---|---|---|
data_path | 数据文件路径 | 必填 |
ai_keywords | AI项目识别关键词 | ['人工智能','AI','智能',...] |
output_format | 输出格式 | 'word' |
top_n | TOP机构数量 | 10 |
detail_n | 详细分析机构数量 | 5 |
chart_dpi | 图表分辨率 | 150 |
line_spacing | 行距倍数 | 1.5 |
.format() 或字符串拼接,避免 f-string 编码问题总体情况:
年度趋势:
TOP10高校:
作者: OpenClaw Team
许可: MIT License