Skip to content

data(smartphone,tablet): extract dimensions + wired charging from raw spec (3,118) - #114

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

Extracts two more structured fields from the full GSMArena spec blob (raw_phones_2024) already stored on each record — deterministic parse, no new/external data.

  • dimensions (+3,101) — Body.Dimensions "147 x 72.5 x 7.1 mm …" → {height_mm, width_mm, depth_mm} (matches the existing field shape).
  • charging_wired_w (+1,614) — Battery.Charging "18W wired, QC2" → 18.0 (wireless/IP data absent for these mostly-older records, so those fields are untouched).

Applies to smartphone + tablet; 3,118 records touched. All verified: false. Validation passes. Dump regenerated — 3,118 changed detail pages.

Closes #1

… spec

Parses Body.Dimensions (H x W x D mm -> {height_mm,width_mm,depth_mm}) and
Battery.Charging (wired W) from the stored raw_phones_2024 full-spec blob, for
records missing those fields. Deterministic parse of existing data.
dimensions +3,101; charging_wired_w +1,614 (across smartphone + tablet).

Refs #1
@Seungpyo1007

Copy link
Copy Markdown
Member Author

🤖 TechEngine · data validation

field               added
dimensions          3,101
charging_wired_w    1,614
  • python -m app.validate → ✅ passed (0 errors), 108,575 records / 10 categories.
  • Parsed from raw_phones_2024.Body.Dimensions and .Battery.Charging; dimension order H×W×D verified against the existing {height_mm,width_mm,depth_mm} shape.
  • Dump regenerated: 3,118 smartphone + tablet detail pages.

@Seungpyo1007

Copy link
Copy Markdown
Member Author

🤖 TechEngine · verify (Tier 0)

Structured extraction from the record's own stored spec blob, not an import:

  • dimensions parsed with a bounds guard (0 < h,w < 400 mm, 0 < depth < 80 mm); the "in" values in the source are ignored — only the mm triple is taken.
  • charging_wired_w takes the wired wattage, explicitly removing any "N W wireless" token first so the two never cross-contaminate; guarded to [2, 500] W.
  • Records already carrying either field are left untouched.

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 2ae8fe7 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
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