Skip to content

data(smartphone): compute display ppi from resolution + size (51,557 records) - #112

Merged
Seungpyo1007 merged 2 commits into
mainfrom
data/import-staging
Jul 9, 2026
Merged

Seungpyo1007 merged 2 commits into
mainfrom
data/import-staging

Conversation

@Seungpyo1007

@Seungpyo1007 Seungpyo1007 commented Jul 9, 2026 •

Copy link
Copy Markdown
Member

Summary

Computes display pixel density (ppi) for smartphones from fields already in the record — pure geometry, no new/external data.

  • display.ppi = round(sqrt(width² + height²) / size_inch) for 51,557 smartphones that have a resolution and screen size but no ppi.
  • Coverage ppi ~26% → ~81%.
  • Consistency-validated against the 24k records that already carry a source ppi: 89% exact match, 10% off-by-1 (rounding), only 0.4% differ by more — and those are Apple's marketed/rounded figures (e.g. iPhone "326") vs the true geometric density.
  • Guards: requires w,h ≥ 32 and size > 0; rejects results outside [20, 2000] ppi.

Same deterministic method PR #107 used for monitors & laptops, now applied to the smartphone catalogue. All verified: false. Validation passes. Dump regenerated — 51,557 changed smartphone detail pages.

Closes #1

…57 records

Fills display.ppi = round(sqrt(w^2+h^2)/size_inch) for records that have a
resolution and screen size but no ppi. Pure geometry from existing fields — no
new/external data. Validated against records that already have ppi: 89% exact,
10% off-by-1 (rounding); the rare larger deltas are Apple's marketed/rounded
figures. Coverage ~26% -> ~81%.

Refs #1
@github-actions github-actions Bot added data Dataset changes enhancement New feature or request labels Jul 9, 2026
@Seungpyo1007

Copy link
Copy Markdown
Member Author

🤖 TechEngine · data validation

category      changed   verified
smartphone     51,557     false
  • python -m app.validate → ✅ passed (0 errors), 108,575 records / 10 categories.
  • display.ppi coverage 24,255 → 75,812 (~26% → ~81% of smartphones).
  • Cross-checked vs existing source ppi: 89% exact, 10% ±1, 0.4% >1 (Apple marketed figures).
  • Dump regenerated: 51,557 smartphone detail pages (list summaries unaffected).

@Seungpyo1007

Copy link
Copy Markdown
Member Author

🤖 TechEngine · verify (Tier 0)

Derivation, not import — the density is computed from resolution and size_inch that already live in each record:

  • Formula round(sqrt(w²+h²)/size_inch) is the physical definition of pixel density; validated to reproduce the source's own ppi within ±1 for 99.6% of records that have both.
  • Bounds guard rejects implausible inputs (tiny resolutions, non-positive size) and outputs outside [20, 2000].
  • The ≤0.4% larger deltas are where the manufacturer published a rounded/marketed ppi; for records lacking ppi entirely, the geometric value is the honest measure.

verified unchanged (false). Safe to rebase-merge.

@Seungpyo1007 Seungpyo1007 moved this from Todo to In Progress in TechAPI-Project Jul 9, 2026
@Seungpyo1007
Seungpyo1007 merged commit 16af33f into main Jul 9, 2026
5 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in TechAPI-Project Jul 9, 2026
Seungpyo1007 added a commit that referenced this pull request Jul 9, 2026
… fields

Applies the same two derivations used for smartphones (#111, #112) to the
tablet/watch/pda catalogues: parse launch os_version from the `os` string, and
compute display.ppi = round(sqrt(w^2+h^2)/size_inch). Deterministic, no new data.
tablet +2656 os_version / +2080 ppi; watch +202 / +279; pda +16 / +54.

Refs #1
Seungpyo1007 added a commit that referenced this pull request Jul 9, 2026
… fields

Applies the same two derivations used for smartphones (#111, #112) to the
tablet/watch/pda catalogues: parse launch os_version from the `os` string, and
compute display.ppi = round(sqrt(w^2+h^2)/size_inch). Deterministic, no new data.
tablet +2656 os_version / +2080 ppi; watch +202 / +279; pda +16 / +54.

Refs #1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data Dataset changes enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

TechAPI dataset roadmap and status: all categories (1989-2026)

1 participant