Build Known vs Predicted (+ Gap) and emit JSON

import json

rows = [
(“H”,1,7,2),(“He”,2,9,2),(“Li”,3,11,2),(“Be”,4,12,1),(“B”,5,13,2),(“C”,6,15,2),
(“N”,7,16,2),(“O”,8,17,3),(“F”,9,18,1),(“Ne”,10,19,3),(“Na”,11,20,1),(“Mg”,12,22,3),
(“Al”,13,22,1),(“Si”,14,23,3),(“P”,15,23,1),(“S”,16,24,4),(“Cl”,17,24,2),(“Ar”,18,24,3),
(“K”,19,24,2),(“Ca”,20,24,6),(“Sc”,21,25,1),(“Ti”,22,26,5),(“V”,23,26,1),(“Cr”,24,26,4),
(“Mn”,25,26,1),(“Fe”,26,28,4),(“Co”,27,29,1),(“Ni”,28,31,5),(“Cu”,29,29,2),(“Zn”,30,30,5),
(“Ga”,31,31,2),(“Ge”,32,32,5),(“As”,33,33,1),(“Se”,34,30,6),(“Br”,35,31,2),(“Kr”,36,32,6),
(“Rb”,37,32,1),(“Sr”,38,34,4),(“Y”,39,32,1),(“Zr”,40,34,5),(“Nb”,41,34,1),(“Mo”,42,35,7),
(“Tc”,43,36,0),(“Ru”,44,37,7),(“Rh”,45,35,1),(“Pd”,46,36,6),(“Ag”,47,38,2),(“Cd”,48,39,8),
(“In”,49,39,2),(“Sn”,50,40,10),(“Sb”,51,36,2),(“Te”,52,38,8),(“I”,53,37,1),(“Xe”,54,40,9),
(“Cs”,55,39,1),(“Ba”,56,40,7),(“La”,57,39,1),(“Ce”,58,40,4),(“Pr”,59,39,1),(“Nd”,60,41,5),
(“Pm”,61,39,0),(“Sm”,62,41,7),(“Eu”,63,40,2),(“Gd”,64,41,7),(“Tb”,65,39,1),(“Dy”,66,40,7),
(“Ho”,67,39,1),(“Er”,68,40,6),(“Tm”,69,39,1),(“Yb”,70,41,7),(“Lu”,71,40,1),(“Hf”,72,36,5),
(“Ta”,73,37,1),(“W”,74,35,5),(“Re”,75,39,1),(“Os”,76,35,7),(“Ir”,77,34,2),(“Pt”,78,35,6),
(“Au”,79,36,1),(“Hg”,80,38,7),(“Tl”,81,39,2),(“Pb”,82,43,4),(“Bi”,83,41,0),(“Po”,84,42,0),
(“At”,85,39,0),(“Rn”,86,39,0),(“Fr”,87,34,0),(“Ra”,88,34,0),(“Ac”,89,33,0),(“Th”,90,31,1),
(“Pa”,91,29,0),(“U”,92,28,0),(“Np”,93,20,0),(“Pu”,94,20,0),(“Am”,95,17,0),(“Cm”,96,19,0),
(“Bk”,97,21,0),(“Cf”,98,20,0),(“Es”,99,18,0),(“Fm”,100,19,0),(“Md”,101,16,0),(“No”,102,13,0),
(“Lr”,103,16,0),(“Rf”,104,18,0),(“Db”,105,16,0),(“Sg”,106,14,0),(“Bh”,107,15,0),(“Hs”,108,15,0),
(“Mt”,109,13,0),(“Ds”,110,15,0),(“Rg”,111,11,0),(“Cn”,112,9,0),(“Nh”,113,9,0),(“Fl”,114,6,0),
(“Mc”,115,4,0),(“Lv”,116,4,0),(“Ts”,117,2,0),(“Og”,118,1,0)
]

known_total = sum(k for ,_,k,_ in rows)
target_total = 7759 # Neufcourt et al. 2020 central
scale = target_total / known_total

out = []
for sym, z, known, stable in rows:
predicted = round(known * scale)
out.append({
“element_z”: z,
“element_symbol”: sym,
“Known”: known,
“Stable”: stable,
“Unstable”: known – stable,
“Predicted”: predicted,
“Gap”: predicted – known
})

Fix any rounding drift to hit exactly 7,759 if desired:

drift = target_total – sum(d[“Predicted”] for d in out)
if drift != 0:
# nudge the entry with largest fractional part (simple heuristic)
frac = [(i, (rows[i][2]*scale) – out[i][“Predicted”]) for i in range(len(rows))]
idx = max(frac, key=lambda t: t[1])[0] if drift > 0 else min(frac, key=lambda t: t[1])[0]
out[idx][“Predicted”] += drift
out[idx][“Gap”] = out[idx][“Predicted”] – out[idx][“Known”]

Totals (sanity check)

totals = {
“Known”: sum(d[“Known”] for d in out),
“Stable”: sum(d[“Stable”] for d in out),
“Unstable”: sum(d[“Unstable”] for d in out),
“Predicted”: sum(d[“Predicted”] for d in out),
“Gap”: sum(d[“Gap”] for d in out),
“Scale factor”: scale,
}
print(“Totals:”, totals)

Emit JSON text you can save as isotopes_master.json

json_text = json.dumps(out, ensure_ascii=False, indent=2)
print(json_text)


# Build Known vs Predicted (+ Gap) and emit JSON
import json

rows = [
    ("H",1,7,2),("He",2,9,2),("Li",3,11,2),("Be",4,12,1),("B",5,13,2),("C",6,15,2),
    ("N",7,16,2),("O",8,17,3),("F",9,18,1),("Ne",10,19,3),("Na",11,20,1),("Mg",12,22,3),
    ("Al",13,22,1),("Si",14,23,3),("P",15,23,1),("S",16,24,4),("Cl",17,24,2),("Ar",18,24,3),
    ("K",19,24,2),("Ca",20,24,6),("Sc",21,25,1),("Ti",22,26,5),("V",23,26,1),("Cr",24,26,4),
    ("Mn",25,26,1),("Fe",26,28,4),("Co",27,29,1),("Ni",28,31,5),("Cu",29,29,2),("Zn",30,30,5),
    ("Ga",31,31,2),("Ge",32,32,5),("As",33,33,1),("Se",34,30,6),("Br",35,31,2),("Kr",36,32,6),
    ("Rb",37,32,1),("Sr",38,34,4),("Y",39,32,1),("Zr",40,34,5),("Nb",41,34,1),("Mo",42,35,7),
    ("Tc",43,36,0),("Ru",44,37,7),("Rh",45,35,1),("Pd",46,36,6),("Ag",47,38,2),("Cd",48,39,8),
    ("In",49,39,2),("Sn",50,40,10),("Sb",51,36,2),("Te",52,38,8),("I",53,37,1),("Xe",54,40,9),
    ("Cs",55,39,1),("Ba",56,40,7),("La",57,39,1),("Ce",58,40,4),("Pr",59,39,1),("Nd",60,41,5),
    ("Pm",61,39,0),("Sm",62,41,7),("Eu",63,40,2),("Gd",64,41,7),("Tb",65,39,1),("Dy",66,40,7),
    ("Ho",67,39,1),("Er",68,40,6),("Tm",69,39,1),("Yb",70,41,7),("Lu",71,40,1),("Hf",72,36,5),
    ("Ta",73,37,1),("W",74,35,5),("Re",75,39,1),("Os",76,35,7),("Ir",77,34,2),("Pt",78,35,6),
    ("Au",79,36,1),("Hg",80,38,7),("Tl",81,39,2),("Pb",82,43,4),("Bi",83,41,0),("Po",84,42,0),
    ("At",85,39,0),("Rn",86,39,0),("Fr",87,34,0),("Ra",88,34,0),("Ac",89,33,0),("Th",90,31,1),
    ("Pa",91,29,0),("U",92,28,0),("Np",93,20,0),("Pu",94,20,0),("Am",95,17,0),("Cm",96,19,0),
    ("Bk",97,21,0),("Cf",98,20,0),("Es",99,18,0),("Fm",100,19,0),("Md",101,16,0),("No",102,13,0),
    ("Lr",103,16,0),("Rf",104,18,0),("Db",105,16,0),("Sg",106,14,0),("Bh",107,15,0),("Hs",108,15,0),
    ("Mt",109,13,0),("Ds",110,15,0),("Rg",111,11,0),("Cn",112,9,0),("Nh",113,9,0),("Fl",114,6,0),
    ("Mc",115,4,0),("Lv",116,4,0),("Ts",117,2,0),("Og",118,1,0)
]

known_total = sum(k for _,__,k,_ in rows)
target_total = 7759  # Neufcourt et al. 2020 central
scale = target_total / known_total

out = []
for sym, z, known, stable in rows:
    predicted = round(known * scale)
    out.append({
        "element_z": z,
        "element_symbol": sym,
        "Known": known,
        "Stable": stable,
        "Unstable": known - stable,
        "Predicted": predicted,
        "Gap": predicted - known
    })

# Fix any rounding drift to hit exactly 7,759 if desired:
drift = target_total - sum(d["Predicted"] for d in out)
if drift != 0:
    # nudge the entry with largest fractional part (simple heuristic)
    frac = [(i, (rows[i][2]*scale) - out[i]["Predicted"]) for i in range(len(rows))]
    idx = max(frac, key=lambda t: t[1])[0] if drift > 0 else min(frac, key=lambda t: t[1])[0]
    out[idx]["Predicted"] += drift
    out[idx]["Gap"] = out[idx]["Predicted"] - out[idx]["Known"]

# Totals (sanity check)
totals = {
    "Known": sum(d["Known"] for d in out),
    "Stable": sum(d["Stable"] for d in out),
    "Unstable": sum(d["Unstable"] for d in out),
    "Predicted": sum(d["Predicted"] for d in out),
    "Gap": sum(d["Gap"] for d in out),
    "Scale factor": scale,
}
print("Totals:", totals)

# Emit JSON text you can save as isotopes_master.json
json_text = json.dumps(out, ensure_ascii=False, indent=2)
print(json_text)

Key terms in plain language

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

Broadband

A general term for always-on, high-speed Internet access. Broadband can be delivered over fiber, cable, DSL, fixed wireless, cellular, or satellite networks.

Cloud Computing

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

Cybersecurity

The practices and controls used to protect identities, devices, networks, applications, and data from unauthorized access, disruption, or manipulation.

Identity and Access Management (IAM)

The systems and policies that determine who a user is, what resources they may access, and how that access is authenticated and reviewed.

API

An application programming interface is a defined way for software systems to exchange data or request functions from one another.

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.