Back to replicas

Replica documentation

Principal Component Analysis

Local route /interactive-explanation/principal-component-analysis/ now layers the lighter Engineering Sandbox essay shell, local font stack, play-first framing, and generated chapter navigation onto the published EV explainer while keeping the original interactive runtime and public provenance limited to the shared footer.

Upstream snapshot: public-built site capture verified 2026-03-14
Source family: setosa.io/ev

Source snapshot

The local route vendors the published PCA page HTML, stylesheet, and page script, then patches asset paths and page chrome so the runtime works cleanly under the /interactive-explanation/ subpath.

  • Live original verified against https://setosa.io/ev/principal-component-analysis/ on 2026-03-14.
  • The local copy removes EV branding, bylines, share widgets, newsletter prompts, analytics, and comments.
  • The interactive math and visualization flow still rely on the original Angular, D3, Three.js, and numeric.js runtime.
  • The route now also loads the lighter Engineering Sandbox shell so the page gains local typography, editorial framing, and chapter navigation without displacing the EV chart layouts.

Shared EV layer

  • ../ev/scripts/d3.js, angular.js, and common.js remain shared across Setosa EV routes.
  • ../ev/scripts/three.js, OrthographicTrackballControls.js, and numeric.js were added locally for this route.
  • principal-component-analysis/style.css now adds wrapper-level overflow handling so the wide visualizations stay usable on smaller screens.
  • ../../shared/engineering-sandbox.css and ../../shared/engineering-sandbox.js provide the local font stack, chapter rail, and mobile jump bar used by this essay rollout.

Asset and source map

  • principal-component-analysis/index.html owns local metadata, cleaned public shell, and relative asset paths.
  • principal-component-analysis/script.js keeps the original PCA math, 2D drag logic, 3D projection viewer, and UK-food plots.
  • principal-component-analysis/fb-thumb.png and the shared EV scripts are vendored for subpath-safe static hosting.

Known deviations

  • The public route no longer shows EV branding, author credits, share widgets, newsletter forms, analytics, or comments.
  • The local page adds a small docs link and shared footer, but leaves the interactive runtime unchanged.
  • The live PCA page currently ships fixed UK-food defra-d1 and defra-d2 views rather than a component-pair switcher, and the replica preserves that published surface.
  • The opening framing and section transitions were lightly rewritten for the Engineering Sandbox rollout, but the original EV interactions and formulas remain intact.

Parity checklist

Loading...
Loading parity contract...