Project 2 ยท nsywn.my.id Data Analyst Ecosystem 100% Browser-Local | Zero Server Uploads | Zero Trackers
Data Exploration Lab lab.nsywn.my.id
ID EN
Technical Specification & Logic Contract

Statistical Methodology, Privacy & Input Guardrails

This page documents every calculation rule inside lab.nsywn.my.id alongside automated edge-case unit tests protecting against silent NaN values or unsafe spreadsheet exports.

1. 100% Browser-Local Execution & Resource Caps

  • CSV, TSV, and JSON files are read via browser FileReader APIs in local memory and never leave your device.
  • The static server handles read-only GET/HEAD requests with strict per-request CSP nonces and zero third-party requests.
  • Inputs are capped cleanly at 5 MiB, 25,000 rows, and 60 columns so mobile devices stay responsive.

2. Statistical Definitions & Edge-Case Guards

  • Quartiles (Q1, Median, Q3) use linear interpolation across sorted values.
  • Sample standard deviation uses Bessel correction (n - 1) and returns null whenever n < 2 to avoid NaN or division by zero.
  • Outliers combine Tukey IQR fences (n >= 4) and Z-score |z| >= 3 (n >= 3 and Std Dev > 0).
  • Pearson r requires >= 3 complete-case pairs with non-zero variance in both selected columns.
  • ISO date parsing enforces strict UTC calendar round-trip validation (rejecting invalid rollover dates like 2025-02-31 or 2023-02-29).

3. 6-Dimension Scorecard & CSV Export Hardening

  • Overall score combines Completeness (25%), Uniqueness (20%), Validity (20%), Consistency (15%), Accuracy (10%), and Timeliness (10%, combining temporal span with non-null date completeness).
  • Clean CSV exports deduplicate identical rows and neutralize leading-whitespace trimmed '=', '+', '@', tab/newline control characters, or non-numeric '-' to mitigate spreadsheet formula injection.