[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6FJTNQZJ73HNX0S4AX4VYDB":3,"skill-same:01M6FJTNQZJ73HNX0S4AX4VYDB":67},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":34,"linkOnly":35,"markdownContent":36,"markdownBody":37,"frontMatter":38,"refName":40,"commitSha":41,"skillDirectory":42,"forksCount":43,"repositoryHtmlUrl":44,"repositoryHomepageUrl":6,"ownerHtmlUrl":45,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":46,"install":47,"resources":60},"01M6FJTNQZJ73HNX0S4AX4VYDB","data-visualization",null,"Create visualizations for construction data. Generate charts, graphs, heatmaps, and interactive dashboards using Matplotlib, Seaborn, and Plotly for project analysis and reporting.","kbarbel640-del\u002Fskills","kbarbel640-del","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F255315490?v=4","01M6CJPPQGCCESXMG3K7BBGQ5J","01M6CJPPX2PB2BCZERFVM2C2B3",1,"MIT","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fdatadrivenconstruction\u002Fdata-visualization\u002FSKILL.md",[],[18,19,20,21,22,5,23,24,25,26,27,28,29,30,31,32,33],"visualization","data","data visualization","plotly","graphs","project","interactive","visualizations","dashboards","Charts","seaborn","matplotlib","analysis","reporting","generate","create","2026-11-10 10:12:30",false,"---\r\nslug: \"data-visualization\"\r\ndisplay_name: \"Data Visualization\"\r\ndescription: \"Create visualizations for construction data. Generate charts, graphs, heatmaps, and interactive dashboards using Matplotlib, Seaborn, and Plotly for project analysis and reporting.\"\r\n---\r\n\r\n# Data Visualization for Construction\r\n\r\n## Overview\r\n\r\nBased on DDC methodology (Chapter 4.1), this skill provides comprehensive data visualization techniques for construction analytics. Visual insights drive better decisions - from cost breakdowns to schedule analysis.\r\n\r\n**Book Reference:** \"Аналитика данных и принятие решений\" \u002F \"Data Analytics and Decision Making\"\r\n\r\n> \"Визуализация данных превращает сложные наборы данных в понятные графики, которые могут использоваться для принятия решений на всех уровнях проекта.\"\r\n> — DDC Book, Chapter 4.1\r\n\r\n## Quick Start\r\n\r\n```python\r\nimport pandas as pd\r\nimport matplotlib.pyplot as plt\r\nimport seaborn as sns\r\n\r\n# Load construction data\r\ndf = pd.read_excel(\"project_data.xlsx\")\r\n\r\n# Quick bar chart - volumes by category\r\nfig, ax = plt.subplots(figsize=(10, 6))\r\ndf.groupby('Category')['Volume_m3'].sum().plot(kind='bar', ax=ax)\r\nax.set_title('Volume by Category')\r\nax.set_ylabel('Volume (m³)')\r\nplt.tight_layout()\r\nplt.savefig('volume_by_category.png', dpi=150)\r\nplt.show()\r\n```\r\n\r\n## Matplotlib Fundamentals\r\n\r\n### Basic Charts for Construction\r\n\r\n```python\r\nimport matplotlib.pyplot as plt\r\nimport pandas as pd\r\nimport numpy as np\r\n\r\ndef create_cost_breakdown_pie(df, cost_col='Cost', category_col='Category'):\r\n    \"\"\"Create pie chart for cost breakdown\"\"\"\r\n    costs = df.groupby(category_col)[cost_col].sum()\r\n\r\n    fig, ax = plt.subplots(figsize=(10, 8))\r\n\r\n    # Create pie with percentage labels\r\n    wedges, texts, autotexts = ax.pie(\r\n        costs.values,\r\n        labels=costs.index,\r\n        autopct='%1.1f%%',\r\n        startangle=90,\r\n        colors=plt.cm.Set3.colors\r\n    )\r\n\r\n    ax.set_title('Cost Breakdown by Category', fontsize=14, fontweight='bold')\r\n\r\n    # Add total in center\r\n    ax.text(0, 0, f'Total:\\n${costs.sum():,.0f}',\r\n            ha='center', va='center', fontsize=12)\r\n\r\n    plt.tight_layout()\r\n    return fig\r\n\r\ndef create_volume_bar_chart(df, volume_col='Volume_m3', category_col='Category'):\r\n    \"\"\"Create horizontal bar chart for volumes\"\"\"\r\n    volumes = df.groupby(category_col)[volume_col].sum().sort_values()\r\n\r\n    fig, ax = plt.subplots(figsize=(10, 6))\r\n\r\n    bars = ax.barh(volumes.index, volumes.values, color='steelblue')\r\n\r\n    # Add value labels\r\n    for bar, value in zip(bars, volumes.values):\r\n        ax.text(value + volumes.max() * 0.01, bar.get_y() + bar.get_height()\u002F2,\r\n                f'{value:,.0f} m³', va='center', fontsize=10)\r\n\r\n    ax.set_xlabel('Volume (m³)')\r\n    ax.set_title('Material Volumes by Category', fontsize=14, fontweight='bold')\r\n    ax.set_xlim(0, volumes.max() * 1.15)\r\n\r\n    plt.tight_layout()\r\n    return fig\r\n\r\ndef create_level_comparison(df, value_col='Volume_m3', level_col='Level'):\r\n    \"\"\"Create grouped bar chart comparing levels\"\"\"\r\n    pivot = df.pivot_table(\r\n        values=value_col,\r\n        index=level_col,\r\n        columns='Category',\r\n        aggfunc='sum',\r\n        fill_value=0\r\n    )\r\n\r\n    fig, ax = plt.subplots(figsize=(12, 6))\r\n    pivot.plot(kind='bar', ax=ax, width=0.8)\r\n\r\n    ax.set_xlabel('Building Level')\r\n    ax.set_ylabel('Volume (m³)')\r\n    ax.set_title('Volume Distribution by Level and Category', fontsize=14, fontweight='bold')\r\n    ax.legend(title='Category', bbox_to_anchor=(1.02, 1), loc='upper left')\r\n\r\n    plt.xticks(rotation=45)\r\n    plt.tight_layout()\r\n    return fig\r\n```\r\n\r\n### Time Series Visualization\r\n\r\n```python\r\ndef create_progress_chart(df, date_col='Date', value_col='Cumulative_Progress'):\r\n    \"\"\"Create S-curve progress chart\"\"\"\r\n    df = df.sort_values(date_col)\r\n\r\n    fig, ax = plt.subplots(figsize=(12, 6))\r\n\r\n    # Actual progress\r\n    ax.plot(df[date_col], df[value_col],\r\n            'b-', linewidth=2, label='Actual Progress')\r\n\r\n    # Planned progress (if available)\r\n    if 'Planned_Progress' in df.columns:\r\n        ax.plot(df[date_col], df['Planned_Progress'],\r\n                'g--', linewidth=2, label='Planned Progress')\r\n\r\n    ax.fill_between(df[date_col], 0, df[value_col], alpha=0.3)\r\n\r\n    ax.set_xlabel('Date')\r\n    ax.set_ylabel('Progress (%)')\r\n    ax.set_title('Project S-Curve', fontsize=14, fontweight='bold')\r\n    ax.legend()\r\n    ax.grid(True, alpha=0.3)\r\n\r\n    # Format dates\r\n    fig.autofmt_xdate()\r\n\r\n    plt.tight_layout()\r\n    return fig\r\n\r\ndef create_gantt_chart(df, start_col='Start', end_col='End', task_col='Task'):\r\n    \"\"\"Create simple Gantt chart\"\"\"\r\n    df = df.sort_values(start_col)\r\n\r\n    fig, ax = plt.subplots(figsize=(14, len(df) * 0.5 + 2))\r\n\r\n    # Plot each task as horizontal bar\r\n    for i, (_, row) in enumerate(df.iterrows()):\r\n        start = pd.to_datetime(row[start_col])\r\n        end = pd.to_datetime(row[end_col])\r\n        duration = (end - start).days\r\n\r\n        ax.barh(i, duration, left=start, height=0.6,\r\n                align='center', color='steelblue', alpha=0.8)\r\n\r\n    ax.set_yticks(range(len(df)))\r\n    ax.set_yticklabels(df[task_col])\r\n    ax.set_xlabel('Date')\r\n    ax.set_title('Project Schedule - Gantt Chart', fontsize=14, fontweight='bold')\r\n    ax.grid(axis='x', alpha=0.3)\r\n\r\n    fig.autofmt_xdate()\r\n    plt.tight_layout()\r\n    return fig\r\n```\r\n\r\n## Seaborn for Statistical Visualization\r\n\r\n### Distribution Analysis\r\n\r\n```python\r\nimport seaborn as sns\r\n\r\ndef create_distribution_analysis(df, value_col='Volume_m3', category_col='Category'):\r\n    \"\"\"Create distribution plots for construction data\"\"\"\r\n    fig, axes = plt.subplots(2, 2, figsize=(14, 10))\r\n\r\n    # 1. Histogram with KDE\r\n    sns.histplot(data=df, x=value_col, kde=True, ax=axes[0, 0])\r\n    axes[0, 0].set_title('Volume Distribution')\r\n\r\n    # 2. Box plot by category\r\n    sns.boxplot(data=df, x=category_col, y=value_col, ax=axes[0, 1])\r\n    axes[0, 1].set_xticklabels(axes[0, 1].get_xticklabels(), rotation=45)\r\n    axes[0, 1].set_title('Volume by Category')\r\n\r\n    # 3. Violin plot\r\n    sns.violinplot(data=df, x=category_col, y=value_col, ax=axes[1, 0])\r\n    axes[1, 0].set_xticklabels(axes[1, 0].get_xticklabels(), rotation=45)\r\n    axes[1, 0].set_title('Volume Distribution by Category')\r\n\r\n    # 4. Strip plot with jitter\r\n    sns.stripplot(data=df, x=category_col, y=value_col,\r\n                  ax=axes[1, 1], alpha=0.5, jitter=True)\r\n    axes[1, 1].set_xticklabels(axes[1, 1].get_xticklabels(), rotation=45)\r\n    axes[1, 1].set_title('Individual Elements')\r\n\r\n    plt.tight_layout()\r\n    return fig\r\n\r\ndef create_correlation_heatmap(df, numeric_cols=None):\r\n    \"\"\"Create correlation heatmap for numeric columns\"\"\"\r\n    if numeric_cols is None:\r\n        numeric_cols = df.select_dtypes(include=[np.number]).columns.tolist()\r\n\r\n    corr_matrix = df[numeric_cols].corr()\r\n\r\n    fig, ax = plt.subplots(figsize=(10, 8))\r\n\r\n    sns.heatmap(corr_matrix,\r\n                annot=True,\r\n                cmap='RdYlBu_r',\r\n                center=0,\r\n                fmt='.2f',\r\n                square=True,\r\n                ax=ax)\r\n\r\n    ax.set_title('Correlation Matrix', fontsize=14, fontweight='bold')\r\n\r\n    plt.tight_layout()\r\n    return fig\r\n```\r\n\r\n### Category Analysis\r\n\r\n```python\r\ndef create_category_summary(df, category_col='Category',\r\n                            value_col='Volume_m3', cost_col='Cost'):\r\n    \"\"\"Create comprehensive category summary visualization\"\"\"\r\n    fig, axes = plt.subplots(2, 2, figsize=(14, 10))\r\n\r\n    # 1. Count by category\r\n    category_counts = df[category_col].value_counts()\r\n    sns.barplot(x=category_counts.index, y=category_counts.values, ax=axes[0, 0])\r\n    axes[0, 0].set_title('Element Count by Category')\r\n    axes[0, 0].set_xticklabels(axes[0, 0].get_xticklabels(), rotation=45)\r\n\r\n    # 2. Total volume by category\r\n    volumes = df.groupby(category_col)[value_col].sum().sort_values(ascending=False)\r\n    sns.barplot(x=volumes.index, y=volumes.values, ax=axes[0, 1])\r\n    axes[0, 1].set_title('Total Volume by Category')\r\n    axes[0, 1].set_xticklabels(axes[0, 1].get_xticklabels(), rotation=45)\r\n\r\n    # 3. Average cost by category\r\n    if cost_col in df.columns:\r\n        avg_cost = df.groupby(category_col)[cost_col].mean().sort_values(ascending=False)\r\n        sns.barplot(x=avg_cost.index, y=avg_cost.values, ax=axes[1, 0])\r\n        axes[1, 0].set_title('Average Cost by Category')\r\n        axes[1, 0].set_xticklabels(axes[1, 0].get_xticklabels(), rotation=45)\r\n\r\n    # 4. Volume vs Cost scatter\r\n    if cost_col in df.columns:\r\n        sns.scatterplot(data=df, x=value_col, y=cost_col,\r\n                        hue=category_col, alpha=0.7, ax=axes[1, 1])\r\n        axes[1, 1].set_title('Volume vs Cost')\r\n        axes[1, 1].legend(bbox_to_anchor=(1.02, 1), loc='upper left')\r\n\r\n    plt.tight_layout()\r\n    return fig\r\n```\r\n\r\n## Plotly for Interactive Dashboards\r\n\r\n### Interactive Charts\r\n\r\n```python\r\nimport plotly.express as px\r\nimport plotly.graph_objects as go\r\nfrom plotly.subplots import make_subplots\r\n\r\ndef create_interactive_cost_breakdown(df, category_col='Category', cost_col='Cost'):\r\n    \"\"\"Create interactive sunburst chart\"\"\"\r\n    # Aggregate by category and material\r\n    agg_df = df.groupby([category_col, 'Material'])[cost_col].sum().reset_index()\r\n\r\n    fig = px.sunburst(\r\n        agg_df,\r\n        path=[category_col, 'Material'],\r\n        values=cost_col,\r\n        title='Cost Breakdown by Category and Material'\r\n    )\r\n\r\n    fig.update_layout(height=600)\r\n    return fig\r\n\r\ndef create_interactive_3d_scatter(df, x_col='Volume_m3', y_col='Cost',\r\n                                   z_col='Weight_kg', color_col='Category'):\r\n    \"\"\"Create 3D scatter plot for multi-dimensional analysis\"\"\"\r\n    fig = px.scatter_3d(\r\n        df,\r\n        x=x_col,\r\n        y=y_col,\r\n        z=z_col,\r\n        color=color_col,\r\n        hover_data=['ElementId'],\r\n        title='3D Analysis: Volume vs Cost vs Weight'\r\n    )\r\n\r\n    fig.update_layout(height=700)\r\n    return fig\r\n\r\ndef create_interactive_timeline(df, date_col='Date', value_col='Progress',\r\n                                 category_col='Phase'):\r\n    \"\"\"Create interactive timeline with range slider\"\"\"\r\n    fig = px.line(\r\n        df,\r\n        x=date_col,\r\n        y=value_col,\r\n        color=category_col,\r\n        title='Project Progress Timeline'\r\n    )\r\n\r\n    fig.update_layout(\r\n        xaxis=dict(\r\n            rangeselector=dict(\r\n                buttons=list([\r\n                    dict(count=1, label=\"1m\", step=\"month\", stepmode=\"backward\"),\r\n                    dict(count=3, label=\"3m\", step=\"month\", stepmode=\"backward\"),\r\n                    dict(count=6, label=\"6m\", step=\"month\", stepmode=\"backward\"),\r\n                    dict(step=\"all\", label=\"All\")\r\n                ])\r\n            ),\r\n            rangeslider=dict(visible=True),\r\n            type=\"date\"\r\n        ),\r\n        height=500\r\n    )\r\n\r\n    return fig\r\n```\r\n\r\n### Dashboard Layout\r\n\r\n```python\r\ndef create_project_dashboard(df):\r\n    \"\"\"Create comprehensive project dashboard\"\"\"\r\n    fig = make_subplots(\r\n        rows=2, cols=2,\r\n        subplot_titles=(\r\n            'Cost by Category',\r\n            'Volume Distribution',\r\n            'Elements by Level',\r\n            'Progress Over Time'\r\n        ),\r\n        specs=[\r\n            [{\"type\": \"pie\"}, {\"type\": \"bar\"}],\r\n            [{\"type\": \"bar\"}, {\"type\": \"scatter\"}]\r\n        ]\r\n    )\r\n\r\n    # 1. Cost pie chart\r\n    costs = df.groupby('Category')['Cost'].sum()\r\n    fig.add_trace(\r\n        go.Pie(labels=costs.index, values=costs.values, name='Cost'),\r\n        row=1, col=1\r\n    )\r\n\r\n    # 2. Volume bar chart\r\n    volumes = df.groupby('Category')['Volume_m3'].sum().sort_values(ascending=True)\r\n    fig.add_trace(\r\n        go.Bar(x=volumes.values, y=volumes.index, orientation='h', name='Volume'),\r\n        row=1, col=2\r\n    )\r\n\r\n    # 3. Elements by level\r\n    level_counts = df.groupby('Level').size()\r\n    fig.add_trace(\r\n        go.Bar(x=level_counts.index, y=level_counts.values, name='Count'),\r\n        row=2, col=1\r\n    )\r\n\r\n    # 4. Progress scatter (if available)\r\n    if 'Date' in df.columns and 'Progress' in df.columns:\r\n        fig.add_trace(\r\n            go.Scatter(x=df['Date'], y=df['Progress'], mode='lines+markers', name='Progress'),\r\n            row=2, col=2\r\n        )\r\n\r\n    fig.update_layout(\r\n        height=800,\r\n        title_text='Project Analytics Dashboard',\r\n        showlegend=False\r\n    )\r\n\r\n    return fig\r\n```\r\n\r\n## Construction-Specific Visualizations\r\n\r\n### Heatmaps for Level Analysis\r\n\r\n```python\r\ndef create_level_heatmap(df, level_col='Level', category_col='Category',\r\n                          value_col='Volume_m3'):\r\n    \"\"\"Create heatmap for level-by-category analysis\"\"\"\r\n    pivot = df.pivot_table(\r\n        values=value_col,\r\n        index=level_col,\r\n        columns=category_col,\r\n        aggfunc='sum',\r\n        fill_value=0\r\n    )\r\n\r\n    fig, ax = plt.subplots(figsize=(12, 8))\r\n\r\n    sns.heatmap(\r\n        pivot,\r\n        annot=True,\r\n        fmt=',.0f',\r\n        cmap='YlOrRd',\r\n        ax=ax,\r\n        cbar_kws={'label': 'Volume (m³)'}\r\n    )\r\n\r\n    ax.set_title('Volume Distribution: Level × Category', fontsize=14, fontweight='bold')\r\n\r\n    plt.tight_layout()\r\n    return fig\r\n\r\ndef create_material_treemap(df, category_col='Category', material_col='Material',\r\n                             value_col='Volume_m3'):\r\n    \"\"\"Create treemap for hierarchical material analysis\"\"\"\r\n    agg_df = df.groupby([category_col, material_col])[value_col].sum().reset_index()\r\n\r\n    fig = px.treemap(\r\n        agg_df,\r\n        path=[category_col, material_col],\r\n        values=value_col,\r\n        title='Material Distribution Treemap',\r\n        color=value_col,\r\n        color_continuous_scale='Blues'\r\n    )\r\n\r\n    fig.update_layout(height=600)\r\n    return fig\r\n```\r\n\r\n### Cost Analysis Charts\r\n\r\n```python\r\ndef create_cost_analysis_dashboard(df):\r\n    \"\"\"Create comprehensive cost analysis visualization\"\"\"\r\n    fig, axes = plt.subplots(2, 3, figsize=(18, 10))\r\n\r\n    # 1. Cost distribution histogram\r\n    sns.histplot(data=df, x='Cost', bins=30, ax=axes[0, 0])\r\n    axes[0, 0].set_title('Cost Distribution')\r\n    axes[0, 0].axvline(df['Cost'].mean(), color='r', linestyle='--', label='Mean')\r\n    axes[0, 0].axvline(df['Cost'].median(), color='g', linestyle='--', label='Median')\r\n    axes[0, 0].legend()\r\n\r\n    # 2. Cost by category (box plot)\r\n    sns.boxplot(data=df, x='Category', y='Cost', ax=axes[0, 1])\r\n    axes[0, 1].set_xticklabels(axes[0, 1].get_xticklabels(), rotation=45)\r\n    axes[0, 1].set_title('Cost Range by Category')\r\n\r\n    # 3. Cumulative cost\r\n    sorted_costs = df.sort_values('Cost', ascending=False)\r\n    sorted_costs['Cumulative_Cost'] = sorted_costs['Cost'].cumsum()\r\n    sorted_costs['Cumulative_Pct'] = sorted_costs['Cumulative_Cost'] \u002F sorted_costs['Cost'].sum() * 100\r\n    axes[0, 2].plot(range(len(sorted_costs)), sorted_costs['Cumulative_Pct'])\r\n    axes[0, 2].axhline(80, color='r', linestyle='--', alpha=0.5)\r\n    axes[0, 2].set_xlabel('Number of Elements')\r\n    axes[0, 2].set_ylabel('Cumulative Cost %')\r\n    axes[0, 2].set_title('Pareto Analysis (80\u002F20)')\r\n\r\n    # 4. Cost per unit volume\r\n    df['Cost_per_m3'] = df['Cost'] \u002F df['Volume_m3'].replace(0, np.nan)\r\n    by_cat = df.groupby('Category')['Cost_per_m3'].mean().sort_values(ascending=True)\r\n    axes[1, 0].barh(by_cat.index, by_cat.values)\r\n    axes[1, 0].set_title('Average Cost per m³ by Category')\r\n\r\n    # 5. Top 10 elements by cost\r\n    top10 = df.nlargest(10, 'Cost')\r\n    axes[1, 1].barh(top10['ElementId'], top10['Cost'])\r\n    axes[1, 1].set_title('Top 10 Elements by Cost')\r\n\r\n    # 6. Cost vs Volume scatter with regression\r\n    sns.regplot(data=df, x='Volume_m3', y='Cost', ax=axes[1, 2],\r\n                scatter_kws={'alpha': 0.5})\r\n    axes[1, 2].set_title('Cost vs Volume (with Trend)')\r\n\r\n    plt.tight_layout()\r\n    return fig\r\n```\r\n\r\n## Export and Reporting\r\n\r\n### Save Visualizations\r\n\r\n```python\r\ndef save_all_visualizations(df, output_dir='reports\u002Fcharts'):\r\n    \"\"\"Generate and save all standard visualizations\"\"\"\r\n    import os\r\n    os.makedirs(output_dir, exist_ok=True)\r\n\r\n    # Generate charts\r\n    charts = {\r\n        'cost_breakdown': create_cost_breakdown_pie(df),\r\n        'volume_bars': create_volume_bar_chart(df),\r\n        'distribution': create_distribution_analysis(df),\r\n        'level_heatmap': create_level_heatmap(df)\r\n    }\r\n\r\n    # Save each chart\r\n    saved_files = []\r\n    for name, fig in charts.items():\r\n        filepath = f\"{output_dir}\u002F{name}.png\"\r\n        fig.savefig(filepath, dpi=150, bbox_inches='tight')\r\n        plt.close(fig)\r\n        saved_files.append(filepath)\r\n\r\n    return saved_files\r\n\r\ndef create_pdf_report(df, output_path='project_report.pdf'):\r\n    \"\"\"Create PDF report with multiple visualizations\"\"\"\r\n    from matplotlib.backends.backend_pdf import PdfPages\r\n\r\n    with PdfPages(output_path) as pdf:\r\n        # Page 1: Overview\r\n        fig1 = create_cost_breakdown_pie(df)\r\n        pdf.savefig(fig1)\r\n        plt.close(fig1)\r\n\r\n        # Page 2: Volume analysis\r\n        fig2 = create_volume_bar_chart(df)\r\n        pdf.savefig(fig2)\r\n        plt.close(fig2)\r\n\r\n        # Page 3: Distribution\r\n        fig3 = create_distribution_analysis(df)\r\n        pdf.savefig(fig3)\r\n        plt.close(fig3)\r\n\r\n        # Page 4: Heatmap\r\n        fig4 = create_level_heatmap(df)\r\n        pdf.savefig(fig4)\r\n        plt.close(fig4)\r\n\r\n    return output_path\r\n```\r\n\r\n## Quick Reference\r\n\r\n| Chart Type | Best For | Library |\r\n|------------|----------|---------|\r\n| Bar Chart | Category comparisons | Matplotlib\u002FSeaborn |\r\n| Pie Chart | Cost breakdown | Matplotlib |\r\n| Heatmap | Level × Category matrix | Seaborn |\r\n| Box Plot | Distribution by group | Seaborn |\r\n| Scatter | Relationship analysis | Matplotlib\u002FPlotly |\r\n| Treemap | Hierarchical data | Plotly |\r\n| Sunburst | Multi-level breakdown | Plotly |\r\n| Gantt | Schedule visualization | Matplotlib |\r\n| S-Curve | Progress tracking | Matplotlib |\r\n\r\n## Color Palettes for Construction\r\n\r\n```python\r\n# Professional color palettes\r\nCONSTRUCTION_COLORS = {\r\n    'primary': ['#2C3E50', '#3498DB', '#1ABC9C', '#F39C12', '#E74C3C'],\r\n    'materials': {\r\n        'Concrete': '#95A5A6',\r\n        'Steel': '#34495E',\r\n        'Timber': '#D35400',\r\n        'Brick': '#C0392B',\r\n        'Glass': '#3498DB'\r\n    },\r\n    'categories': {\r\n        'Structural': '#2C3E50',\r\n        'Architectural': '#3498DB',\r\n        'MEP': '#27AE60',\r\n        'Finishes': '#F39C12'\r\n    }\r\n}\r\n```\r\n\r\n## Resources\r\n\r\n- **Book**: \"Data-Driven Construction\" by Artem Boiko, Chapter 4.1\r\n- **Website**: https:\u002F\u002Fdatadrivenconstruction.io\r\n- **Matplotlib**: https:\u002F\u002Fmatplotlib.org\r\n- **Seaborn**: https:\u002F\u002Fseaborn.pydata.org\r\n- **Plotly**: https:\u002F\u002Fplotly.com\u002Fpython\r\n\r\n## Next Steps\r\n\r\n- See `pandas-construction-analysis` for data preparation\r\n- See `cost-prediction` for predictive analytics\r\n- See `qto-report` for quantity extraction\r\n","# Data Visualization for Construction\r\n\r\n## Overview\r\n\r\nBased on DDC methodology (Chapter 4.1), this skill provides comprehensive data visualization techniques for construction analytics. Visual insights drive better decisions - from cost breakdowns to schedule analysis.\r\n\r\n**Book Reference:** \"Аналитика данных и принятие решений\" \u002F \"Data Analytics and Decision Making\"\r\n\r\n> \"Визуализация данных превращает сложные наборы данных в понятные графики, которые могут использоваться для принятия решений на всех уровнях проекта.\"\r\n> — DDC Book, Chapter 4.1\r\n\r\n## Quick Start\r\n\r\n```python\r\nimport pandas as pd\r\nimport matplotlib.pyplot as plt\r\nimport seaborn as sns\r\n\r\n# Load construction data\r\ndf = pd.read_excel(\"project_data.xlsx\")\r\n\r\n# Quick bar chart - volumes by category\r\nfig, ax = plt.subplots(figsize=(10, 6))\r\ndf.groupby('Category')['Volume_m3'].sum().plot(kind='bar', ax=ax)\r\nax.set_title('Volume by Category')\r\nax.set_ylabel('Volume (m³)')\r\nplt.tight_layout()\r\nplt.savefig('volume_by_category.png', dpi=150)\r\nplt.show()\r\n```\r\n\r\n## Matplotlib Fundamentals\r\n\r\n### Basic Charts for Construction\r\n\r\n```python\r\nimport matplotlib.pyplot as plt\r\nimport pandas as pd\r\nimport numpy as np\r\n\r\ndef create_cost_breakdown_pie(df, cost_col='Cost', category_col='Category'):\r\n    \"\"\"Create pie chart for cost breakdown\"\"\"\r\n    costs = df.groupby(category_col)[cost_col].sum()\r\n\r\n    fig, ax = plt.subplots(figsize=(10, 8))\r\n\r\n    # Create pie with percentage labels\r\n    wedges, texts, autotexts = ax.pie(\r\n        costs.values,\r\n        labels=costs.index,\r\n        autopct='%1.1f%%',\r\n        startangle=90,\r\n        colors=plt.cm.Set3.colors\r\n    )\r\n\r\n    ax.set_title('Cost Breakdown by Category', fontsize=14, fontweight='bold')\r\n\r\n    # Add total in center\r\n    ax.text(0, 0, f'Total:\\n${costs.sum():,.0f}',\r\n            ha='center', va='center', fontsize=12)\r\n\r\n    plt.tight_layout()\r\n    return fig\r\n\r\ndef create_volume_bar_chart(df, volume_col='Volume_m3', category_col='Category'):\r\n    \"\"\"Create horizontal bar chart for volumes\"\"\"\r\n    volumes = df.groupby(category_col)[volume_col].sum().sort_values()\r\n\r\n    fig, ax = plt.subplots(figsize=(10, 6))\r\n\r\n    bars = ax.barh(volumes.index, volumes.values, color='steelblue')\r\n\r\n    # Add value labels\r\n    for bar, value in zip(bars, volumes.values):\r\n        ax.text(value + volumes.max() * 0.01, bar.get_y() + bar.get_height()\u002F2,\r\n                f'{value:,.0f} m³', va='center', fontsize=10)\r\n\r\n    ax.set_xlabel('Volume (m³)')\r\n    ax.set_title('Material Volumes by Category', fontsize=14, fontweight='bold')\r\n    ax.set_xlim(0, volumes.max() * 1.15)\r\n\r\n    plt.tight_layout()\r\n    return fig\r\n\r\ndef create_level_comparison(df, value_col='Volume_m3', level_col='Level'):\r\n    \"\"\"Create grouped bar chart comparing levels\"\"\"\r\n    pivot = df.pivot_table(\r\n        values=value_col,\r\n        index=level_col,\r\n        columns='Category',\r\n        aggfunc='sum',\r\n        fill_value=0\r\n    )\r\n\r\n    fig, ax = plt.subplots(figsize=(12, 6))\r\n    pivot.plot(kind='bar', ax=ax, width=0.8)\r\n\r\n    ax.set_xlabel('Building Level')\r\n    ax.set_ylabel('Volume (m³)')\r\n    ax.set_title('Volume Distribution by Level and Category', fontsize=14, fontweight='bold')\r\n    ax.legend(title='Category', bbox_to_anchor=(1.02, 1), loc='upper left')\r\n\r\n    plt.xticks(rotation=45)\r\n    plt.tight_layout()\r\n    return fig\r\n```\r\n\r\n### Time Series Visualization\r\n\r\n```python\r\ndef create_progress_chart(df, date_col='Date', value_col='Cumulative_Progress'):\r\n    \"\"\"Create S-curve progress chart\"\"\"\r\n    df = df.sort_values(date_col)\r\n\r\n    fig, ax = plt.subplots(figsize=(12, 6))\r\n\r\n    # Actual progress\r\n    ax.plot(df[date_col], df[value_col],\r\n            'b-', linewidth=2, label='Actual Progress')\r\n\r\n    # Planned progress (if available)\r\n    if 'Planned_Progress' in df.columns:\r\n        ax.plot(df[date_col], df['Planned_Progress'],\r\n                'g--', linewidth=2, label='Planned Progress')\r\n\r\n    ax.fill_between(df[date_col], 0, df[value_col], alpha=0.3)\r\n\r\n    ax.set_xlabel('Date')\r\n    ax.set_ylabel('Progress (%)')\r\n    ax.set_title('Project S-Curve', fontsize=14, fontweight='bold')\r\n    ax.legend()\r\n    ax.grid(True, alpha=0.3)\r\n\r\n    # Format dates\r\n    fig.autofmt_xdate()\r\n\r\n    plt.tight_layout()\r\n    return fig\r\n\r\ndef create_gantt_chart(df, start_col='Start', end_col='End', task_col='Task'):\r\n    \"\"\"Create simple Gantt chart\"\"\"\r\n    df = df.sort_values(start_col)\r\n\r\n    fig, ax = plt.subplots(figsize=(14, len(df) * 0.5 + 2))\r\n\r\n    # Plot each task as horizontal bar\r\n    for i, (_, row) in enumerate(df.iterrows()):\r\n        start = pd.to_datetime(row[start_col])\r\n        end = pd.to_datetime(row[end_col])\r\n        duration = (end - start).days\r\n\r\n        ax.barh(i, duration, left=start, height=0.6,\r\n                align='center', color='steelblue', alpha=0.8)\r\n\r\n    ax.set_yticks(range(len(df)))\r\n    ax.set_yticklabels(df[task_col])\r\n    ax.set_xlabel('Date')\r\n    ax.set_title('Project Schedule - Gantt Chart', fontsize=14, fontweight='bold')\r\n    ax.grid(axis='x', alpha=0.3)\r\n\r\n    fig.autofmt_xdate()\r\n    plt.tight_layout()\r\n    return fig\r\n```\r\n\r\n## Seaborn for Statistical Visualization\r\n\r\n### Distribution Analysis\r\n\r\n```python\r\nimport seaborn as sns\r\n\r\ndef create_distribution_analysis(df, value_col='Volume_m3', category_col='Category'):\r\n    \"\"\"Create distribution plots for construction data\"\"\"\r\n    fig, axes = plt.subplots(2, 2, figsize=(14, 10))\r\n\r\n    # 1. Histogram with KDE\r\n    sns.histplot(data=df, x=value_col, kde=True, ax=axes[0, 0])\r\n    axes[0, 0].set_title('Volume Distribution')\r\n\r\n    # 2. Box plot by category\r\n    sns.boxplot(data=df, x=category_col, y=value_col, ax=axes[0, 1])\r\n    axes[0, 1].set_xticklabels(axes[0, 1].get_xticklabels(), rotation=45)\r\n    axes[0, 1].set_title('Volume by Category')\r\n\r\n    # 3. Violin plot\r\n    sns.violinplot(data=df, x=category_col, y=value_col, ax=axes[1, 0])\r\n    axes[1, 0].set_xticklabels(axes[1, 0].get_xticklabels(), rotation=45)\r\n    axes[1, 0].set_title('Volume Distribution by Category')\r\n\r\n    # 4. Strip plot with jitter\r\n    sns.stripplot(data=df, x=category_col, y=value_col,\r\n                  ax=axes[1, 1], alpha=0.5, jitter=True)\r\n    axes[1, 1].set_xticklabels(axes[1, 1].get_xticklabels(), rotation=45)\r\n    axes[1, 1].set_title('Individual Elements')\r\n\r\n    plt.tight_layout()\r\n    return fig\r\n\r\ndef create_correlation_heatmap(df, numeric_cols=None):\r\n    \"\"\"Create correlation heatmap for numeric columns\"\"\"\r\n    if numeric_cols is None:\r\n        numeric_cols = df.select_dtypes(include=[np.number]).columns.tolist()\r\n\r\n    corr_matrix = df[numeric_cols].corr()\r\n\r\n    fig, ax = plt.subplots(figsize=(10, 8))\r\n\r\n    sns.heatmap(corr_matrix,\r\n                annot=True,\r\n                cmap='RdYlBu_r',\r\n                center=0,\r\n                fmt='.2f',\r\n                square=True,\r\n                ax=ax)\r\n\r\n    ax.set_title('Correlation Matrix', fontsize=14, fontweight='bold')\r\n\r\n    plt.tight_layout()\r\n    return fig\r\n```\r\n\r\n### Category Analysis\r\n\r\n```python\r\ndef create_category_summary(df, category_col='Category',\r\n                            value_col='Volume_m3', cost_col='Cost'):\r\n    \"\"\"Create comprehensive category summary visualization\"\"\"\r\n    fig, axes = plt.subplots(2, 2, figsize=(14, 10))\r\n\r\n    # 1. Count by category\r\n    category_counts = df[category_col].value_counts()\r\n    sns.barplot(x=category_counts.index, y=category_counts.values, ax=axes[0, 0])\r\n    axes[0, 0].set_title('Element Count by Category')\r\n    axes[0, 0].set_xticklabels(axes[0, 0].get_xticklabels(), rotation=45)\r\n\r\n    # 2. Total volume by category\r\n    volumes = df.groupby(category_col)[value_col].sum().sort_values(ascending=False)\r\n    sns.barplot(x=volumes.index, y=volumes.values, ax=axes[0, 1])\r\n    axes[0, 1].set_title('Total Volume by Category')\r\n    axes[0, 1].set_xticklabels(axes[0, 1].get_xticklabels(), rotation=45)\r\n\r\n    # 3. Average cost by category\r\n    if cost_col in df.columns:\r\n        avg_cost = df.groupby(category_col)[cost_col].mean().sort_values(ascending=False)\r\n        sns.barplot(x=avg_cost.index, y=avg_cost.values, ax=axes[1, 0])\r\n        axes[1, 0].set_title('Average Cost by Category')\r\n        axes[1, 0].set_xticklabels(axes[1, 0].get_xticklabels(), rotation=45)\r\n\r\n    # 4. Volume vs Cost scatter\r\n    if cost_col in df.columns:\r\n        sns.scatterplot(data=df, x=value_col, y=cost_col,\r\n                        hue=category_col, alpha=0.7, ax=axes[1, 1])\r\n        axes[1, 1].set_title('Volume vs Cost')\r\n        axes[1, 1].legend(bbox_to_anchor=(1.02, 1), loc='upper left')\r\n\r\n    plt.tight_layout()\r\n    return fig\r\n```\r\n\r\n## Plotly for Interactive Dashboards\r\n\r\n### Interactive Charts\r\n\r\n```python\r\nimport plotly.express as px\r\nimport plotly.graph_objects as go\r\nfrom plotly.subplots import make_subplots\r\n\r\ndef create_interactive_cost_breakdown(df, category_col='Category', cost_col='Cost'):\r\n    \"\"\"Create interactive sunburst chart\"\"\"\r\n    # Aggregate by category and material\r\n    agg_df = df.groupby([category_col, 'Material'])[cost_col].sum().reset_index()\r\n\r\n    fig = px.sunburst(\r\n        agg_df,\r\n        path=[category_col, 'Material'],\r\n        values=cost_col,\r\n        title='Cost Breakdown by Category and Material'\r\n    )\r\n\r\n    fig.update_layout(height=600)\r\n    return fig\r\n\r\ndef create_interactive_3d_scatter(df, x_col='Volume_m3', y_col='Cost',\r\n                                   z_col='Weight_kg', color_col='Category'):\r\n    \"\"\"Create 3D scatter plot for multi-dimensional analysis\"\"\"\r\n    fig = px.scatter_3d(\r\n        df,\r\n        x=x_col,\r\n        y=y_col,\r\n        z=z_col,\r\n        color=color_col,\r\n        hover_data=['ElementId'],\r\n        title='3D Analysis: Volume vs Cost vs Weight'\r\n    )\r\n\r\n    fig.update_layout(height=700)\r\n    return fig\r\n\r\ndef create_interactive_timeline(df, date_col='Date', value_col='Progress',\r\n                                 category_col='Phase'):\r\n    \"\"\"Create interactive timeline with range slider\"\"\"\r\n    fig = px.line(\r\n        df,\r\n        x=date_col,\r\n        y=value_col,\r\n        color=category_col,\r\n        title='Project Progress Timeline'\r\n    )\r\n\r\n    fig.update_layout(\r\n        xaxis=dict(\r\n            rangeselector=dict(\r\n                buttons=list([\r\n                    dict(count=1, label=\"1m\", step=\"month\", stepmode=\"backward\"),\r\n                    dict(count=3, label=\"3m\", step=\"month\", stepmode=\"backward\"),\r\n                    dict(count=6, label=\"6m\", step=\"month\", stepmode=\"backward\"),\r\n                    dict(step=\"all\", label=\"All\")\r\n                ])\r\n            ),\r\n            rangeslider=dict(visible=True),\r\n            type=\"date\"\r\n        ),\r\n        height=500\r\n    )\r\n\r\n    return fig\r\n```\r\n\r\n### Dashboard Layout\r\n\r\n```python\r\ndef create_project_dashboard(df):\r\n    \"\"\"Create comprehensive project dashboard\"\"\"\r\n    fig = make_subplots(\r\n        rows=2, cols=2,\r\n        subplot_titles=(\r\n            'Cost by Category',\r\n            'Volume Distribution',\r\n            'Elements by Level',\r\n            'Progress Over Time'\r\n        ),\r\n        specs=[\r\n            [{\"type\": \"pie\"}, {\"type\": \"bar\"}],\r\n            [{\"type\": \"bar\"}, {\"type\": \"scatter\"}]\r\n        ]\r\n    )\r\n\r\n    # 1. Cost pie chart\r\n    costs = df.groupby('Category')['Cost'].sum()\r\n    fig.add_trace(\r\n        go.Pie(labels=costs.index, values=costs.values, name='Cost'),\r\n        row=1, col=1\r\n    )\r\n\r\n    # 2. Volume bar chart\r\n    volumes = df.groupby('Category')['Volume_m3'].sum().sort_values(ascending=True)\r\n    fig.add_trace(\r\n        go.Bar(x=volumes.values, y=volumes.index, orientation='h', name='Volume'),\r\n        row=1, col=2\r\n    )\r\n\r\n    # 3. Elements by level\r\n    level_counts = df.groupby('Level').size()\r\n    fig.add_trace(\r\n        go.Bar(x=level_counts.index, y=level_counts.values, name='Count'),\r\n        row=2, col=1\r\n    )\r\n\r\n    # 4. Progress scatter (if available)\r\n    if 'Date' in df.columns and 'Progress' in df.columns:\r\n        fig.add_trace(\r\n            go.Scatter(x=df['Date'], y=df['Progress'], mode='lines+markers', name='Progress'),\r\n            row=2, col=2\r\n        )\r\n\r\n    fig.update_layout(\r\n        height=800,\r\n        title_text='Project Analytics Dashboard',\r\n        showlegend=False\r\n    )\r\n\r\n    return fig\r\n```\r\n\r\n## Construction-Specific Visualizations\r\n\r\n### Heatmaps for Level Analysis\r\n\r\n```python\r\ndef create_level_heatmap(df, level_col='Level', category_col='Category',\r\n                          value_col='Volume_m3'):\r\n    \"\"\"Create heatmap for level-by-category analysis\"\"\"\r\n    pivot = df.pivot_table(\r\n        values=value_col,\r\n        index=level_col,\r\n        columns=category_col,\r\n        aggfunc='sum',\r\n        fill_value=0\r\n    )\r\n\r\n    fig, ax = plt.subplots(figsize=(12, 8))\r\n\r\n    sns.heatmap(\r\n        pivot,\r\n        annot=True,\r\n        fmt=',.0f',\r\n        cmap='YlOrRd',\r\n        ax=ax,\r\n        cbar_kws={'label': 'Volume (m³)'}\r\n    )\r\n\r\n    ax.set_title('Volume Distribution: Level × Category', fontsize=14, fontweight='bold')\r\n\r\n    plt.tight_layout()\r\n    return fig\r\n\r\ndef create_material_treemap(df, category_col='Category', material_col='Material',\r\n                             value_col='Volume_m3'):\r\n    \"\"\"Create treemap for hierarchical material analysis\"\"\"\r\n    agg_df = df.groupby([category_col, material_col])[value_col].sum().reset_index()\r\n\r\n    fig = px.treemap(\r\n        agg_df,\r\n        path=[category_col, material_col],\r\n        values=value_col,\r\n        title='Material Distribution Treemap',\r\n        color=value_col,\r\n        color_continuous_scale='Blues'\r\n    )\r\n\r\n    fig.update_layout(height=600)\r\n    return fig\r\n```\r\n\r\n### Cost Analysis Charts\r\n\r\n```python\r\ndef create_cost_analysis_dashboard(df):\r\n    \"\"\"Create comprehensive cost analysis visualization\"\"\"\r\n    fig, axes = plt.subplots(2, 3, figsize=(18, 10))\r\n\r\n    # 1. Cost distribution histogram\r\n    sns.histplot(data=df, x='Cost', bins=30, ax=axes[0, 0])\r\n    axes[0, 0].set_title('Cost Distribution')\r\n    axes[0, 0].axvline(df['Cost'].mean(), color='r', linestyle='--', label='Mean')\r\n    axes[0, 0].axvline(df['Cost'].median(), color='g', linestyle='--', label='Median')\r\n    axes[0, 0].legend()\r\n\r\n    # 2. Cost by category (box plot)\r\n    sns.boxplot(data=df, x='Category', y='Cost', ax=axes[0, 1])\r\n    axes[0, 1].set_xticklabels(axes[0, 1].get_xticklabels(), rotation=45)\r\n    axes[0, 1].set_title('Cost Range by Category')\r\n\r\n    # 3. Cumulative cost\r\n    sorted_costs = df.sort_values('Cost', ascending=False)\r\n    sorted_costs['Cumulative_Cost'] = sorted_costs['Cost'].cumsum()\r\n    sorted_costs['Cumulative_Pct'] = sorted_costs['Cumulative_Cost'] \u002F sorted_costs['Cost'].sum() * 100\r\n    axes[0, 2].plot(range(len(sorted_costs)), sorted_costs['Cumulative_Pct'])\r\n    axes[0, 2].axhline(80, color='r', linestyle='--', alpha=0.5)\r\n    axes[0, 2].set_xlabel('Number of Elements')\r\n    axes[0, 2].set_ylabel('Cumulative Cost %')\r\n    axes[0, 2].set_title('Pareto Analysis (80\u002F20)')\r\n\r\n    # 4. Cost per unit volume\r\n    df['Cost_per_m3'] = df['Cost'] \u002F df['Volume_m3'].replace(0, np.nan)\r\n    by_cat = df.groupby('Category')['Cost_per_m3'].mean().sort_values(ascending=True)\r\n    axes[1, 0].barh(by_cat.index, by_cat.values)\r\n    axes[1, 0].set_title('Average Cost per m³ by Category')\r\n\r\n    # 5. Top 10 elements by cost\r\n    top10 = df.nlargest(10, 'Cost')\r\n    axes[1, 1].barh(top10['ElementId'], top10['Cost'])\r\n    axes[1, 1].set_title('Top 10 Elements by Cost')\r\n\r\n    # 6. Cost vs Volume scatter with regression\r\n    sns.regplot(data=df, x='Volume_m3', y='Cost', ax=axes[1, 2],\r\n                scatter_kws={'alpha': 0.5})\r\n    axes[1, 2].set_title('Cost vs Volume (with Trend)')\r\n\r\n    plt.tight_layout()\r\n    return fig\r\n```\r\n\r\n## Export and Reporting\r\n\r\n### Save Visualizations\r\n\r\n```python\r\ndef save_all_visualizations(df, output_dir='reports\u002Fcharts'):\r\n    \"\"\"Generate and save all standard visualizations\"\"\"\r\n    import os\r\n    os.makedirs(output_dir, exist_ok=True)\r\n\r\n    # Generate charts\r\n    charts = {\r\n        'cost_breakdown': create_cost_breakdown_pie(df),\r\n        'volume_bars': create_volume_bar_chart(df),\r\n        'distribution': create_distribution_analysis(df),\r\n        'level_heatmap': create_level_heatmap(df)\r\n    }\r\n\r\n    # Save each chart\r\n    saved_files = []\r\n    for name, fig in charts.items():\r\n        filepath = f\"{output_dir}\u002F{name}.png\"\r\n        fig.savefig(filepath, dpi=150, bbox_inches='tight')\r\n        plt.close(fig)\r\n        saved_files.append(filepath)\r\n\r\n    return saved_files\r\n\r\ndef create_pdf_report(df, output_path='project_report.pdf'):\r\n    \"\"\"Create PDF report with multiple visualizations\"\"\"\r\n    from matplotlib.backends.backend_pdf import PdfPages\r\n\r\n    with PdfPages(output_path) as pdf:\r\n        # Page 1: Overview\r\n        fig1 = create_cost_breakdown_pie(df)\r\n        pdf.savefig(fig1)\r\n        plt.close(fig1)\r\n\r\n        # Page 2: Volume analysis\r\n        fig2 = create_volume_bar_chart(df)\r\n        pdf.savefig(fig2)\r\n        plt.close(fig2)\r\n\r\n        # Page 3: Distribution\r\n        fig3 = create_distribution_analysis(df)\r\n        pdf.savefig(fig3)\r\n        plt.close(fig3)\r\n\r\n        # Page 4: Heatmap\r\n        fig4 = create_level_heatmap(df)\r\n        pdf.savefig(fig4)\r\n        plt.close(fig4)\r\n\r\n    return output_path\r\n```\r\n\r\n## Quick Reference\r\n\r\n| Chart Type | Best For | Library |\r\n|------------|----------|---------|\r\n| Bar Chart | Category comparisons | Matplotlib\u002FSeaborn |\r\n| Pie Chart | Cost breakdown | Matplotlib |\r\n| Heatmap | Level × Category matrix | Seaborn |\r\n| Box Plot | Distribution by group | Seaborn |\r\n| Scatter | Relationship analysis | Matplotlib\u002FPlotly |\r\n| Treemap | Hierarchical data | Plotly |\r\n| Sunburst | Multi-level breakdown | Plotly |\r\n| Gantt | Schedule visualization | Matplotlib |\r\n| S-Curve | Progress tracking | Matplotlib |\r\n\r\n## Color Palettes for Construction\r\n\r\n```python\r\n# Professional color palettes\r\nCONSTRUCTION_COLORS = {\r\n    'primary': ['#2C3E50', '#3498DB', '#1ABC9C', '#F39C12', '#E74C3C'],\r\n    'materials': {\r\n        'Concrete': '#95A5A6',\r\n        'Steel': '#34495E',\r\n        'Timber': '#D35400',\r\n        'Brick': '#C0392B',\r\n        'Glass': '#3498DB'\r\n    },\r\n    'categories': {\r\n        'Structural': '#2C3E50',\r\n        'Architectural': '#3498DB',\r\n        'MEP': '#27AE60',\r\n        'Finishes': '#F39C12'\r\n    }\r\n}\r\n```\r\n\r\n## Resources\r\n\r\n- **Book**: \"Data-Driven Construction\" by Artem Boiko, Chapter 4.1\r\n- **Website**: https:\u002F\u002Fdatadrivenconstruction.io\r\n- **Matplotlib**: https:\u002F\u002Fmatplotlib.org\r\n- **Seaborn**: https:\u002F\u002Fseaborn.pydata.org\r\n- **Plotly**: https:\u002F\u002Fplotly.com\u002Fpython\r\n\r\n## Next Steps\r\n\r\n- See `pandas-construction-analysis` for data preparation\r\n- See `cost-prediction` for predictive analytics\r\n- See `qto-report` for quantity extraction\r\n",{"slug":5,"description":7,"display_name":39},"Data Visualization","main","e7e336ac628c3e3bd771aff1aaa469c93778f94a","skills\u002Fdatadrivenconstruction\u002Fdata-visualization",0,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del","2026-08-23 22:39:37",{"source":8,"skillName":5,"commands":48,"prompt":58,"zipAvailable":59},[49,52,55],{"tool":50,"command":51},"npx","npx skills add kbarbel640-del\u002Fskills --skill data-visualization",{"tool":53,"command":54},"bunx","bunx skills add kbarbel640-del\u002Fskills --skill data-visualization",{"tool":56,"command":57},"pnpm","pnpm dlx skills add kbarbel640-del\u002Fskills --skill data-visualization","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fdatadrivenconstruction\u002Fdata-visualization\u002FSKILL.md",true,[61],{"path":62,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":65,"sourceHtmlUrl":66},"_meta.json","REFERENCE","参考文档",304,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fdatadrivenconstruction\u002Fdata-visualization\u002F_meta.json",[68,94,117,135,140,160],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":34},"01M6G8J55967D6281ACMKAKTEQ","crowd-prompting","A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzzadrian\u002Fcrowd-prompting\u002FSKILL.md",[],[75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93],"crowd prompting","prompting","api","with","tokens","domain","world","prompts","operations","instructions","text","tool","system","improve","productivity","marketplace","https","content","ai agents",{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":34},"01M6G8J0PKPAYVET6BWE8W4C26","dilemm-ai","Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzyori\u002Fdilemm-ai\u002FSKILL.md",[],[101,77,102,103,104,105,33,106,107,108,109,110,111,112,113,114,115,82,116],"dilemm ai","arena","analyze","browser","openclaw agent","automation","browser automation","bot","openclaw","design","strategy","headless","compete","submit","matchmaking","use",{"skillNo":118,"name":119,"nameZh":6,"description":120,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":34},"01M6G8HWAF3K9SW7NP3Z83CPJ6","arxiv-paper-reviews","Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date\u002Fcategory\u002Finterest, viewing paper details with comments, or submitting paper reviews via API at http:\u002F\u002F150.158.152.82:8000.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzxrys\u002Fweak-accept\u002FSKILL.md",[],[124,125,126,127,128,129,130,78,131,114,116,132,77,133,134],"arxiv paper reviews","reviews","arxiv","paper","crawler","papers","comments","fetch","read","http","via",{"skillNo":136,"name":119,"nameZh":6,"description":120,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":137,"categories":138,"keywords":139,"publishedAt":34},"01M6G8HQJ7N7WMY6YV7D7SSJ16","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzxrys\u002Farxiv-paper-reviews\u002FSKILL.md",[],[127,126,125,124,134,129,130,78,128,114,116,131,132,77,133],{"skillNo":141,"name":142,"nameZh":6,"description":143,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":144,"categories":145,"keywords":146,"publishedAt":34},"01M6G8HM95Y64JNVFC2HN4E2BG","git-summary","Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzweack\u002Fgit-summary\u002FSKILL.md",[],[147,148,149,150,151,152,153,154,155,156,157,158,159],"git","summary","git summary","commits","repository","win32","status","linux","contributors","true","quick","get","branches",{"skillNo":161,"name":162,"nameZh":6,"description":163,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":164,"categories":165,"keywords":166,"publishedAt":34},"01M6G8HGEGF05CNEJCGVYFSC4R","agent-constitution","Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fztsalexey\u002Fagent-constitution\u002FSKILL.md",[],[167,168,169,170,78,171,172,40,173,132,174,175,176,177,178,91,179,180,181],"agent constitution","constitution","contracts","tree","query","base","log","check","Rules","projects","compliance","actions","state","governance","github"]