Folioevanzhou.org
← Back to Tessera
Adapted118 rows × 21 cols14 KB10 cols with missingSnapshot 2026-09-04

periodic_table

Chemical and physical properties for the 118 named elements, with long-form periodic-table positions derived for display.

One row represents one chemical element.

PubChem · added 2026-09-04

Download CSV · 14 KB
PreviewFirst 6 rows
atomic_numbersymbolnameperiodgrouplayout_rowlayout_columnatomic_masscpk_hex_colorelectron_configurationelectronegativityatomic_radius_pmionization_energy_evelectron_affinity_evoxidation_statesstandard_statemelting_point_kboiling_point_kdensity_g_cm3categoryyear_discovered
1HHydrogen11111.01FFFFFF1s12.2120.013.60.754+1, -1Gas13.820.38.99e-5Nonmetal1766
2HeHelium118.01184D9FFFF1s2NA140.024.6NA0Gas0.954.221.79e-4Noble gas1868
3LiLithium21217CC80FF[He]2s10.98182.05.390.618+1Solid453.61,6150.534Alkali metal1817
4BeBeryllium22229.01C2FF00[He]2s21.57153.09.32NA+2Solid1,5602,7441.85Alkaline earth metal1798
5BBoron213.021310.8FFB5B5[He]2s2 2p12.04192.08.30.277+3Solid2,3484,2732.37Metalloid1808
6CCarbon214.021412.0909090[He]2s2 2p22.55170.011.31.26+4, +2, -4Solid3,8234,0982.27NonmetalAncient
Variables21 cols
Character8Integer6Double7
Type
#VariableTypeMissingSummary
1atomic_numberPubChem · AtomicNumberInteger—min 1q1 —median 59.5mean 59.5q3 —max 118.0
2symbolIUPAC element symbol reported by PubChem.Character—unique 118H · He · Li · Be · B · C · N · O
3nameIUPAC English element name reported by PubChem.Character—unique 118Hydrogen · Helium · Lithium · Beryllium · Boron · Carbon · Nitrogen · Oxygen
4periodLong-form periodic-table period derived from atomic number.Integer—min 1q1 —median 6mean 5.25q3 —max 7
5groupIUPAC group 1–18; left blank for detached f-block members except La and Ac.Integer28min 1q1 —median 10.5mean 9.94q3 —max 18.0
6layout_rowDisplay row; 1–7 are periods, 8 is the detached lanthanide row, and 9 is the detached actinide row.Integer—min 1q1 —median 6mean 5.73q3 —max 9
7layout_columnDisplay column in the 18-column long-form layout.Integer—min 1q1 —median 10.5mean 10.1q3 —max 18.0
8atomic_massPubChem · AtomicMass, in unified atomic mass units.Double—min 1.01q1 —median 142.6mean 146.5q3 —max 295.2
9cpk_hex_colorPubChem · CPKHexColor, without the leading hash.Character10unique 108FFFFFF · D9FFFF · CC80FF · C2FF00 · FFB5B5 · 909090 · 3050F8 · FF0D0D
10electron_configurationPubChem · ElectronConfigurationCharacter—unique 1181s1 · 1s2 · [He]2s1 · [He]2s2 · [He]2s2 2p1 · [He]2s2 2p2 · [He] 2s2 2p3 · [He]2s2 2p4
11electronegativityPubChem · Electronegativity, Pauling scale.Double23min 0.7q1 —median 1.62mean 1.73q3 —max 3.98
12atomic_radius_pmPubChem · AtomicRadius, in picometres.Integer19min 120.0q1 —median 209.0mean 209.5q3 —max 348.0
13ionization_energy_evPubChem · IonizationEnergy, in electronvolts.Double16min 3.89q1 —median 6.96mean 8q3 —max 24.6
14electron_affinity_evPubChem · ElectronAffinity, in electronvolts.Double61min 0.079q1 —median 0.754mean 1.07q3 —max 3.62
15oxidation_statesPubChem · OxidationStatesCharacter1unique 43+3 · +3, +2 · +2 · +1 · 0 · +4, +2 · +4 · +4, +3
16standard_statePubChem · StandardStateCharacter—unique 5Solid · Gas · Expected to be a Solid · Liquid · Expected to be a Gas
17melting_point_kPubChem · MeltingPoint, in kelvin.Double15min 0.95q1 —median 1,191mean 1,274q3 —max 3,823
18boiling_point_kPubChem · BoilingPoint, in kelvin.Double25min 4.22q1 —median 2,792mean 2,536q3 —max 5,869
19density_g_cm3PubChem · Density, in grams per cubic centimetre.Double22min 9.0e-5q1 —median 7.07mean 7.61q3 —max 22.6
20categorykeyPubChem · GroupBlock chemical category.Character—unique 10Transition metal · Lanthanide · Actinide · Post-transition metal · Nonmetal · Noble gas · Metalloid · Alkali metal
21year_discoveredPubChem · YearDiscovered; Ancient is retained as text.Character—unique 76Ancient · 1898 · 1803 · 1817 · 1808 · 1774 · 1879 · 1940
Loadcolumn types set
library(readr)

periodic_table <- read_csv(
  "https://assets.evanzhou.org/tessera/csv/periodic_table.csv",
  col_types = cols(
    atomic_number          = col_integer(),
    symbol                 = col_character(),
    name                   = col_character(),
    period                 = col_integer(),
    group                  = col_integer(),
    layout_row             = col_integer(),
    layout_column          = col_integer(),
    atomic_mass            = col_double(),
    cpk_hex_color          = col_character(),
    electron_configuration = col_character(),
    electronegativity      = col_double(),
    atomic_radius_pm       = col_integer(),
    ionization_energy_ev   = col_double(),
    electron_affinity_ev   = col_double(),
    oxidation_states       = col_character(),
    standard_state         = col_character(),
    melting_point_k        = col_double(),
    boiling_point_k        = col_double(),
    density_g_cm3          = col_double(),
    category               = col_character(),
    year_discovered        = col_character()
  )
)
URLhttps://assets.evanzhou.org/tessera/csv/periodic_table.csv

Source

主体来自美国国立医学图书馆 PubChem 的周期表与元素页面。PubChem 将元素页中的多来源资料整理成可机读数据,并提供 JSON、XML 与 CSV 下载;字段含元素名称、原子质量、电子排布、物态和若干物理性质。本 Toy 的生成脚本通过其 PUG REST 周期表接口取得 CSV。

period、group、layout_row、layout_column 是生成脚本按照 IUPAC 1–18 族长式周期表补出的展示坐标,不是 PubChem 原字段。镧系、锕系另排为第 8、9 行;除 La、Ac 外不强行赋给第 3 族,避免把仍有口径差异的排法伪装成源数据。

标准原子量若用于严肃计算,应回到 CIAAW 最新表核对:部分元素给出区间,放射性元素则没有标准原子量。这里的 atomic_mass 保留 PubChem 的单值,更适合教学、筛选和可视化,不替代计量学参考表。

Use cases

  • 按 category 给元素周期表着色,检查一套定性配色能否同时区分十类元素
  • 按周期或族汇总物理性质,观察原子半径、电负性和电离能的周期趋势
  • 用熔点、沸点或密度做热图,并显式保留缺失值
  • 用 electron_configuration、oxidation_states 练习文本拆分和多值字段整理
  • 用 layout_row 与 layout_column 在任意绘图库中复现长式周期表

缺失不是随机的:超重元素往往只有预测物态,许多实验性质尚无可靠数值。画热图时不要把空值补成 0;“未知”和“测得为零”在这里完全不是一回事。

Build scriptPython · 87 lines
"""Build a periodic-table toy dataset from PubChem's machine-readable table."""

from pathlib import Path

import pandas as pd


SOURCE = "https://pubchem.ncbi.nlm.nih.gov/rest/pug/periodictable/CSV"
OUT = Path(__file__).resolve().parent.parent / "csv" / "periodic_table.csv"


def period(atomic_number: int) -> int:
    for upper, value in ((2, 1), (10, 2), (18, 3), (36, 4), (54, 5), (86, 6), (118, 7)):
        if atomic_number <= upper:
            return value
    raise ValueError(f"Unsupported atomic number: {atomic_number}")


def group(atomic_number: int) -> int | None:
    rows = {
        1: [1, 18],
        2: [1, 2, 13, 14, 15, 16, 17, 18],
        3: [1, 2, 13, 14, 15, 16, 17, 18],
        4: list(range(1, 19)),
        5: list(range(1, 19)),
        6: [1, 2, 3, *range(4, 19)],
        7: [1, 2, 3, *range(4, 19)],
    }
    starts = {1: 1, 2: 3, 3: 11, 4: 19, 5: 37, 6: 55, 7: 87}
    p = period(atomic_number)
    offset = atomic_number - starts[p]
    if p in (6, 7) and offset > 2:
        # Ce–Lu and Th–Lr are drawn in the detached f-block, without assigning
        # the disputed group-3 position to every member.
        if offset <= 16:
            return None
        offset -= 14
    return rows[p][offset]


def layout(atomic_number: int) -> tuple[int, int]:
    if 58 <= atomic_number <= 71:
        return 8, atomic_number - 54
    if 90 <= atomic_number <= 103:
        return 9, atomic_number - 86
    return period(atomic_number), group(atomic_number) or 3


def main() -> None:
    data = pd.read_csv(SOURCE)
    if data["AtomicNumber"].tolist() != list(range(1, 119)):
        raise ValueError("PubChem periodic table is not the expected 1–118 sequence")

    data = data.rename(
        columns={
            "AtomicNumber": "atomic_number",
            "Symbol": "symbol",
            "Name": "name",
            "AtomicMass": "atomic_mass",
            "CPKHexColor": "cpk_hex_color",
            "ElectronConfiguration": "electron_configuration",
            "Electronegativity": "electronegativity",
            "AtomicRadius": "atomic_radius_pm",
            "IonizationEnergy": "ionization_energy_ev",
            "ElectronAffinity": "electron_affinity_ev",
            "OxidationStates": "oxidation_states",
            "StandardState": "standard_state",
            "MeltingPoint": "melting_point_k",
            "BoilingPoint": "boiling_point_k",
            "Density": "density_g_cm3",
            "GroupBlock": "category",
            "YearDiscovered": "year_discovered",
        }
    )
    data.insert(3, "period", data["atomic_number"].map(period))
    data.insert(4, "group", data["atomic_number"].map(group).astype("Int64"))
    positions = data["atomic_number"].map(layout)
    data.insert(5, "layout_row", positions.map(lambda value: value[0]))
    data.insert(6, "layout_column", positions.map(lambda value: value[1]))

    OUT.parent.mkdir(parents=True, exist_ok=True)
    data.to_csv(OUT, index=False)
    print(f"Done: {len(data)} elements saved to {OUT}")


if __name__ == "__main__":
    main()

Stats computed by scripts/profile_dataset.py on 2026-09-04.