Worked Examples
Create figure source reconciliation — Visualization & Graphing
Create figure source reconciliation — Visualization & Graphing Cross-application area: Visualization & Graphing Status: Initial scientific graphics guidance; platform-specific features not verified. Goal Recompute figure points an
Cross-application area: Visualization & Graphing
Article classification: Practical Guides / Figure Provenance / Source Reconciliation
Audience: Researchers, scientific programmers, data analysts, visualization engineers, and publication reviewers
Technical level: Intermediate to advanced
Reference environment: Python 3 standard library
Relevant standards: W3C PROV-O, SHA-256, SVG, and WCAG 2.2
Primary outputs: Versioned source fixture, analytical artifact, reconciled SVG figure, accessible numerical table, verification manifest, and regression tests
Estimated reading time: 14–18 minutes; 30–45 minutes including the practical exercise
1. Goal and expected outcome
The goal is to create a scientific figure whose numerical values can be traced through the complete analytical process to identifiable source records.
The workflow should establish a reproducible relationship among:
- The authoritative source observations.
- The selected dataset and any excluded records.
- The versioned analytical transformation.
- The resulting numerical analytical artifact.
- The graphical marks and axis configuration.
- The exported figure and accessible numerical data.
- The validation evidence and eventual publication decision.
Primary acceptance condition: Every displayed numerical value must agree with the accepted analytical output, and that output must reconcile with the authoritative source records and documented transformation rules.
Successful figure generation does not automatically establish that the underlying scientific analysis is appropriate.
2. Understand the end-to-end workflow
Figure source reconciliation should be designed into figure creation, not added only after a discrepancy is discovered.
Source dataset
|
v
Source identity and rights review
|
v
Selection and transformation
|
v
Versioned analytical artifact
|
v
Independent numerical reconciliation
|
v
Figure-data specification
|
v
SVG or alternative scientific renderer
|
v
Rendered-mark verification
|
v
Accessible table and evidence manifest
|
v
Scientific review and publication approval
Each stage should preserve an identifiable input and output, with sufficient metadata to reconstruct the operation.
Actual immutable storage and authorization controls must be enforced by the owning platform, rather than assumed from file naming conventions.
3. Identify the scientific question
Start by defining what the figure is intended to communicate.
For this exercise, the question is:
What is the arithmetic mean of a synthetic response variable for each of two groups, and can every displayed mean be reconstructed from the corresponding source observations?
The figure will contain one point per group.
Each point will represent an arithmetic mean, not an individual measurement or a modeled prediction.
The exercise is deliberately small so that its results can be checked independently by hand.
4. Define the source and analytical contracts
Before generating a graphic, establish what the source contains and how it will be transformed.
| Property | Reference requirement |
|---|---|
| Source identifier | Stable dataset identity |
| Source revision | Explicit version of the observations |
| Record identity | Unique identifiers for each observation |
| Variable definition | Numerical response with documented meaning |
| Measurement units | Consistent units across observations |
| Selection rule | Which records contribute to each result |
| Transformation | Arithmetic mean by group |
| Missingness | Invalid or missing values rejected in the reference exercise |
| Analytical revision | Versioned calculation method |
| Output format | Machine-readable numerical results with provenance |
For real research, also preserve source licensing, access restrictions, observation dates, calibration information, and uncertainty definitions where relevant.
5. Construct a synthetic source dataset
| Record ID | Day | Group | Response (synthetic units) |
|---|---|---|---|
| A00 | 0 | A | 10 |
| A07 | 7 | A | 12 |
| B00 | 0 | B | 14 |
| B07 | 7 | B | 18 |
The intended transformation is the arithmetic mean of the observations belonging to each group.
Group A:
(10 + 12) / 2 = 11
Group B:
(14 + 18) / 2 = 16
Expected figure data:
| Figure mark | Contributors | Count | Mean |
|---|---|---|---|
| mean_A | A00, A07 | 2 | 11 |
| mean_B | B00, B07 | 2 | 16 |
These values are entirely synthetic. They are not empirical observations and should never be represented as scientific findings about a real treatment, site, or population.
6. Define the reconciliation equations
Let D represent the authoritative source dataset and S the selection of records contributing to a figure.
Let T be the analytical transformation:
A = T(D, S)
Let F be the numerical figure-data table and R the renderer:
G = R(F, C)
where C is the rendering configuration.
The workflow must verify three relationships.
6.1 Analytical reconciliation
Recompute T(D, S)
Compare with stored analytical result A
6.2 Figure-data reconciliation
Compare figure values F
with accepted analytical result A
6.3 Rendering reconciliation
Compare the rendered mark coordinates
with the values and scales specified in F and C
Each relationship can fail independently.
For floating-point values, a common numerical criterion is:
|actual - expected|
<= atol + rtol * |expected|
Tolerances should be appropriate to the numerical method and scientific precision. The reference exercise uses a strict absolute tolerance of 10^-12 synthetic units for the analytical means.
7. Prepare the Python environment
The reference implementation uses only Python’s standard library.
mkdir figure-reconciliation-example
cd figure-reconciliation-example
python3 -m venv .venv
source .venv/bin/activate
python --version
Create two files:
figure_reconciliation.py
test_figure_reconciliation.py
The first file will generate and validate the figure artifacts. The second will test normal operation and intentional failure conditions.
8. Implement source validation and analytical reconciliation
Save the complete following program as figure_reconciliation.py.
It performs source-data validation, independent recomputation, figure creation, numerical export, and SVG mark inspection within a single reference module.
from collections import defaultdict
from hashlib import sha256
from pathlib import Path
import csv
import io
import json
import math
import xml.etree.ElementTree as ET
SOURCE_ID = "synthetic-group-response"
SOURCE_REVISION = "1.0"
METHOD_ID = "arithmetic-mean-by-group-v1"
UNITS = "synthetic units"
SOURCE_ROWS = [
{"record_id": "A00", "day": 0,
"group": "A", "value": 10.0},
{"record_id": "A07", "day": 7,
"group": "A", "value": 12.0},
{"record_id": "B00", "day": 0,
"group": "B", "value": 14.0},
{"record_id": "B07", "day": 7,
"group": "B", "value": 18.0}
]
SVG_NS = "http://www.w3.org/2000/svg"
def digest(data):
return sha256(data).hexdigest()
def json_bytes(value):
return (
json.dumps(
value,
sort_keys=True,
indent=2,
allow_nan=False
) + "\n"
).encode("utf-8")
def write_versioned(path, data):
path = Path(path)
path.parent.mkdir(
parents=True,
exist_ok=True
)
if path.exists():
if path.read_bytes() != data:
raise ValueError(
"Versioned artifact conflict: "
+ str(path)
)
return path
try:
with path.open("xb") as handle:
handle.write(data)
except FileExistsError:
if path.read_bytes() != data:
raise ValueError(
"Concurrent artifact conflict"
)
return path
def validate_rows(rows):
if not rows:
raise ValueError("Empty source")
ids = set()
for row in rows:
record_id = row["record_id"]
group = row["group"]
value = row["value"]
if not record_id or not group:
raise ValueError(
"Missing record identity"
)
if record_id in ids:
raise ValueError(
"Duplicate record ID"
)
if (
isinstance(row["day"], bool)
or not isinstance(row["day"], int)
):
raise ValueError(
"Invalid day value"
)
if not math.isfinite(value):
raise ValueError(
"Nonfinite observation"
)
ids.add(record_id)
return True
def source_csv(rows):
validate_rows(rows)
output = io.StringIO(
newline=""
)
writer = csv.writer(
output,
lineterminator="\n"
)
writer.writerow(
["record_id", "day", "group", "value"]
)
for row in rows:
writer.writerow([
row["record_id"],
row["day"],
row["group"],
format(row["value"], ".17g")
])
return output.getvalue().encode("utf-8")
def compute_means(rows):
validate_rows(rows)
groups = defaultdict(list)
for row in rows:
groups[row["group"]].append(row)
results = []
for group in sorted(groups):
contributors = groups[group]
mean = (
math.fsum(
row["value"]
for row in contributors
)
/ len(contributors)
)
results.append({
"mark_id": "mean_" + group,
"group": group,
"value": mean,
"count": len(contributors),
"units": UNITS,
"contributor_ids": sorted(
row["record_id"]
for row in contributors
)
})
return results
def make_analysis(rows, source_hash):
return {
"source_id": SOURCE_ID,
"source_revision": SOURCE_REVISION,
"source_sha256": source_hash,
"method_id": METHOD_ID,
"source_classification": "synthetic",
"results": compute_means(rows)
}
def reconcile_analysis(rows, analysis, source_hash):
if analysis["source_id"] != SOURCE_ID:
raise ValueError(
"Source identity mismatch"
)
if analysis["source_revision"] != SOURCE_REVISION:
raise ValueError(
"Source revision mismatch"
)
if analysis["source_sha256"] != source_hash:
raise ValueError(
"Source checksum mismatch"
)
if analysis["method_id"] != METHOD_ID:
raise ValueError(
"Transformation mismatch"
)
expected = compute_means(rows)
actual = analysis["results"]
if len(expected) != len(actual):
raise ValueError(
"Figure result count mismatch"
)
for reference, result in zip(
expected, actual
):
for key in (
"mark_id", "group",
"count", "units",
"contributor_ids"
):
if reference[key] != result[key]:
raise ValueError(
"Analytical metadata mismatch: "
+ key
)
if not math.isclose(
reference["value"],
result["value"],
rel_tol=0,
abs_tol=1e-12
):
raise ValueError(
"Numerical reconciliation failure"
)
return True
def figure_csv(results):
output = io.StringIO(
newline=""
)
writer = csv.writer(
output,
lineterminator="\n"
)
writer.writerow([
"mark_id", "group", "mean",
"units", "count", "contributors"
])
for result in results:
writer.writerow([
result["mark_id"],
result["group"],
format(result["value"], ".17g"),
result["units"],
result["count"],
";".join(
result["contributor_ids"]
)
])
return output.getvalue().encode("utf-8")
def make_svg(results):
ET.register_namespace("", SVG_NS)
def tag(name):
return "{" + SVG_NS + "}" + name
svg = ET.Element(
tag("svg"),
{
"viewBox": "0 0 640 380",
"role": "img",
"aria-labelledby": "title desc"
}
)
ET.SubElement(
svg, tag("title"), {"id": "title"}
).text = "Synthetic group means"
ET.SubElement(
svg, tag("desc"), {"id": "desc"}
).text = (
"Group A has a mean of 11 "
"and Group B has a mean of 16 "
"synthetic units. Each mean is "
"calculated from two observations."
)
def line(x1, y1, x2, y2):
ET.SubElement(
svg, tag("line"),
{
"x1": str(x1),
"y1": str(y1),
"x2": str(x2),
"y2": str(y2),
"stroke": "#222222"
}
)
def text(x, y, value, size="15"):
element = ET.SubElement(
svg, tag("text"),
{
"x": str(x),
"y": str(y),
"font-size": size,
"fill": "#222222",
"text-anchor": "middle"
}
)
element.text = str(value)
# Fixed linear scale: 0 to 20.
y_top = 60
y_bottom = 300
def y_position(value):
return (
y_bottom
- (value / 20.0)
* (y_bottom - y_top)
)
line(110, y_top, 110, y_bottom)
line(110, y_bottom, 570, y_bottom)
for tick in (0, 5, 10, 15, 20):
y = y_position(tick)
line(104, y, 110, y)
text(78, y + 5, tick, "13")
positions = {
"A": 250,
"B": 430
}
for result in results:
x = positions[result["group"]]
y = y_position(result["value"])
ET.SubElement(
svg, tag("circle"),
{
"id": result["mark_id"],
"data-value": str(
result["value"]
),
"data-group": result["group"],
"cx": str(x),
"cy": str(y),
"r": "8",
"fill": "#b00020"
}
)
text(
x, y - 15,
format(result["value"], ".3f")
)
text(x, 328, result["group"])
text(
320, 360,
"Response (synthetic units)",
"15"
)
return ET.tostring(
svg,
encoding="utf-8",
xml_declaration=True
)
def validate_svg(svg_bytes, results):
root = ET.fromstring(svg_bytes)
namespace = {
"s": SVG_NS
}
marks = root.findall(
".//s:circle",
namespace
)
if len(marks) != len(results):
raise ValueError(
"SVG mark count mismatch"
)
by_id = {
mark.attrib["id"]: mark
for mark in marks
}
if len(by_id) != len(marks):
raise ValueError(
"Duplicate SVG mark identity"
)
expected_ids = {
result["mark_id"]
for result in results
}
if set(by_id) != expected_ids:
raise ValueError(
"SVG mark coverage mismatch"
)
for result in results:
mark = by_id[result["mark_id"]]
actual_value = float(
mark.attrib["data-value"]
)
actual_y = float(
mark.attrib["cy"]
)
expected_y = (
300
- result["value"] / 20.0 * 240
)
if mark.attrib["data-group"] != (
result["group"]
):
raise ValueError(
"SVG group mismatch"
)
if not math.isclose(
actual_value,
result["value"],
rel_tol=0,
abs_tol=1e-12
):
raise ValueError(
"SVG numerical mismatch"
)
if not math.isclose(
actual_y,
expected_y,
rel_tol=0,
abs_tol=1e-9
):
raise ValueError(
"SVG coordinate mismatch"
)
return True
def build_outputs(directory):
directory = Path(directory)
source_data = source_csv(SOURCE_ROWS)
source_hash = digest(source_data)
source_path = write_versioned(
directory / "source-v1.csv",
source_data
)
analysis = make_analysis(
SOURCE_ROWS,
source_hash
)
analysis_data = json_bytes(analysis)
analysis_path = write_versioned(
directory / "analysis-v1.json",
analysis_data
)
# Replay the stored numerical result.
stored_analysis = json.loads(
analysis_path.read_text(
encoding="utf-8"
)
)
reconcile_analysis(
SOURCE_ROWS,
stored_analysis,
source_hash
)
results = stored_analysis["results"]
svg_data = make_svg(results)
validate_svg(svg_data, results)
svg_path = write_versioned(
directory / "figure-v1.svg",
svg_data
)
table_data = figure_csv(results)
table_path = write_versioned(
directory / "figure-data-v1.csv",
table_data
)
manifest = {
"classification": "synthetic",
"source_id": SOURCE_ID,
"source_revision": SOURCE_REVISION,
"transformation": METHOD_ID,
"artifacts": {
"source": {
"filename": source_path.name,
"sha256": source_hash
},
"analysis": {
"filename": analysis_path.name,
"sha256": digest(analysis_data)
},
"figure": {
"filename": svg_path.name,
"sha256": digest(svg_data)
},
"table": {
"filename": table_path.name,
"sha256": digest(table_data)
}
},
"numerical_reconciliation": "pass",
"svg_structural_check": "pass",
"visual_review": "not_tested",
"accessibility_review": "not_tested",
"scientific_review": "not_tested",
"publication_approval": "not_approved"
}
write_versioned(
directory / "manifest-v1.json",
json_bytes(manifest)
)
return manifest
if __name__ == "__main__":
report = build_outputs(
Path("figure-output")
)
print(
"Analytical reconciliation: PASS"
)
print(
"SVG structural check: PASS"
)
print(
"Source checksum:",
report["artifacts"]["source"]["sha256"]
)
9. Run the reference implementation
Execute:
python figure_reconciliation.py
Expected console output:
Analytical reconciliation: PASS
SVG structural check: PASS
Source checksum: <computed SHA-256 digest>
The program creates:
figure-output/
source-v1.csv
analysis-v1.json
figure-v1.svg
figure-data-v1.csv
manifest-v1.json
Each artifact has a separate responsibility.
| Artifact | Purpose |
|---|---|
| source-v1.csv | Preserves the synthetic source observations |
| analysis-v1.json | Stores versioned numerical summaries and contributor IDs |
| figure-v1.svg | Contains the generated scientific figure |
| figure-data-v1.csv | Provides an accessible numerical representation |
| manifest-v1.json | Records source identities, transformations, hashes, and verification states |
The example prevents overwriting an existing versioned file with different content, but it does not implement tamper-proof storage. An authorized or external process could still alter or remove the local files.
Production immutability requires appropriate storage, access-control, revision, retention, and audit mechanisms.
10. Inspect the generated scientific figure
Open figure-output/figure-v1.svg in a suitable browser or SVG viewer.
The expected visualization contains two red point marks:
- Group A at 11 synthetic units.
- Group B at 16 synthetic units.
The graphical scale is linear and spans 0 to 20 synthetic units.
The SVG also contains machine-readable numerical attributes associated with the marks. The reference verification reads those attributes and checks that the vertical coordinates match the declared linear scale.
Important limitation: These checks validate selected elements of the SVG structure. They do not constitute complete browser-rendering, visual-regression, security, or accessibility acceptance.
The numeric table should remain available alongside the graphic.
11. Build automated regression tests
Use automated tests to ensure that incorrect source values, missing contributors, altered analytical results, or distorted graphical coordinates are detected.
Save the following as test_figure_reconciliation.py.
from copy import deepcopy
from pathlib import Path
import json
import tempfile
import unittest
from figure_reconciliation import (
SOURCE_ROWS,
build_outputs,
compute_means,
digest,
make_analysis,
make_svg,
reconcile_analysis,
source_csv,
validate_rows,
validate_svg
)
class FigureReconciliationTests(
unittest.TestCase
):
def source_hash(self):
return digest(
source_csv(SOURCE_ROWS)
)
def analysis(self):
return make_analysis(
SOURCE_ROWS,
self.source_hash()
)
def test_reference_means(self):
result = compute_means(
SOURCE_ROWS
)
self.assertEqual(
result[0]["value"],
11.0
)
self.assertEqual(
result[1]["value"],
16.0
)
def test_valid_source(self):
self.assertTrue(
validate_rows(SOURCE_ROWS)
)
def test_duplicate_source_rejected(self):
broken = SOURCE_ROWS + [
SOURCE_ROWS[0]
]
with self.assertRaises(ValueError):
validate_rows(broken)
def test_empty_source_rejected(self):
with self.assertRaises(ValueError):
validate_rows([])
def test_nonfinite_source_rejected(self):
broken = deepcopy(SOURCE_ROWS)
broken[0]["value"] = float("nan")
with self.assertRaises(ValueError):
validate_rows(broken)
def test_valid_analysis(self):
self.assertTrue(
reconcile_analysis(
SOURCE_ROWS,
self.analysis(),
self.source_hash()
)
)
def test_wrong_mean_rejected(self):
broken = self.analysis()
broken["results"][0]["value"] = 12.0
with self.assertRaises(ValueError):
reconcile_analysis(
SOURCE_ROWS,
broken,
self.source_hash()
)
def test_wrong_contributors_rejected(self):
broken = self.analysis()
broken["results"][0][
"contributor_ids"
] = ["A00", "B00"]
with self.assertRaises(ValueError):
reconcile_analysis(
SOURCE_ROWS,
broken,
self.source_hash()
)
def test_wrong_units_rejected(self):
broken = self.analysis()
broken["results"][0]["units"] = "kg"
with self.assertRaises(ValueError):
reconcile_analysis(
SOURCE_ROWS,
broken,
self.source_hash()
)
def test_source_hash_mismatch(self):
with self.assertRaises(ValueError):
reconcile_analysis(
SOURCE_ROWS,
self.analysis(),
"incorrect-checksum"
)
def test_valid_svg(self):
analysis = self.analysis()
svg_data = make_svg(
analysis["results"]
)
self.assertTrue(
validate_svg(
svg_data,
analysis["results"]
)
)
def test_tampered_svg_coordinate(self):
analysis = self.analysis()
svg_data = make_svg(
analysis["results"]
)
broken = svg_data.replace(
b'cy="168.0"',
b'cy="100.0"'
)
self.assertNotEqual(
broken,
svg_data
)
with self.assertRaises(ValueError):
validate_svg(
broken,
analysis["results"]
)
def test_replay_stability(self):
with tempfile.TemporaryDirectory() as d:
directory = Path(d)
first = build_outputs(directory)
second = build_outputs(directory)
self.assertEqual(
first,
second
)
def test_version_conflict_detected(self):
with tempfile.TemporaryDirectory() as d:
directory = Path(d)
build_outputs(directory)
source_path = (
directory / "source-v1.csv"
)
source_path.write_text(
"changed source",
encoding="utf-8"
)
with self.assertRaises(ValueError):
build_outputs(directory)
def test_generated_manifest(self):
with tempfile.TemporaryDirectory() as d:
directory = Path(d)
build_outputs(directory)
manifest = json.loads(
(
directory / "manifest-v1.json"
).read_text(
encoding="utf-8"
)
)
self.assertEqual(
manifest["numerical_reconciliation"],
"pass"
)
self.assertEqual(
manifest["publication_approval"],
"not_approved"
)
if __name__ == "__main__":
unittest.main()
12. Execute the regression suite
python -m unittest -v test_figure_reconciliation.py
The reference suite defines fifteen tests.
It checks:
- Correct group means.
- Valid source records.
- Duplicate and empty source rejection.
- Nonfinite-value rejection.
- Analytical reconciliation.
- Incorrect means and contributor lists.
- Incorrect units.
- Source checksum mismatches.
- SVG structural reconciliation.
- Changed graphical coordinates.
- Stable replay.
- Versioned-file conflicts.
- Manifest generation and publication state.
Execution status: These are reference test definitions. They have not been represented here as executed Sustainable Catalyst integration or production acceptance tests.
For a controlled deployment, retain the actual test output, interpreter version, code revision, and artifact checksums.
13. Verify the numerical result independently
Program execution and independent scientific review should be treated as separate activities.
For the reference fixture, independently verify:
Group A:
10 + 12 = 22
22 / 2 = 11
Group B:
14 + 18 = 32
32 / 2 = 16
Then compare these values with analysis-v1.json and figure-data-v1.csv.
Finally, inspect the plotted marks in figure-v1.svg.
All three representations should agree.
In real research, independent reconciliation should use a calculation or analytical route sufficiently separate from the original implementation to reduce the risk of repeating the same defect.
Reusing the identical calculation code may verify determinism without providing strong evidence of independent numerical correctness.
14. Reconcile interactive filters and figure state
Scientific figures may be interactive, allowing users to filter groups, time periods, locations, or variables.
Every accepted figure state should identify the actual selection used to calculate its values.
For example:
Source revision:
synthetic-group-response / 1.0
Selection:
group = A
days = [0, 7]
Result:
11 synthetic units
If the user instead selects only day 7:
Selection:
group = A
days = [7]
Result:
12 synthetic units
Both results are mathematically correct, but they represent different selections.
When creating a persistent figure, preserve the filter state and analytical result associated with that version.
Do not automatically treat an unapproved interactive browser selection as a reviewed scientific artifact.
15. Reconcile uncertainty and statistical intervals
When a figure displays uncertainty, the numerical reconciliation must extend beyond the point estimate.
Record:
- Statistical or measurement-uncertainty type.
- Contributing observations.
- Sample size.
- Estimator and uncertainty method.
- Nominal confidence or prediction level where relevant.
- Numerical lower and upper bounds.
- Units and conversions.
- Graphical interval coordinates.
A correct point estimate with an incorrect confidence interval is not a fully reconciled scientific figure.
Confidence intervals, prediction intervals, standard deviations, and measurement uncertainties must retain their distinct meanings.
16. Reconcile temporal, spatial, and modeled outputs
16.1 Temporal figures
Time-dependent graphics require correct observation timestamps, aggregation intervals, time zones, and missing-data handling.
When interpolation is used, the resulting intermediate values must be labeled as estimates rather than new observations.
16.2 Geospatial figures
Spatial figure reconciliation should include:
- Coordinate reference systems.
- Source geographic identifiers.
- Spatial extent and resolution.
- Projection and coordinate transformations.
- Raster resampling or interpolation.
- Source acquisition dates.
- No-data masks and excluded regions.
For satellite imagery, preserve the source scene or dataset references, acquisition metadata, processing steps, and rights information.
16.3 Simulated and modeled figures
For figures derived from scientific models, preserve the model version, input parameters, numerical method, initial conditions, and random seed where applicable.
A highly detailed three-dimensional rendering or animation is not evidence of empirical validity unless its represented variables and underlying model have been independently justified.
17. Validate accessibility and exports
Figures should preserve scientific meaning in both graphical and accessible numerical formats.
Provide:
- A descriptive title.
- Variable names and measurement units.
- A scientifically accurate caption.
- Numerical tables.
- Uncertainty definitions where applicable.
- Source citation and figure revision.
- Appropriate alternative text or extended descriptions.
- Accessible controls for interactive figures where implemented.
The reference SVG contains a title and description, while the separate CSV provides the numerical results.
This is a useful starting point, not a complete accessibility certification. Actual browser, screen-reader, keyboard, and visual-contrast testing must be performed as relevant.
For HTML and SVG exports containing user-supplied content, apply suitable escaping, sanitization, access controls, and resource restrictions.
Do not assume that a file is safe or scientifically correct merely because it is in a graphical format.
18. Create a reproducibility and evidence package
A complete source-reconciliation package should contain:
- Authoritative source artifact and immutable revision.
- Source citation, rights, and checksum.
- Selected observations and exclusions.
- Analytical method and code revision.
- Versioned numerical analytical output.
- Figure-data table.
- Graphical specification and renderer version.
- Rendered figure and export artifacts.
- Numerical reconciliation results.
- Rendered-mark verification results.
- Accessible numerical equivalent.
- Executed tests and artifact hashes.
- Scientific reviewer and publication approval.
File hashes verify artifact identity, not scientific correctness.
Likewise, an analytically reproducible result may be rendered into byte-different image files under different software or operating environments.
Numerical equivalence, graphical fidelity, and byte-level identity should be evaluated separately.
19. Scientific acceptance matrix
| Criterion | Pass condition | Evidence |
|---|---|---|
| Source identity | Authoritative source and revision identified | Source metadata |
| Source integrity | Source content matches expected integrity record | Checksum verification |
| Source rights | Use and publication permitted | Rights review |
| Contributor membership | Correct records contribute to each result | Record-level reconciliation |
| Analytical method | Calculation and parameters documented | Versioned method specification |
| Numerical reconciliation | Recomputed values agree with stored output | Independent calculation |
| Figure-data integrity | Figure inputs agree with analytical output | Data-table comparison |
| Graphical mark fidelity | Marks correspond to accepted values | Renderer verification |
| Axis and scale integrity | Scales preserve intended numerical meaning | Graphical review |
| Uncertainty | Intervals reconcile with documented methods | Statistical tests |
| Temporal/spatial reference | Coordinates and references correctly aligned | Reference-system review |
| Accessibility | Essential information available accessibly | Accessibility review |
| Reproducibility | Accepted result reconstructable from preserved evidence | Replay receipt |
| Scientific review | Interpretation justified by the data and method | Independent assessment |
| Publication approval | Published output references accepted revision | Approval record |
Acceptance rule: Record each applicable criterion as Pass, Fail, Not Tested, or Not Applicable. A figure is not fully reconciled when any mandatory source, calculation, graphical value, or publication dependency cannot be verified.
20. Sustainable Catalyst integration
Figure source reconciliation is relevant to the intended connections among Sustainable Catalyst’s scientific applications.
The following responsibilities are proposed and are not independently verified production integrations.
| Application | Intended responsibility |
|---|---|
| Library | Preserve authoritative datasets, source metadata, versions, provenance, and rights |
| Workbench | Generate reproducible numerical outputs and figure-data artifacts where implemented |
| Research Lab | Evaluate analytical methods, scientific assumptions, and uncertainty |
| Visualization & Graphing | Map validated analytical results to graphical marks and exports |
| Site Intelligence | Reconcile spatial observations, satellite products, and geographic transformations where supported |
| Decision Studio | Preserve relationships among model inputs, scenarios, analyses, and decision evidence where implemented |
| Workspace | Track source relationships, analytical revisions, review evidence, and publication approvals |
| Research | Publish reviewed figures with source citations, analytical methods, and provenance |
20.1 Intended source-to-publication architecture
Library source artifact
|
v
Workbench calculation
|
v
Versioned analytical result
|
v
Figure source reconciliation
|
v
Visualization renderer
|
v
Numerical and graphical verification
|
v
Workspace scientific review
|
v
Research publication
Before implementing this across applications, confirm the actual source identities, persistence models, API contracts, authorization boundaries, and publication controls.
21. Source-audit and platform verification
To certify a Sustainable Catalyst figure-reconciliation capability, identify:
- Owning repository and exact code revision.
- Implemented source and analytical artifact schemas.
- Actual source-to-analysis lineage records.
- Transformation and calculation code paths.
- Renderer and adapter versions.
- Figure-data and graphical-mark contracts.
- Implemented storage and immutability controls.
- Source licensing and authorization behavior.
- Executed numerical and negative tests.
- Runtime screenshots and exported artifacts.
- Accessibility and security test results.
- Independent scientific review and release decisions.
The existence of a source citation, analytical result, or image checksum does not automatically establish complete scientific provenance.
22. Scientific limitations and escalation
Escalate for scientific or engineering review when:
- Displayed values cannot be independently reproduced.
- Source or analytical revisions cannot be identified.
- Contributing records are inconsistent.
- Required transformation methods are undocumented.
- Units or reference systems are mismatched.
- Graphical coordinates disagree with accepted numerical results.
- Uncertainty intervals cannot be reconciled.
- Selection or filtering silently excludes relevant observations.
- Published scientific claims depend on an unreconciled figure.
Preserve original artifacts during investigation.
If a material error affects an approved publication, issue an appropriately reviewed and documented correction rather than silently replacing the original evidence.
23. Technical references
- World Wide Web Consortium (W3C) (2013). PROV-O: The PROV Ontology. W3C Recommendation. Available at: https://www.w3.org/TR/prov-o/.
- World Wide Web Consortium (W3C) (2013). PROV-DM: The PROV Data Model. Available at: https://www.w3.org/TR/prov-dm/.
- National Institute of Standards and Technology (NIST) (2015). Secure Hash Standard (SHS). FIPS PUB 180-4. Available at: NIST FIPS 180-4.
- Python Software Foundation (n.d.). hashlib — Secure Hashes and Message Digests. Available at: Python documentation.
- Python Software Foundation (n.d.). csv — CSV File Reading and Writing. Available at: Python documentation.
- Python Software Foundation (n.d.). xml.etree.ElementTree — The ElementTree XML API. Available at: Python documentation.
- Python Software Foundation (n.d.). unittest — Unit Testing Framework. Available at: Python documentation.
- World Wide Web Consortium (W3C) (2011). Scalable Vector Graphics (SVG) 1.1, Second Edition. Available at: W3C SVG specification.
- World Wide Web Consortium (W3C) (2024). Web Content Accessibility Guidelines (WCAG) 2.2. Available at: https://www.w3.org/TR/WCAG22/.
- W3C Web Accessibility Initiative (n.d.). Complex Images. Available at: W3C WAI guidance.
24. Completion and verification record
| Field | Required evidence |
|---|---|
| Figure identifier | Figure and revision |
| Source artifact | Dataset identity, version, and checksum |
| Analytical output | Versioned numerical result and method |
| Source integrity | Pass, Fail, or Not Tested |
| Contributor membership | Pass, Fail, or Not Tested |
| Selection state | Pass, Fail, or Not Tested |
| Analytical transformation | Pass, Fail, or Not Tested |
| Numerical reconciliation | Pass, Fail, or Not Tested |
| Figure-data reconciliation | Pass, Fail, or Not Tested |
| Graphical mark fidelity | Pass, Fail, or Not Tested |
| Unit consistency | Pass, Fail, or Not Tested |
| Uncertainty | Pass, Fail, Not Tested, or Not Applicable |
| Temporal/spatial reference | Pass, Fail, Not Tested, or Not Applicable |
| Accessible numerical export | Pass, Fail, or Not Tested |
| Reproducibility | Pass, Fail, or Not Tested |
| Scientific review | Pass, Fail, or Not Tested |
| Publication approval | Approved, Not Approved, or Not Applicable |
| Reviewer | Actual reviewer and date |
| Evidence artifacts | Source data, analytical output, figure, numerical table, manifest, and test receipts |
| Outstanding limitations | Unresolved scientific or implementation concerns |
Completion criterion: A figure source-reconciliation workflow is accepted when authoritative source observations and analytical revisions are identifiable, numerical results can be independently reconstructed, graphical marks agree with those results, provenance and accessible evidence are preserved, and applicable scientific and publication-review requirements are satisfied.
Scientific limitation: Source reconciliation establishes traceability and numerical consistency. It does not independently establish the accuracy of measurements, validity of analytical assumptions, representativeness of the sample, or justification of a scientific conclusion.
Current implementation status: Practical methodology, synthetic versioned source fixture, analytical transformation, SVG rendering example, numerical export, reconciliation checks, regression test definitions, and proposed acceptance criteria documented. No particular Sustainable Catalyst immutable analytical store, figure renderer, provenance service, or publication integration is certified without implementation-specific source inspection, executed tests, runtime verification, and release acceptance evidence.
