5000-projects-analysis について
多数の IFC・Revit プロジェクトを分析し、建設ベンチマークの抽出やパターン検出、機械学習用データの準備を行うスキルです。大規模なプロジェクトデータを扱う分析担当者や研究者向けです。
主な機能
- 01IFC・Revit プロジェクト分析
- 02構造パターン指標
- 03品質・完全性指標
- 04複雑度指標
- 05機械学習向け特徴量の準備
活用シーン
- 01大規模データセットとのプロジェクト比較
- 02設計や品質の反復パターンの発見
- 03コスト予測用特徴量の準備
- 04BIM プロジェクトから研究データセットを作成
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ datadrivenconstruction/ ddc_skills_for_ai_agents_in_construction --skill 5000-projects-analysisインストール後、Claude Code で/5000-projects-analysisを入力して読み込まれたか確認します。
同梱ファイルclaw.jsoninstructions.md
詳細
大規模 BIM プロジェクト分析
ビジネスケース
問題点
建設会社には、次の理由から業界ベンチマークが不足しています。
- 個々のプロジェクトデータだけでは統計分析に不十分です
- 比較可能なプロジェクトデータを入手できません
- 手作業での分析では、数千件のプロジェクトに対応できません
ソリューション
5000 件以上の IFC および Revit プロジェクトを分析してパターンを抽出し、ベンチマークを作成するとともに、予測用の ML モデルをトレーニングします。
ビジネス価値
- 業界ベンチマーク - プロジェクトを他の 5000 件以上のプロジェクトと比較できます
- パターン検出 - 共通する設計や問題を特定できます
- ML トレーニングデータ - 実データを使って予測モデルを構築できます
- 研究基盤 - 学術研究および業界研究のためのデータセット
技術的な実装
データセットの概要
| 指標 | 値 |
|---|---|
| プロジェクト総数 | 5000 件以上 |
| ファイル形式 | IFC、RVT |
| 要素 | 数百万 |
| カテゴリ | 200 以上 |
分析パイプライン
import pandas as pd
import numpy as np
from pathlib import Path
from typing import Dict, List
import matplotlib.pyplot as plt
import seaborn as sns
class BIMProjectAnalyzer:
def __init__(self, data_path: str):
self.data_path = Path(data_path)
self.projects = []
self.elements = None
def load_projects(self) -> int:
"""Load all project data."""
project_files = list(self.data_path.glob("*.xlsx"))
for f in project_files:
try:
df = pd.read_excel(f, sheet_name="Elements")
df['ProjectId'] = f.stem
self.projects.append(df)
except Exception as e:
print(f"Error loading {f}: {e}")
self.elements = pd.concat(self.projects, ignore_index=True)
return len(self.projects)
def project_statistics(self) -> pd.DataFrame:
"""Calculate statistics per project."""
stats = self.elements.groupby('ProjectId').agg({
'ElementId': 'count',
'Category': 'nunique',
'Volume': ['sum', 'mean'],
'Area': ['sum', 'mean']
}).reset_index()
stats.columns = [
'ProjectId', 'ElementCount', 'CategoryCount',
'TotalVolume', 'AvgVolume', 'TotalArea', 'AvgArea'
]
return stats
def category_distribution(self) -> pd.DataFrame:
"""Analyze element distribution across categories."""
dist = self.elements.groupby('Category').agg({
'ElementId': 'count',
'ProjectId': 'nunique',
'Volume': 'sum',
'Area': 'sum'
}).reset_index()
dist.columns = ['Category', 'ElementCount', 'ProjectCount',
'TotalVolume', 'TotalArea']
dist['AvgPerProject'] = dist['ElementCount'] / dist['ProjectCount']
return dist.sort_values('ElementCount', ascending=False)
def find_outliers(self, column: str, threshold: float = 3.0) -> pd.DataFrame:
"""Find projects with outlier values."""
stats = self.project_statistics()
mean = stats[column].mean()
std = stats[column].std()
z_scores = np.abs((stats[column] - mean) / std)
outliers = stats[z_scores > threshold]
return outliers
def benchmark_project(self, project_id: str) -> Dict:
"""Compare project against dataset benchmarks."""
stats = self.project_statistics()
project = stats[stats['ProjectId'] == project_id].iloc[0]
percentiles = {}
for col in ['ElementCount', 'TotalVolume', 'TotalArea']:
percentile = (stats[col] < project[col]).mean() * 100
percentiles[col] = round(percentile, 1)
return {
'project_id': project_id,
'percentiles': percentiles,
'above_average': {
col: project[col] > stats[col].mean()
for col in ['ElementCount', 'TotalVolume', 'TotalArea']
}
}
def generate_report(self, output_path: str) -> str:
"""Generate comprehensive analysis report."""
stats = self.project_statistics()
cat_dist = self.category_distribution()
# Create visualizations
fig, axes = plt.subplots(2, 2, figsize=(14, 10))
# Element count distribution
axes[0, 0].hist(stats['ElementCount'], bins=50, edgecolor='black')
axes[0, 0].set_title('Element Count Distribution')
axes[0, 0].set_xlabel('Elements per Project')
# Top categories
top_cats = cat_dist.head(15)
axes[0, 1].barh(top_cats['Category'], top_cats['ElementCount'])
axes[0, 1].set_title('Top 15 Categories')
# Volume distribution
axes[1, 0].hist(stats['TotalVolume'], bins=50, edgecolor='black')
axes[1, 0].set_title('Total Volume Distribution')
# Category count vs Element count
axes[1, 1].scatter(stats['CategoryCount'], stats['ElementCount'], alpha=0.5)
axes[1, 1].set_xlabel('Category Count')
axes[1, 1].set_ylabel('Element Count')
axes[1, 1].set_title('Complexity Analysis')
plt.tight_layout()
plt.savefig(output_path, dpi=150)
return output_path
分析例
# Initialize analyzer
analyzer = BIMProjectAnalyzer("C:/Data/5000_Projects")
# Load all projects
num_projects = analyzer.load_projects()
print(f"Loaded {num_projects} projects")
# Get statistics
stats = analyzer.project_statistics()
print("\nDataset Summary:")
print(f" Total elements: {analyzer.elements.shape[0]:,}")
print(f" Avg elements/project: {stats['ElementCount'].mean():,.0f}")
print(f" Avg volume/project: {stats['TotalVolume'].mean():,.2f} m³")
# Category analysis
categories = analyzer.category_distribution()
print("\nTop 10 Categories:")
print(categories.head(10)[['Category', 'ElementCount', 'AvgPerProject']])
# Benchmark a specific project
benchmark = analyzer.benchmark_project("MyProject_001")
print(f"\nProject Benchmark:")
print(f" Element count: {benchmark['percentiles']['ElementCount']}th percentile")
print(f" Total volume: {benchmark['percentiles']['TotalVolume']}th percentile")
# Generate report
report_path = analyzer.generate_report("analysis_report.png")
抽出できるインサイト
構造パターン
- 壁と床の平均比率
- 面積あたりの一般的なドア/窓の数
- MEP 要素密度のベンチマーク
品質指標
- カテゴリの完全性
- パラメーターの入力率
- 幾何学的な整合性
複雑さの指標
- 床面積 1 m² あたりの要素数
- カテゴリ多様性指数
- 階数と建物の高さの関係
ML との統合
from sklearn.ensemble import RandomForestRegressor
from sklearn.model_selection import train_test_split
# Prepare features for cost prediction
features = stats[[
'ElementCount', 'CategoryCount',
'TotalVolume', 'TotalArea'
]].values
# Assuming you have cost data
# costs = [project_cost_data]
# Train model
X_train, X_test, y_train, y_test = train_test_split(
features, costs, test_size=0.2
)
model = RandomForestRegressor(n_estimators=100)
model.fit(X_train, y_train)
# Predict for new project
new_project = [[5000, 50, 15000, 8000]] # elements, categories, volume, area
predicted_cost = model.predict(new_project)
リソース
- Kaggle Notebook: 5000 Projects Analysis
- データセット:DataDrivenConstruction.io から入手できます
コメント
Markdown 対応