spb/datacenterindex
Public
HTML 53.9%
TypeScript 44.5%
JavaScript 0.6%
SQL 0.5%
1/** Human labels for provenance / claim field names (API camelCase; snake_case tolerated). Shared by the provenance table and the evidence drawer. */2export const FIELD_LABEL: Record<string, string> = {3 name: "Name",4 status: "Status",5 facilityType: "Type",6 itCapacityMw: "IT capacity",7 totalPowerMw: "Total power",8 plannedPowerMw: "Planned power",9 plannedMw: "Planned power",10 utilityCapacityMw: "Utility capacity",11 gridConnectionMw: "Grid connection",12 ultimateCampusMw: "Ultimate campus build-out",13 mwIsEstimate: "MW estimate flag",14 openedOn: "Opened",15 announcedOn: "Announced",16 constructionStartedOn: "Construction started",17 permitFiledOn: "Permit filed",18 approvedOn: "Approved",19 expectedOpening: "Expected opening",20 investmentUsd: "Investment",21 address: "Address",22 postalCode: "Postal code",23 city: "City",24 regionName: "Region",25 countryIso2: "Country",26 lat: "Latitude",27 lng: "Longitude",28 geo: "Coordinates",29 coordinates: "Coordinates",30 geoPrecision: "Geo precision",31 buildingSqm: "Building area",32 siteAreaHa: "Site area",33 rackCount: "Racks",34 pue: "PUE",35 tier: "Tier",36 coolingType: "Cooling",37 renewableClaim: "Renewable claim",38 certifications: "Certifications",39 website: "Website",40 description: "Description",41 operator: "Operator",42 operatorName: "Operator",43 owner: "Owner",44 ownerName: "Owner",45 developer: "Developer",46 landowner: "Landowner",47 isAi: "AI flag",48 isHyperscale: "Hyperscale flag",49 aliases: "Aliases",50 carriers: "Carriers",51 cloudProviders: "Cloud providers",52 ixps: "Internet exchanges",53 acreage: "Acreage",54 phaseCount: "Phases",55 lastVerified: "Last verified",56 confidence: "Confidence",57 // claim predicates58 it_capacity_mw: "IT capacity",59 critical_power_mw: "Critical power",60 current_power_mw: "Total power",61 planned_power_mw: "Planned power",62 utility_capacity_mw: "Utility capacity",63 grid_connection_mw: "Grid connection",64 ultimate_campus_mw: "Ultimate campus build-out",65 phase_mw: "Phase capacity",66 project_investment_usd: "Project investment",67 campus_investment_usd: "Campus investment",68 company_investment_usd: "Company investment",69 country_program_usd: "Country programme",70 multi_year_capex_usd: "Multi-year capex",71 deal_value_usd: "Deal value",72};7374export function fieldLabel(field: string): string {75 if (FIELD_LABEL[field]) return FIELD_LABEL[field];76 const camel = field.replace(/_([a-z])/g, (_, c: string) => c.toUpperCase());77 if (FIELD_LABEL[camel]) return FIELD_LABEL[camel];78 return field.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/_/g, " ").replace(/^./, (c) => c.toUpperCase());79}8081export function valueHint(field: string): "mw" | "date" | "usd" | undefined {82 if (/Mw$|_mw$/.test(field)) return "mw";83 if (/On$|_on$|Opening$|_opening$|Verified$/.test(field)) return "date";84 if (/Usd$|_usd$/.test(field)) return "usd";85 return undefined;86}87