Executive procurement summary across major global metal sourcing country markets for fabricated metal products, castings, forgings, machined components, weldments, and industrial assemblies prepared by ICT Manufacturing’s sourcing team.
", * and restrict it to the us-govt-statistics page only (Custom Code lets you * pick specific pages under Display Conditions). */document.addEventListener('DOMContentLoaded', () => { // Map each box's id to its FRED series ID. `null` = no FRED series exists. const SERIES_MAP = { 'fx-inr-home': 'DEXINUS', 'fx-cny-home': 'DEXCHUS', 'fx-thb-home': 'DEXTHUS', 'fx-idr-home': null, // Indonesian Rupiah isn't published in FRED's daily FX series 'fx-myr-home': 'DEXMAUS', 'fred-ppi': 'PCUOMFGOMFG', 'fred-oil': 'WPU056101', 'fred-cardboard': 'PCU322211322211', 'fred-lumber': 'WPU08', 'fred-aluminum': 'WPU102501', 'fred-steel': 'WPU081', };// FX rates read better with more decimal places than PPI index values const isFx = (seriesId) => seriesId && seriesId.startsWith('DEX');Object.entries(SERIES_MAP).forEach(([boxId, seriesId]) => { const box = document.getElementById(boxId); if (!box) return; // markup not on this page, skip quietlyconst set = (key, value, suffix = '') => { const el = box.querySelector(`[data-f="${key}"]`); if (!el) return; el.textContent = value != null ? value + suffix : 'n/a'; };if (!seriesId) { // No FRED series available (IDR) — say so plainly instead of hanging on "n/a" forever set('today', 'not on FRED'); return; }fetch(`/wp-json/ict/v1/fred/${seriesId}`) .then((r) => r.json()) .then((data) => { if (data.code) { console.error('FRED proxy error for', seriesId, data.message); return; } const todayFormatted = isFx(seriesId) ? Number(data.today).toFixed(4) : Number(data.today).toFixed(2);set('today', todayFormatted); set('ytd', data.ytd_growth, '%'); set('y1', data.vs_jan1_yr1, '%'); set('y5', data.vs_jan1_yr5, '%'); }) .catch((err) => console.error('FRED fetch failed for', seriesId, err)); }); });