Market Intelligence: live Chicago building permits → staffing demand forecast
/intelligence/market pulls real permit data from Chicago Open Data API: - $9.6B in active construction permits - O'Hare expansion ($730M), new casino ($580M), transit station ($445M) - Maps permit types to staffing roles (electrical→Electrician, masonry→Loader) - Cross-references with our IL worker bench to show coverage gaps - Electrician gap: only 1,036 reliable vs 63K estimated demand Datalake page now shows three intelligence layers: 1. Contract simulation with scenario-driven matching 2. Market Intelligence with live permit data + bench analysis 3. System Learning with fill history and detected patterns The staffing company sees demand forming before the phone rings. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
+59
-1
@@ -56,6 +56,7 @@ body{font-family:-apple-system,system-ui,sans-serif;background:#0b0f19;color:#c9
|
||||
<div class="content">
|
||||
<div id="main"><div class="ld">Analyzing your contracts and workers...</div></div>
|
||||
|
||||
<div id="market"></div>
|
||||
<div id="learning"></div>
|
||||
|
||||
<details class="sa"><summary>Search workers...</summary><div class="inner">
|
||||
@@ -70,7 +71,7 @@ var P=location.pathname.indexOf('/lakehouse')>=0?'/lakehouse':'';
|
||||
var A=location.origin+P;
|
||||
var AC=['#1a2744','#1a3a2a','#2a1a3a','#3a2a1a','#1a3a3a','#2a2a1a'];
|
||||
var lastQuery='';
|
||||
window.addEventListener('load',function(){loadDay();loadLearning()});
|
||||
window.addEventListener('load',function(){loadDay();loadMarket();loadLearning()});
|
||||
|
||||
function api(path,body){
|
||||
return fetch(A+path,{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify(body)}).then(function(r){return r.json()})
|
||||
@@ -602,6 +603,63 @@ function doSearch(){
|
||||
}).catch(function(e){out.textContent='Error: '+e.message});
|
||||
}
|
||||
|
||||
// ─── Market Intelligence ───
|
||||
function loadMarket(){
|
||||
api('/intelligence/market',{}).then(function(d){
|
||||
if(d.error||!d.major_permits)return;
|
||||
var el=document.getElementById('market');el.textContent='';
|
||||
|
||||
var card=document.createElement('div');card.className='insight warning';
|
||||
var lb=document.createElement('div');lb.className='label';lb.textContent='MARKET INTELLIGENCE';
|
||||
var hl=document.createElement('div');hl.className='headline';hl.textContent='Chicago Construction Pipeline — Live Permit Data';
|
||||
var sub=document.createElement('div');sub.className='sub';
|
||||
sub.textContent='$'+(d.total_construction_value/1e9).toFixed(1)+'B in active permits → estimated '+d.total_estimated_workers.toLocaleString()+' workers needed. Source: City of Chicago Open Data';
|
||||
card.appendChild(lb);card.appendChild(hl);card.appendChild(sub);
|
||||
|
||||
// Major permits
|
||||
if(d.major_permits&&d.major_permits.length){
|
||||
var ph=document.createElement('div');ph.style.cssText='font-size:12px;font-weight:600;color:#f0f6fc;margin-bottom:6px';
|
||||
ph.textContent='Largest Active Projects';card.appendChild(ph);
|
||||
d.major_permits.slice(0,5).forEach(function(p){
|
||||
var row=document.createElement('div');row.style.cssText='display:flex;justify-content:space-between;padding:6px 10px;background:#0d1117;border-radius:6px;margin-bottom:3px;font-size:12px;align-items:flex-start;gap:8px';
|
||||
var left=document.createElement('div');left.style.cssText='flex:1;min-width:0';
|
||||
var desc=document.createElement('div');desc.style.cssText='color:#f0f6fc;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis';
|
||||
desc.textContent=p.description||p.type||'Construction';
|
||||
var addr=document.createElement('div');addr.style.cssText='color:#484f58;font-size:10px;margin-top:1px';
|
||||
addr.textContent=p.address+' · '+p.date;
|
||||
left.appendChild(desc);left.appendChild(addr);
|
||||
var cost=document.createElement('div');cost.style.cssText='color:#d29922;font-weight:700;font-size:13px;flex-shrink:0';
|
||||
cost.textContent=p.cost>=1e9?'$'+(p.cost/1e9).toFixed(1)+'B':p.cost>=1e6?'$'+(p.cost/1e6).toFixed(0)+'M':'$'+(p.cost/1e3).toFixed(0)+'K';
|
||||
row.appendChild(left);row.appendChild(cost);card.appendChild(row);
|
||||
});
|
||||
}
|
||||
|
||||
// Supply gaps — where demand exceeds our bench
|
||||
if(d.gaps&&d.gaps.length){
|
||||
var gh=document.createElement('div');gh.style.cssText='font-size:12px;font-weight:600;color:#f0f6fc;margin:10px 0 6px';
|
||||
gh.textContent='Your Bench vs. Market Demand (Illinois)';card.appendChild(gh);
|
||||
var seen={};
|
||||
d.gaps.forEach(function(g){
|
||||
if(seen[g.role])return;seen[g.role]=true;
|
||||
var row=document.createElement('div');row.style.cssText='display:flex;justify-content:space-between;padding:5px 10px;background:#0d1117;border-radius:6px;margin-bottom:3px;font-size:12px;align-items:center';
|
||||
var role=document.createElement('span');role.style.cssText='color:#f0f6fc;font-weight:500';role.textContent=g.role;
|
||||
var nums=document.createElement('span');nums.style.cssText='font-size:11px';
|
||||
var color=g.available>g.demand?'#3fb950':'#d29922';
|
||||
nums.style.color=color;
|
||||
nums.textContent=g.available.toLocaleString()+' available / '+g.reliable.toLocaleString()+' reliable ('+g.supply.toLocaleString()+' total)';
|
||||
row.appendChild(role);row.appendChild(nums);card.appendChild(row);
|
||||
});
|
||||
}
|
||||
|
||||
// Insight callout
|
||||
var insight=document.createElement('div');insight.style.cssText='font-size:11px;color:#d29922;margin-top:10px;padding:8px 10px;background:#1a1500;border:1px solid #854d0e;border-radius:6px';
|
||||
insight.textContent='This data updates from live city records. When a $50M warehouse gets permitted, you\'ll know about it here before the contractor calls looking for workers. The system cross-references permits with your worker bench to show where you\'re covered and where to recruit.';
|
||||
card.appendChild(insight);
|
||||
|
||||
el.appendChild(card);
|
||||
}).catch(function(){});
|
||||
}
|
||||
|
||||
// ─── Learning Loop ───
|
||||
function logSelection(workerData){
|
||||
if(!lastQuery||!workerData)return;
|
||||
|
||||
Reference in New Issue
Block a user