Auto-generate JSON/CSV exports for UCLS ↔ SolveForce cross-sector overlays

import pandas as pd
import json
from pathlib import Path

base = Path(“/mnt/data”)

—————————–

Define overlays (from our prior spec)

—————————–

etm = [
{“Element”:”H”,”Isotopes”:[“1H”,”2H”,”3H”],
“Energy_Role”:”Fusion fuel, hydrogen economy”,
“Telecom_Role”:”Fuel cells for base stations / backup”,
“Medicine_Role”:”PET tracers (e.g., 18F coupled to C/H); isotope kinetics”},
{“Element”:”He”,”Isotopes”:[“3He”,”4He”],
“Energy_Role”:”Cryogenics for superconductors, cryo pumps”,
“Telecom_Role”:”Cooling quantum/optical links”,
“Medicine_Role”:”MRI cooling (4He), lung imaging (hyperpolarized)”},
{“Element”:”Li”,”Isotopes”:[“6Li”,”7Li”],
“Energy_Role”:”Li-ion batteries, fusion blankets (6Li→T breeding)”,
“Telecom_Role”:”Grid/edge storage for towers & data centers”,
“Medicine_Role”:”Psychiatry (lithium salts)”},
{“Element”:”B”,”Isotopes”:[“10B”,”11B”],
“Energy_Role”:”Control rods (10B neutron capture), ceramics”,
“Telecom_Role”:”B-doped semiconductors & photonics”,
“Medicine_Role”:”BNCT (Boron Neutron Capture Therapy)”},
{“Element”:”C”,”Isotopes”:[“12C”,”13C”,”14C”],
“Energy_Role”:”Graphite moderators, composites”,
“Telecom_Role”:”Carbon fibers/nanotubes; fiber components”,
“Medicine_Role”:”13C metabolic tracers, 14C dating (biomed research)”},
{“Element”:”O”,”Isotopes”:[“16O”,”18O”],
“Energy_Role”:”Oxidizers; SOEC/SOFC materials”,
“Telecom_Role”:”SiO2 glass for fiber optics”,
“Medicine_Role”:”Respiratory therapy; isotope hydrology for health”},
{“Element”:”Si”,”Isotopes”:[“28Si”,”29Si”,”30Si”],
“Energy_Role”:”Solar PV, power electronics”,
“Telecom_Role”:”Chips, transceivers, photonics”,
“Medicine_Role”:”Bio-sensors; Si-based implants”},
{“Element”:”K”,”Isotopes”:[“39K”,”40K”,”41K”],
“Energy_Role”:”Electrochemistry; glass/ceramics”,
“Telecom_Role”:”Conductive/chemically strengthened glass”,
“Medicine_Role”:”40K natural tracer; electrolyte biology”},
{“Element”:”Ca”,”Isotopes”:[“40Ca”,”44Ca”,”48Ca”],
“Energy_Role”:”Cement/concrete; shielding”,
“Telecom_Role”:”Ceramics/substrates”,
“Medicine_Role”:”Bone health diagnostics; isotope balance studies”},
{“Element”:”Fe”,”Isotopes”:[“56Fe”,”57Fe”],
“Energy_Role”:”Steel for renewable infra; cores”,
“Telecom_Role”:”Ferrites; chassis; power delivery”,
“Medicine_Role”:”57Fe Mössbauer/biometal studies”},
{“Element”:”Co”,”Isotopes”:[“59Co”,”60Co”],
“Energy_Role”:”Superalloys, magnets”,
“Telecom_Role”:”Magnetic storage; hard-metal tooling”,
“Medicine_Role”:”Radiotherapy γ-source (60Co)”},
{“Element”:”Cu”,”Isotopes”:[“63Cu”,”65Cu”],
“Energy_Role”:”Power transmission; heat exchangers”,
“Telecom_Role”:”Cabling; RF components; PCBs”,
“Medicine_Role”:”Copper enzymes/tracers”},
{“Element”:”Sr”,”Isotopes”:[“88Sr”,”89Sr”,”90Sr”],
“Energy_Role”:”Ceramics; fission product management”,
“Telecom_Role”:”Precision oscillators (Sr references, research)”,
“Medicine_Role”:”89Sr bone therapy”},
{“Element”:”Nd”,”Isotopes”:[“142–150Nd”],
“Energy_Role”:”NdFeB magnets (wind, EVs)”,
“Telecom_Role”:”Speakers, haptics, mini-actuators”,
“Medicine_Role”:”Nd:YAG lasers (surgery/dermatology)”},
{“Element”:”Gd”,”Isotopes”:[“152–160Gd”,”157Gd”],
“Energy_Role”:”Reactor absorbers/shielding”,
“Telecom_Role”:”Neutron shielding for facilities”,
“Medicine_Role”:”MRI contrast agents”},
{“Element”:”U”,”Isotopes”:[“235U”,”238U”],
“Energy_Role”:”Fission fuel”,
“Telecom_Role”:”Nuclear-powered remotes (special cases)”,
“Medicine_Role”:”Radioisotope generators (upstream)”},
{“Element”:”Th”,”Isotopes”:[“232Th”],
“Energy_Role”:”MSR fuel (thorium cycle)”,
“Telecom_Role”:”Potential long-lived power (research)”,
“Medicine_Role”:”Alpha-therapy precursors (research)”},
]

eac = [
{“Element”:”N”,”Isotopes”:[“14N”,”15N”],
“Energy_Role”:”Ammonia as fuel/feedstock”,
“Agriculture_Role”:”Fertilizers; crop yield”,
“Climate_Role”:”Atmospheric tracer (δ15N)”},
{“Element”:”P”,”Isotopes”:[“31P”],
“Energy_Role”:”Battery/energy chemistries; biology energy (ATP)”,
“Agriculture_Role”:”Phosphates; soil health”,
“Climate_Role”:”Biogeochemical cycling”},
{“Element”:”S”,”Isotopes”:[“32S”,”33S”,”34S”,”36S”],
“Energy_Role”:”Batteries; vulcanization”,
“Agriculture_Role”:”Soil amendments; fungicides”,
“Climate_Role”:”Aerosol tracers; volcanology”},
{“Element”:”K”,”Isotopes”:[“39K”,”40K”,”41K”],
“Energy_Role”:”Electrochemistry; thermal salts”,
“Agriculture_Role”:”Macronutrient for plants”,
“Climate_Role”:”Geochron (40K)”},
{“Element”:”Ca”,”Isotopes”:[“40Ca”,”44Ca”,”48Ca”],
“Energy_Role”:”Concrete for infra; storage media”,
“Agriculture_Role”:”Soil pH; plant signaling”,
“Climate_Role”:”Carbonate system; ocean chemistry”},
{“Element”:”Mg”,”Isotopes”:[“24Mg”,”25Mg”,”26Mg”],
“Energy_Role”:”Lightweight alloys”,
“Agriculture_Role”:”Chlorophyll center; photosynthesis”,
“Climate_Role”:”Marine isotope tracer”},
{“Element”:”Fe”,”Isotopes”:[“54Fe”,”56Fe”,”57Fe”,”58Fe”],
“Energy_Role”:”Steel; catalysts”,
“Agriculture_Role”:”Micronutrient; fertilizer fortification”,
“Climate_Role”:”Dust fertilization; ocean productivity”},
]

msl = [
{“Element”:”H”,”Isotopes”:[“1H”,”2H”],
“Medicine_Role”:”MRI proton; deuterium labeling”,
“AI_Role”:”NMR/MD simulation benchmarks”,
“Legal_Role”:”Hydrogen economy policy/IP”},
{“Element”:”C”,”Isotopes”:[“13C”,”14C”],
“Medicine_Role”:”Stable isotope tracers; breath tests”,
“AI_Role”:”Carbon cycle modeling; KG grounding”,
“Legal_Role”:”Carbon credits; disclosure/claims”},
{“Element”:”P”,”Isotopes”:[“31P”],
“Medicine_Role”:”31P-MRS; metabolic imaging”,
“AI_Role”:”Neuromorphic/logic-in-memory research”,
“Legal_Role”:”Fertilizer patents; standards”},
{“Element”:”I”,”Isotopes”:[“127I”,”131I”],
“Medicine_Role”:”Thyroid therapy/imaging”,
“AI_Role”:”Supply-chain traceability analytics”,
“Legal_Role”:”Pharma trademarks/regulation”},
{“Element”:”Xe”,”Isotopes”:[“129Xe”,”131Xe”],
“Medicine_Role”:”Hyperpolarized MRI; anesthesia”,
“AI_Role”:”Quantum/secure comms modeling”,
“Legal_Role”:”Anesthetic regulation/compliance”},
{“Element”:”Gd”,”Isotopes”:[“157Gd”],
“Medicine_Role”:”MRI contrast (chelates)”,
“AI_Role”:”Critical-mineral risk analytics”,
“Legal_Role”:”Export control/classification”},
{“Element”:”U”,”Isotopes”:[“235U”,”238U”],
“Medicine_Role”:”Radiopharma production (upstream reactors)”,
“AI_Role”:”Reactor simulations; safety models”,
“Legal_Role”:”Nonproliferation treaties; IAEA”},
]

msr = [
{“Element”:”Al”,”Isotopes”:[“27Al”],
“Manufacturing_Role”:”Aerospace alloys”,
“Space_Role”:”Tankage; light structures”,
“Research_Role”:”Detectors/beamline hardware”},
{“Element”:”Ti”,”Isotopes”:[“46–50Ti”],
“Manufacturing_Role”:”Implants; high strength”,
“Space_Role”:”Airframes; additively manufactured parts”,
“Research_Role”:”Bio/oxide coatings”},
{“Element”:”Zr”,”Isotopes”:[“90–96Zr”],
“Manufacturing_Role”:”Reactor cladding; ceramics”,
“Space_Role”:”Radiation shielding”,
“Research_Role”:”Isotope geochronology”},
{“Element”:”Mo”,”Isotopes”:[“92–100Mo”],
“Manufacturing_Role”:”Catalysts; high-temp parts”,
“Space_Role”:”Heat shields; structures”,
“Research_Role”:”99Mo→99mTc medical supply”},
{“Element”:”W”,”Isotopes”:[“180–186W”],
“Manufacturing_Role”:”Hardmetals; machining”,
“Space_Role”:”Shielding; penetrators”,
“Research_Role”:”Fusion divertors”},
{“Element”:”Re”,”Isotopes”:[“185Re”,”187Re”],
“Manufacturing_Role”:”Superalloys; turbine blades”,
“Space_Role”:”Rocket engines; nozzles”,
“Research_Role”:”Re–Os chronometer”},
{“Element”:”Pt”,”Isotopes”:[“190–198Pt”],
“Manufacturing_Role”:”Catalysts; sensors”,
“Space_Role”:”RTGs/fuel cells interfaces”,
“Research_Role”:”Electrochemistry”},
{“Element”:”Au”,”Isotopes”:[“197Au”],
“Manufacturing_Role”:”Electronics; bonding wires”,
“Space_Role”:”Thermal control; coatings”,
“Research_Role”:”Nanomedicine; plasmonics”},
{“Element”:”Os/Ir”,”Isotopes”:[“184–193”],
“Manufacturing_Role”:”Extreme-durability alloys”,
“Space_Role”:”Impact/meteorite markers”,
“Research_Role”:”K–Pg layer studies”},
]

—————————–

Build DataFrames

—————————–

df_etm = pd.DataFrame(etm)
df_eac = pd.DataFrame(eac)
df_msl = pd.DataFrame(msl)
df_msr = pd.DataFrame(msr)

—————————–

Save CSV and JSON per overlay

—————————–

def save_overlay(df, stem):
csv_p = base / f”overlay_{stem}.csv”
json_p = base / f”overlay_{stem}.json”
df.to_csv(csv_p, index=False)
# Ensure isotopes lists are JSON arrays
records = json.loads(df.to_json(orient=”records”))
with open(json_p, “w”) as f:
json.dump(records, f, indent=2)
return str(csv_p), str(json_p)

paths = {}
paths[“Energy_Telecom_Medicine”] = save_overlay(df_etm, “energy_telecom_medicine”)
paths[“Energy_Agriculture_Climate”] = save_overlay(df_eac, “energy_agriculture_climate”)
paths[“Medicine_Software_Legal”] = save_overlay(df_msl, “medicine_software_legal”)
paths[“Manufacturing_Space_Research”] = save_overlay(df_msr, “manufacturing_space_research”)

—————————–

Build a unified element–sector edge list (for graph queries)

—————————–

edges = []
def add_edges(df, sectors, isotope_col=”Isotopes”):
for _, row in df.iterrows():
elem = row[“Element”]
isotopes = row[isotope_col] if isinstance(row[isotope_col], list) else [row[isotope_col]]
for s in sectors:
# role column name is like “Energy_Role” etc.
role_col = f”{s}_Role”
role = row.get(role_col, “”)
edges.append({
“Element”: elem,
“Isotopes”: isotopes,
“Sector”: s,
“Role”: role
})

add_edges(df_etm, [“Energy”,”Telecom”,”Medicine”])
add_edges(df_eac, [“Energy”,”Agriculture”,”Climate”])
add_edges(df_msl, [“Medicine”,”AI”,”Legal”])
add_edges(df_msr, [“Manufacturing”,”Space”,”Research”])

df_edges = pd.DataFrame(edges)

edge_csv = base / “ucls_sector_edges.csv”
edge_json = base / “ucls_sector_edges.json”
df_edges.to_csv(edge_csv, index=False)

with open(edge_json, “w”) as f:
json.dump(json.loads(df_edges.to_json(orient=”records”)), f, indent=2)

—————————–

Build a manifest for SolveForce ingestion

—————————–

manifest = {
“version”:”1.0″,
“overlays”:[
{“name”:”Energy↔Telecom↔Medicine”,”csv”:”overlay_energy_telecom_medicine.csv”,”json”:”overlay_energy_telecom_medicine.json”},
{“name”:”Energy↔Agriculture↔Climate”,”csv”:”overlay_energy_agriculture_climate.csv”,”json”:”overlay_energy_agriculture_climate.json”},
{“name”:”Medicine↔AI/Software↔Legal”,”csv”:”overlay_medicine_software_legal.csv”,”json”:”overlay_medicine_software_legal.json”},
{“name”:”Manufacturing↔Space↔Research”,”csv”:”overlay_manufacturing_space_research.csv”,”json”:”overlay_manufacturing_space_research.json”},
],
“edges”:{“csv”:”ucls_sector_edges.csv”,”json”:”ucls_sector_edges.json”}
}

manifest_path = base / “ucls_overlays_manifest.json”
with open(manifest_path, “w”) as f:
json.dump(manifest, f, indent=2)

Return file list

{
“manifest”: str(manifest_path),
“overlays”: paths,
“edges_csv”: str(edge_csv),
“edges_json”: str(edge_json)
}

Key terms in plain language

Open a term for a concise explanation of language used on this page.

Fiber Internet

Internet delivered through strands of glass using light. Fiber commonly supports high capacity, low latency, and strong upload performance, but availability must be confirmed for the exact address.

Artificial Intelligence (AI)

Software designed to perform tasks involving prediction, classification, generation, reasoning, or decision support. Business use still requires clear data, governance, security, and human accountability.

Cloud Computing

Computing resources—such as applications, servers, storage, or databases—delivered from remote infrastructure and scaled as requirements change.

Infrastructure as a Service (IaaS)

Cloud-based servers, storage, and networking that customers configure and manage without owning the underlying data-center hardware.

Software as a Service (SaaS)

Software accessed as an online service instead of being installed and maintained entirely on the customer’s own computers or servers.

Disaster Recovery (DRaaS)

A plan and service for restoring applications, data, and operations after an outage or disruption. DRaaS provides recovery infrastructure through a managed cloud service.