| name | labor-rate |
| description | Calculate construction labor rates with overhead, benefits, and productivity factors. Regional rate databases and crew composition. |
| homepage | https://datadrivenconstruction.io |
| metadata | {"openclaw":{"emoji":"🧮","os":["darwin","linux","win32"],"homepage":"https://datadrivenconstruction.io","requires":{"bins":"[Truncated]"}}} |
Labor Rate Calculator
Overview
Labor costs account for 30-50% of construction costs. This skill calculates all-in labor rates including wages, benefits, overhead, and regional adjustments.
Python Implementation
import pandas as pd
from typing import Dict, Any, List, Optional
from dataclasses import dataclass, field
from enum import Enum
class LaborCategory(Enum):
"""Labor skill categories."""
LABORER = "laborer"
CARPENTER =
ELECTRICIAN =
PLUMBER =
IRONWORKER =
MASON =
OPERATOR =
FOREMAN =
SUPERINTENDENT =
():
NEW_CONSTRUCTION =
RENOVATION =
DEMOLITION =
MAINTENANCE =
:
category:
base_wage:
benefits:
taxes:
insurance:
overhead:
profit:
total_rate:
unit: =
:
name:
workers: [[, ]]
total_hourly_cost:
output_per_hour:
unit:
:
DEFAULT_BURDENS = {
: ,
: ,
: ,
: ,
:
}
BASE_WAGES = {
LaborCategory.LABORER: ,
LaborCategory.CARPENTER: ,
LaborCategory.ELECTRICIAN: ,
LaborCategory.PLUMBER: ,
LaborCategory.IRONWORKER: ,
LaborCategory.MASON: ,
LaborCategory.OPERATOR: ,
LaborCategory.FOREMAN: ,
LaborCategory.SUPERINTENDENT:
}
REGIONAL_FACTORS = {
: ,
: ,
: ,
: ,
: ,
: ,
: ,
:
}
():
.burdens = burden_rates .DEFAULT_BURDENS
() -> LaborRate:
base = custom_wage .BASE_WAGES.get(category, )
regional_factor = .REGIONAL_FACTORS.get(region, )
base *= regional_factor
benefits = base * .burdens[]
taxes = base * .burdens[]
insurance = base * .burdens[]
subtotal = base + benefits + taxes + insurance
overhead = subtotal * .burdens[]
profit = (subtotal + overhead) * .burdens[]
total = subtotal + overhead + profit
LaborRate(
category=category.value,
base_wage=(base, ),
benefits=(benefits, ),
taxes=(taxes, ),
insurance=(insurance, ),
overhead=(overhead, ),
profit=(profit, ),
total_rate=(total, )
)
() -> :
total =
category, count composition.items():
rate = .calculate_rate(category, region)
total += rate.total_rate * count
(total, )
() -> pd.DataFrame:
rates = []
category LaborCategory:
rate = .calculate_rate(category, region)
rates.append({
: rate.category,
: rate.base_wage,
: rate.benefits,
: rate.taxes,
: rate.insurance,
: rate.overhead,
: rate.profit,
: rate.total_rate
})
pd.DataFrame(rates)
:
WORK_TYPE_FACTORS = {
WorkType.NEW_CONSTRUCTION: ,
WorkType.RENOVATION: ,
WorkType.DEMOLITION: ,
WorkType.MAINTENANCE:
}
CONDITION_FACTORS = {
: ,
: ,
: ,
: ,
:
}
WEATHER_FACTORS = {
: ,
: ,
: ,
: ,
:
}
() -> :
base = .WORK_TYPE_FACTORS.get(work_type, )
cond = .CONDITION_FACTORS.get(condition, )
weath = .WEATHER_FACTORS.get(weather, )
overtime_factor =
overtime_hours > :
overtime_factor = - (overtime_hours * )
combined = base * cond * weath * overtime_factor
((combined, ), )
() -> :
factor = .calculate_factor(work_type, condition, weather)
(base_hours / factor, )
:
STANDARD_CREWS = {
: {
LaborCategory.FOREMAN: ,
LaborCategory.CARPENTER: ,
LaborCategory.LABORER: ,
LaborCategory.OPERATOR:
},
: {
LaborCategory.FOREMAN: ,
LaborCategory.CARPENTER: ,
LaborCategory.LABORER:
},
: {
LaborCategory.FOREMAN: ,
LaborCategory.ELECTRICIAN: ,
LaborCategory.LABORER:
},
: {
LaborCategory.FOREMAN: ,
LaborCategory.PLUMBER: ,
LaborCategory.LABORER:
},
: {
LaborCategory.FOREMAN: ,
LaborCategory.MASON: ,
LaborCategory.LABORER:
}
}
():
.calc = rate_calculator
() -> CrewComposition:
work_type .STANDARD_CREWS:
ValueError()
composition = .STANDARD_CREWS[work_type]
total_cost = .calc.calculate_crew_cost(composition, region)
workers = []
category, count composition.items():
rate = .calc.calculate_rate(category, region)
workers.append({
: category.value,
: count,
: rate.total_rate,
: rate.total_rate * count
})
CrewComposition(
name=work_type,
workers=workers,
total_hourly_cost=total_cost,
output_per_hour=,
unit=
)
() -> CrewComposition:
total_cost = .calc.calculate_crew_cost(workers, region)
worker_list = []
category, count workers.items():
rate = .calc.calculate_rate(category, region)
worker_list.append({
: category.value,
: count,
: rate.total_rate,
: rate.total_rate * count
})
CrewComposition(
name=,
workers=worker_list,
total_hourly_cost=total_cost,
output_per_hour=,
unit=
)